DEV Community

Cover image for How to Migrate an Ecommerce Store to Shopify Without Losing Data or SEO
Krunal Kanojiya
Krunal Kanojiya

Posted on

How to Migrate an Ecommerce Store to Shopify Without Losing Data or SEO

Migrating an ecommerce store to Shopify looks simple until you inspect the data.

Products have variants. Customers have multiple addresses. Orders reference products that may no longer exist. Categories need to become collections. Custom fields need a new home. The source and destination platforms rarely agree on how any of this information should be structured.

Then there is SEO. A technically successful migration can still damage the business if thousands of established URLs suddenly return 404 errors.

For developers, a Shopify migration is not a CSV copy operation. It is a repeatable data-engineering project with four important goals:

  1. Preserve the data the business needs.
  2. Translate it into Shopify's data model.
  3. Verify that the destination matches the source.
  4. Switch platforms without disrupting customers or search engines.

This tutorial presents a practical workflow you can adapt for WooCommerce, Magento, BigCommerce, or a custom ecommerce platform.

Design the Migration as a Pipeline

Treat the migration as a pipeline rather than a collection of manual admin tasks:

Source platform
      |
      v
Extraction
      |
      v
Staging and normalization
      |
      v
Shopify data transformation
      |
      v
Test import
      |
      v
Validation and reconciliation
      |
      v
Production import and cutover
Enter fullscreen mode Exit fullscreen mode

This approach makes the migration repeatable. When validation exposes a problem, fix the transformation logic and run the import again. Do not manually repair hundreds of records in Shopify unless the exception genuinely cannot be automated.

A repeatable pipeline also makes the final synchronization safer because you have already tested the exact process that will be used during launch.

1. Audit the Source Store

Before writing an importer, identify everything the existing store contains.

Your inventory should include:

  • Products, variants, options, prices, inventory, and images
  • Categories, collections, tags, and product relationships
  • Customers, addresses, segments, and account status
  • Orders, discounts, taxes, refunds, fulfilments, and transactions
  • Pages, blog posts, menus, and media
  • Meta titles, descriptions, canonical settings, and existing redirects
  • Reviews, subscriptions, loyalty balances, wishlists, and gift cards
  • Custom fields and extension-owned data
  • ERP, PIM, 3PL, payment, shipping, analytics, and marketing integrations

For each item, choose one of four actions:

Action Meaning
Migrate Transfer the data directly
Transform Change its structure before importing
Rebuild Reimplement the feature for Shopify
Archive Preserve it outside Shopify for reference

This is especially important when the source store depends on plugins or extensions. A normal product export may not contain subscription contracts, reward balances, custom user fields, or records stored in extension-specific database tables.

If you do not discover those dependencies during the audit, you will probably discover them after launch.

2. Establish a Migration Baseline

Record the state of the source store before changing anything. At minimum, capture:

  • Total products and active products
  • Total variants and unique SKUs
  • Customers and customer addresses
  • Orders by status
  • Product images
  • Categories or collections
  • Content pages and blog posts
  • Indexed URLs and existing redirects
  • Gift card, loyalty, or subscription records

Keep these counts in a reconciliation sheet or database table. They will become the expected values for your test and production imports.

Also preserve the source IDs. An original product, customer, or order ID is extremely useful for tracing records across systems.

3. Build a Field-Mapping Document

Source fields rarely map directly to Shopify fields. Define the mapping before implementing it.

Source field Shopify destination Transformation
product_name Product title Trim and normalize whitespace
long_description Product description Sanitize and convert to HTML
manufacturer Vendor Map legacy values
category_path Collection Flatten or translate hierarchy
material Product metafield Store as custom.material
legacy_product_id Product metafield Preserve for reconciliation
meta_title SEO title Enforce length and encoding rules
slug Product handle Normalize and check uniqueness

Your mapping document should also answer less obvious questions:

  • What happens to products without SKUs?
  • How are duplicate SKUs handled?
  • Do archived products remain archived?
  • Which system owns inventory after launch?
  • How will deleted products referenced by historical orders be represented?
  • Which custom fields should be searchable or filterable?
  • How will source category trees map to Shopify collections?

Preserve the source ID in a Shopify metafield whenever possible. For example:

{
  "namespace": "migration",
  "key": "source_product_id",
  "type": "single_line_text_field",
  "value": "WC-18492"
}
Enter fullscreen mode Exit fullscreen mode

That identifier lets your code locate an already migrated record during reruns, incremental synchronization, and debugging.

4. Choose CSV or API Imports

There is no single best import method. The correct option depends on store size, data complexity, and how frequently you need to rerun the migration.

Use CSV when

  • The catalog is relatively small and conventional.
  • Products use simple options and variants.
  • You can review the transformed data manually.
  • You do not need complex record relationships.
  • The migration is likely to run only a few times.

