How to Migrate a Store From Shopify to WooCommerce Without Losing SEO

Migration Playbook: Moving to WooCommerce

This guide outlines a professional, systematic approach to migrating an e-commerce store to WooCommerce. It prioritizes data integrity, SEO preservation, and operational continuity.

Phase 1: Data Extraction and Mapping

Do not attempt to migrate directly from a live production site. Create a staging environment.

Exporting Data

  1. Products: Export to CSV. Ensure all attributes (size, color, weight) and variations are included. If using a proprietary platform, use an API-based extraction tool to ensure nested JSON data is flattened correctly.
  2. Customers: Export user IDs, email addresses, billing/shipping addresses, and hashed passwords. Note: Hashed passwords usually cannot be migrated unless the source platform uses a compatible format. Expect customers to perform a password reset.
  3. Orders: Export order history including line items, status, discounts, and tax calculations.

Mapping to WooCommerce

WooCommerce requires a specific CSV structure. Use the native WooCommerce Product CSV Importer. * SKUs: These are your primary keys. Ensure they are unique and match the source. * Categories/Tags: Map these to WooCommerce taxonomies. * Metadata: Use the meta_data column in the CSV or a plugin like WP All Import to map custom fields to WooCommerce _custom_field_name keys.

Phase 2: SEO Preservation and Redirects

Losing your search engine rankings is the most common failure point in migrations.

The 301 Strategy

You must map every old URL to its new equivalent. 1. Crawl the old site: Use Screaming Frog to export all current URLs. 2. Create the Map: Create a CSV with two columns: Old URL and New URL. 3. Implementation: Use the Redirection plugin or add rules directly to your .htaccess file. * Example: Redirect 301 /old-product-page /product/new-product-page 4. Sitemap: Generate a new XML sitemap via Yoast SEO or Rank Math. Submit the new sitemap to Google Search Console (GSC) immediately after launch.

Phase 3: Payments and Checkout

Payment Gateway Setup

  1. Stripe/PayPal: Install the official plugins. Do not use third-party wrappers.
  2. Tokenization: If you have recurring subscriptions, ensure your payment gateway supports migration of customer tokens. If not, contact your gateway support to initiate a "Customer Data Migration" to ensure cards on file remain valid.
  3. Tax/Shipping: Configure WooCommerce Tax (or Avalara/TaxJar) and shipping zones. Test weight-based and flat-rate shipping logic against your previous store’s settings.

Testing Protocol

Run these tests in the staging environment before pointing DNS: * Guest Checkout: Complete a full transaction. * Account Checkout: Log in as an existing customer and check order history. * Email Triggers: Verify that order confirmation, processing, and completion emails are firing correctly. * Responsive Check: Test checkout on mobile (iOS/Android).

Phase 4: Verification and Launch

The Checklist

  • [ ] DNS TTL: Lower your DNS TTL to 300 seconds 24 hours before migration.
  • [ ] Database Backup: Take a full server-level backup.
  • [ ] Maintenance Mode: Enable maintenance mode on the old site.
  • [ ] Final Sync: Run a final export/import for orders placed between staging and launch.
  • [ ] SSL: Ensure an SSL certificate is active on the new domain.
  • [ ] GSC: Use the "URL Inspection" tool in GSC to verify that redirected URLs are correctly returning a 301 status code.

Common Pitfalls to Avoid

  1. Ignoring Image URLs: If you rely on absolute URLs in your product descriptions, they will break when you move domains. Use a "Search and Replace" script to update image paths to the new domain.
  2. Plugin Bloat: Do not install every "must-have" plugin. WooCommerce is heavy; keep the stack lean to maintain sub-2-second load times.
  3. Ignoring Permalinks: Ensure your WooCommerce permalink settings (e.g., /shop/, /product/) match your old URL structure as closely as possible to minimize the number of redirects required.
  4. Missing Order Statuses: WooCommerce has specific internal statuses (wc-processing, wc-completed). If your old platform used custom statuses, map them to the closest WooCommerce equivalent or they will default to "Pending."
  5. Forgotten Cron Jobs: If your old site had automated inventory syncs, ensure these are disabled to prevent the old site from overwriting your new inventory if it accidentally comes back online.

Technical Commands

Check Redirect Status (CLI): Use curl to verify your 301s are working before going live:

curl -I https://yourdomain.com/old-product-url

Expected Output: HTTP/1.1 301 Moved Permanently

Database Search and Replace: If you need to update URLs in the database after migration:

wp search-replace 'old-domain.com' 'new-domain.com' --skip-columns=guid

Verify File Permissions: Ensure your uploads directory is writable:

find wp-content/uploads -type d -exec chmod 755 {} \;
find wp-content/uploads -type f -exec chmod 644 {} \;

Final Verification

Once live, monitor your server error logs for 404s. * Apache: tail -f /var/log/apache2/error.log * Nginx: tail -f /var/log/nginx/error.log

If you see a spike in 404s, identify the pattern and add bulk redirect rules to your .htaccess or Nginx configuration.


Need this done for you? Hire me on Freelancehunt: https://freelancehunt.com/freelancer/sspoisk

Originally posted at https://guardlabs.online/care/

Комментарии

Популярные сообщения из этого блога

I shipped a 12-question crypto security audit in 2 hours