How to Migrate a Store From Shopify to WooCommerce Without Losing SEO
Migration Playbook: Legacy Store to WooCommerce
This playbook outlines a professional, systematic approach to migrating e-commerce data to WooCommerce. It focuses on data integrity, SEO preservation, and operational stability.
Phase 1: Data Extraction and Mapping
Never migrate directly from a live production database. Always work with a staging environment.
Exporting Data
- Products: Export all product data to CSV. Ensure you include SKU, Title, Description, Price, Sale Price, Stock Quantity, and Categories.
- Customers: Export user profiles. You need Email, First Name, Last Name, Billing/Shipping addresses, and Order History.
- Orders: Export order history. Crucial fields: Order ID (keep these for reference), Customer Email, Items, Totals, Tax, and Order Status.
Mapping to WooCommerce
WooCommerce uses a specific CSV structure. Use the WooCommerce Product CSV Importer as your template.
* Mapping: Map legacy fields to post_title, post_content, regular_price, manage_stock, and sku.
* Metadata: Use the meta:_your_custom_key syntax in your CSV to import custom fields into the wp_postmeta table.
Phase 2: Technical Execution
Database Preparation
Before importing, optimize your wp-config.php for large imports to avoid timeout errors:
@ini_set( 'upload_max_size' , '256M' );
@ini_set( 'post_max_size', '256M');
@ini_set( 'max_execution_time', '300' );
Import Commands
For large datasets, avoid the browser-based importer. Use WP-CLI to prevent memory exhaustion:
# Import products
wp wc product import products.csv --path=/var/www/html
# Import customers
wp user import-csv customers.csv --path=/var/www/html
Phase 3: SEO and URL Preservation
Losing search rankings is the most common failure in migrations.
URL Mapping Strategy
- Generate a URL Map: Create a CSV with two columns:
old_urlandnew_url. - Implement 301 Redirects: If your URL structure changed, use the Redirection plugin or add rules to your
.htaccessfile:apache Redirect 301 /old-product-path /new-product-path - Sitemap: Generate a new XML sitemap using Yoast SEO or RankMath. Submit this to Google Search Console (GSC) immediately after launch.
Phase 4: Payments and Checkout
Payment Gateway Setup
- Stripe/PayPal: Configure API keys in staging.
- Test Mode: Ensure all gateways are in "Test Mode."
- Webhooks: Verify that your payment gateway’s webhook URL is updated in the provider's dashboard to point to the new site.
Checkout Verification Checklist
- [ ] Add a product to the cart.
- [ ] Apply a coupon code.
- [ ] Complete a transaction using test credit card numbers.
- [ ] Verify order status in the WooCommerce dashboard.
- [ ] Confirm the transactional email (Order Confirmation) is sent to the customer.
Phase 5: Verification and Launch
SEO and Data Integrity
- [ ] GSC Coverage: Check GSC for "404 Not Found" errors post-migration.
- [ ] Canonical Tags: Ensure canonical tags point to the new production URLs.
- [ ] Metadata Check: Use a database tool (like WP-CLI or Adminer) to verify that custom metadata exists for a sample of 50 products.
Common Mistakes to Avoid
- Ignoring Image Paths: Most migrations fail to move image files. Ensure your CSV import includes absolute URLs for images so WooCommerce can download them into the Media Library.
- Forgetting Order IDs: If you don't map legacy Order IDs to the new system, customer support will struggle to look up historical orders. Use a plugin like "Sequential Order Numbers" to align IDs if necessary.
- Staging vs. Live: Never run the final import on the live site. Always import to staging, verify, then push the database to production.
- Missing Redirects: If you change your URL structure (e.g., from
/p/product-nameto/product/product-name), you must have a 301 redirect for every single product.
Final Pre-Launch Checklist
- [ ] Database backup taken.
- [ ] All products mapped and imported.
- [ ] Customers imported and passwords reset (send a "reset password" email blast).
- [ ] 301 redirects tested for top 20 landing pages.
- [ ] SSL certificate active.
- [ ] Transactional emails configured (SMTP recommended).
- [ ] Search engine indexing enabled (Settings > Reading > "Discourage search engines" is UNCHECKED).
Need this done for you? Hire me on Freelancehunt: https://freelancehunt.com/freelancer/sspoisk
Комментарии
Отправить комментарий