CSV is useful because it is transparent. A merchant or QA reviewer can open the file and inspect it before import.

Use Shopify APIs when

  • The catalog is large or structurally complex.
  • Products require metafields or custom mapping.
  • You need reliable reruns or incremental synchronization.
  • The process must record record-level errors.
  • Several connected data types need to be migrated.

For a custom migration, prefer Shopify's current GraphQL Admin API. Build around the API version supported when you begin the project, because Shopify versions its APIs and retires older versions regularly.

Your importer should include:

  • Idempotency so reruns do not create duplicates
  • Rate-limit handling
  • Retry logic for transient errors
  • Structured error logging
  • Checkpoints for long-running jobs
  • A source-to-destination ID map
  • A dead-letter queue or exception report for failed records

Do not treat a successful HTTP response as proof that a record migrated correctly. Inspect GraphQL user errors and validate the resulting Shopify object.

5. Normalize the Source Data

Do not send raw exports directly to Shopify. Introduce a staging layer and normalize the data first.

A simplified normalized product might look like this:

{
  "sourceId": "18492",
  "title": "Classic Running Shoe",
  "handle": "classic-running-shoe",
  "vendor": "Example Sports",
  "status": "ACTIVE",
  "options": ["Color", "Size"],
  "variants": [
    {
      "sku": "RUN-BLK-09",
      "price": "89.00",
      "options": {
        "Color": "Black",
        "Size": "9"
      }
    }
  ],
  "metafields": {
    "custom.material": "Mesh",
    "migration.source_product_id": "18492"
  }
}
Enter fullscreen mode Exit fullscreen mode

Normalization should cover:

  • Duplicate or missing SKUs
  • Inconsistent option names such as Colour and Color
  • Invalid prices and inventory quantities
  • Malformed HTML in descriptions
  • Unsupported or unreachable image URLs
  • Duplicate product handles
  • Encoding issues
  • Empty variants
  • Legacy attributes that should become metafields

Make each transformation deterministic: the same source input should produce the same Shopify-ready output.

6. Handle Platform-Specific Differences

Every source platform creates a different set of migration problems.

WooCommerce

WooCommerce data may be split between WordPress tables, post metadata, and plugin-specific tables. Standard exports often miss:

  • Subscription information
  • Loyalty balances
  • Membership data
  • Custom checkout fields
  • Product data created by plugins

Customer passwords usually cannot simply be transferred between platforms. Plan a customer account activation or password-reset journey and communicate it before launch.

Magento or Adobe Commerce

Magento's Entity-Attribute-Value model does not map directly to Shopify. You need to decide which attributes become:

  • Standard product fields
  • Options and variants
  • Metafields
  • Tags
  • Collections

Magento URL rewrites also need to be exported explicitly. They are valuable SEO assets, not disposable platform configuration.

BigCommerce

BigCommerce stores may use product and variant combinations that require restructuring for Shopify's current product model. Audit products with unusually large option sets before choosing your Shopify representation.

BigCommerce themes use a different templating system from Shopify Liquid. Treat the storefront as a rebuild, not as an automated theme conversion.

7. Import Into a Development Store

Never make production your first complete test.

Begin with a representative sample containing:

  • A simple product
  • A product with several variants
  • A product with multiple images
  • A product with custom metafields
  • A customer with multiple addresses
  • A cancelled or refunded order
  • A page containing internal links
  • Records with non-ASCII characters

Validate the sample in Shopify Admin and on the storefront. Look beyond whether the records exist. Confirm that the migrated structure supports search, collections, filtering, inventory, templates, and connected applications.

Once the sample passes, run the complete catalog in a development or staging store.

8. Build the Redirect Map Before Launch

URL redirects are part of the migration, not a post-launch SEO task.

Export all valuable URLs from sources such as:

  • The source platform database
  • XML sitemaps
  • Google Search Console
  • Analytics landing-page reports
  • Backlink reports
  • Existing redirect rules

Map each old path to its closest new destination:

Redirect from,Redirect to
/product/classic-running-shoe,/products/classic-running-shoe
/product-category/running,/collections/running
/blog/shoe-care-guide,/blogs/guides/shoe-care-guide
Enter fullscreen mode Exit fullscreen mode

Validate the redirect map for:

  • Duplicate source paths
  • Redirect loops
  • Multi-hop redirect chains
  • Missing high-traffic pages
  • Old internal links in migrated content
  • URLs containing parameters or encoded characters

Do not redirect every removed URL to the homepage. Send it to the closest relevant replacement. If no useful replacement exists, a legitimate 404 response can be more accurate than an irrelevant redirect.

Preserve existing handles where practical, but do not assume that matching a slug preserves the full URL. Shopify adds platform-specific path segments such as /products/ and /collections/.

9. Reconcile the Destination

Reconciliation proves that the migration is complete.

Start with counts:

Check Source Shopify Expected difference
Products 4,812 4,812 0
Active variants 12,406 12,406 0
Customers 38,901 38,899 2 documented duplicates
Product images 18,220 18,220 0
Redirects 6,140 6,140 0

Then validate actual values for a representative set of records:

  • Product titles, handles, and status
  • SKUs, options, prices, and inventory
  • Image count and ordering
  • Customer names and addresses
  • Order totals, taxes, discounts, and refunds
  • Metafield types and values
  • Collection membership
  • SEO titles and descriptions

Counts can match even when the underlying mapping is wrong. Use both aggregate checks and record-level checks.

An exception is acceptable only when it is understood and documented. For example, two duplicate source customers might intentionally become one Shopify customer.

10. Test the Complete Commerce Journey

Data validation is only one part of QA. Test the store as a customer and as an operator.

At minimum, test:

  • Navigation, search, collections, and filters
  • Product options and variant selection
  • Pricing, discounts, taxes, and shipping rates
  • Cart and checkout
  • Successful and failed payments
  • Customer registration, activation, and login
  • Order confirmation notifications
  • Inventory deduction
  • Fulfilment and cancellation
  • Refunds and returns
  • Analytics and marketing events
  • Mobile layout and performance

Place a real order using a real payment method before launch. Test orders and preview modes do not always exercise every production integration.

11. Plan the Final Incremental Sync

A source store usually continues receiving customers and orders while the new store is being built. This means the first bulk export becomes outdated.

Use at least two migration passes:

  1. Bulk migration: Move the historical data while the old store remains active.
  2. Incremental migration: Move records created or changed after the bulk export.

Track a reliable watermark such as an update timestamp or monotonically increasing source ID. Be careful with timestamps if different systems use different time zones.

During cutover:

  1. Pause catalog and content changes where practical.
  2. Record the final synchronization boundary.
  3. Export new and updated records.
  4. Run the incremental import.
  5. Reconcile critical counts.
  6. Import and test redirects.
  7. Point the domain to Shopify.
  8. Confirm SSL and storefront availability.
  9. Place a production order.
  10. Verify payment, inventory, email, and fulfilment events.

Keep the previous platform available in read-only form until stakeholders approve the migrated data.

12. Monitor After Launch

The DNS change is not the end of the migration. Monitor the new store closely during the first days and weeks.

Watch for:

  • Import and application errors
  • Checkout or payment failures
  • Inventory discrepancies
  • Customer activation problems
  • Missing images
  • 404 responses and redirect failures
  • Search Console indexing changes
  • Organic traffic to important landing pages
  • Core Web Vitals regressions
  • Integration failures involving ERP, PIM, 3PL, or marketing tools

Review 404 logs daily at first. A high-value URL without a redirect should be fixed immediately.

Also define who owns each type of post-launch incident. A clear escalation path prevents payment, fulfilment, or SEO problems from sitting unnoticed between teams.

Production Migration Checklist

Before approving launch, confirm that:

  • [ ] Every data domain has an owner and migration decision.
  • [ ] Source counts and important URLs have been recorded.
  • [ ] Field mappings have been reviewed.
  • [ ] Transformations are deterministic and repeatable.
  • [ ] Duplicate and invalid records have documented handling rules.
  • [ ] API retries and rate limits are handled.
  • [ ] Source and Shopify IDs are mapped.
  • [ ] Products, customers, orders, and content have been reconciled.
  • [ ] Redirects have been imported and tested.
  • [ ] Internal links use the new URL structure.
  • [ ] Customer account activation has been planned.
  • [ ] A real end-to-end order has succeeded.
  • [ ] The incremental sync has been rehearsed.
  • [ ] A rollback or contingency plan exists.
  • [ ] Post-launch monitoring and ownership are assigned.

Final Thoughts

The difficult part of a Shopify migration is not moving rows from one database to another. It is preserving meaning across two different commerce models.

A reliable migration is built around three principles:

  1. Make it repeatable. A migration that cannot be rerun safely is difficult to test and risky to launch.
  2. Make it measurable. Counts, ID maps, reconciliation reports, and automated checks turn assumptions into evidence.
  3. Treat SEO and integrations as core data. Redirects, payment flows, fulfilment events, and customer activation are part of the migration—not cleanup tasks.

When the pipeline is repeatable and the results are measurable, launch day becomes a controlled cutover rather than an experiment.

For migration costs, timelines, platform comparisons, and guidance on deciding between a DIY and agency-led project, see the original Shopify migration guide.

Top comments (0)