You can move a Shopify catalogue into WooCommerce with the CSV exports Shopify gives you in its own admin, plus the WooCommerce product importer — but only products, customers and a flat record of past orders come across. Passwords, app-owned data, discount logic, subscriptions and the entire theme do not. The part that actually decides whether the migration makes or loses money is the URL map: Shopify’s /products/, /collections/, /pages/ and /blogs/ prefixes are fixed, WooCommerce’s are not, and every old URL needs a real 301 target. This runbook covers the whole sequence, in the order you should do it.
What you’ll accomplish
- Export products, customers and orders from the Shopify admin and know exactly what each file omits.
- Map the Shopify product/variant model onto WooCommerce variable products with global
pa_attributes, using a two-pass CSV import. - Import customers as WordPress users and stage historical orders as reporting records, not live gateway state.
- Build and verify a per-URL 301 redirect table from the old Shopify paths to the new WooCommerce permalinks.
- Cut DNS over with a verification pass and a rollback you can execute in minutes.
Prerequisites
- A Shopify store where you hold the owner or a staff account with export permission.
- WordPress 6.4 or newer with WooCommerce 8.0 or newer already installed on the destination, with a theme chosen and permalinks decided before any import runs.
- Shell access with WP-CLI 2.9+ on the destination, and
curllocally. - PHP
max_execution_timeof at least 120 seconds andmemory_limitof at least 512M on the destination for the import passes. - The Shopify store must stay live and publicly reachable until media sideloading is confirmed — the importer fetches images from Shopify’s CDN by URL.
- Run the pre-flight audit for a WooCommerce migration first; it catches the gateway and webhook work that this article assumes is already scoped.
How it works
Shopify’s admin exports three separate CSV files, and they are not a database dump. The product export gives you one row per variant, with rows sharing a Handle belonging to the same product. Product-level fields — Title, Body (HTML), Vendor, Type, Tags, Published — appear only on the first row of each handle group. Variant-level fields — Variant SKU, Variant Price, Variant Inventory Qty, Variant Barcode — repeat on every row. Options live in three fixed column pairs (Option1 Name / Option1 Value through Option3 Name / Option3 Value), which is the ceiling the export imposes: three options per product, whatever the storefront shows. Extra images ride along as additional rows carrying only Handle and Image Src.
WooCommerce’s importer reads a different shape. A variable product is a parent row with Type set to variable, and each variation is its own row with Type set to variation and a Parent column pointing at the parent’s SKU. Options become global attributes stored as pa_-prefixed taxonomies, declared per row through Attribute 1 name, Attribute 1 value(s) and Attribute 1 global. That last column is the one people miss: without it, WooCommerce creates a per-product custom attribute, and the variations never bind to it.
Three things are worth naming honestly. Collections are not in the product CSV at all — you export them separately or rebuild categories by hand. Customer passwords are hashed and never leave Shopify, so every customer resets on first login. And anything an app owns — subscriptions, loyalty balances, bundle logic, review bodies stored by a review app — lives in that app’s own database and needs its own export path or a rebuild.
Step-by-step
-
Freeze the catalogue and take the exports. In the Shopify admin, export Products (All products, plain CSV), Customers, and Orders. Stop merchandising edits from this moment; anything you change afterwards has to be re-done on the WooCommerce side. Confirm the product file’s header before you touch it.
head -1 products_export_1.csv | tr ',' '\n' | nl | head -40You should see a numbered list beginning with
Handle,Title,Body (HTML), and containing the threeOptionpairs plus theVariantcolumns. If your export is split across several numbered files, verify every one — Shopify can split a handle group across a file boundary. -
Capture the full URL inventory before anything changes. Shopify publishes a sitemap index at
/sitemap.xmlwith child sitemaps per content type. This list is the source of the redirect table, and it stops existing once the store is closed.curl -s https://oldstore.example.com/sitemap.xml \ | grep -oE 'https://[^<]+\.xml' \ | while read -r child; do curl -s "$child"; done \ | grep -oE '<loc>[^<]+</loc>' \ | sed -e 's|<loc>||' -e 's|</loc>||' \ | sort -u > shopify-urls.txt wc -l shopify-urls.txtThe count should be roughly your product count plus collections, pages and blog articles. If it comes back under 10 lines, the outer grep matched nothing and the sitemap index is shaped differently — open it in a browser and read the child URLs off manually.
-
Decide permalinks first, then never change them. WooCommerce stores its product and category bases in a single option. Set them in Settings > Permalinks before importing, because changing a base afterwards invalidates a redirect table you have already built.
wp option get permalink_structure wp option get woocommerce_permalinks --format=jsonExpect something like
/%postname%/from the first command and a JSON object withproduct_baseandcategory_basekeys from the second. Blank values mean the defaults are in force. -
Create the global attributes before the first import pass. Every option name that appears in the Shopify file — Size, Colour, Material — needs a matching global attribute so the importer can attach terms rather than invent per-product ones. The mechanics are covered in variable products and attributes setup.
wp wc product_attribute list --user=1 --format=tableThe table should list one row per attribute with its slug. A slug shown as
pa_sizeis what theAttribute 1 namecolumn should carry asSize. -
Run pass one: parent products only. Build a CSV that has one row per Shopify handle, with
Typeset tovariable(orsimplefor single-variant products),SKU,Name,Description,Categories,Tags,Images, and theAttribute 1 name/Attribute 1 value(s)/Attribute 1 globaltrio carrying the full pipe-separated list of that attribute’s values. Import it from Products > All Products > Import, mapping columns on the second screen. Then count.wp post list --post_type=product --post_status=publish --format=countThe number must equal your distinct handle count. If it is short, the missing rows failed on a duplicate SKU or an empty
Name— the importer’s completion screen names the rows it skipped. -
Run pass two: variations. One row per Shopify variant row,
Typeset tovariation,SKUfromVariant SKU,Regular pricefromVariant Price,StockfromVariant Inventory Qty, andParentset to the parent product’s SKU. Attribute columns carry the single value for that variation. Import, then verify.wp post list --post_type=product_variation --format=count wp db query "SELECT COUNT(*) FROM wp_posts WHERE post_type='product_variation' AND post_parent=0;"The first count should match your variant row count. The second must be
0— any orphan variation means itsParentvalue did not resolve to an existing SKU. -
Import customers, then force the reset. WooCommerce has no customer importer in core; WP-CLI does the job from the Shopify customer export reshaped to
user_login,user_email,first_name,last_name,role.wp user import-csv shopify-customers.csv --skip-update wp user list --role=customer --format=countEach row reports as created or skipped, and the count should match your export minus any address-only duplicates. Nobody can log in yet — passwords did not come across. Send a password-reset run as part of the launch announcement rather than letting customers discover it at checkout.
-
Stage orders as history, not as live state. Treat imported orders as a reporting archive. The gateway does not follow: a Shopify order marked paid has no corresponding charge object in your new Stripe or Moneris account, refunds cannot be issued against it from WooCommerce, and subscription schedules do not resume. Import them with a dedicated order-import tool or a script that builds orders through WooCommerce’s order API, set every one to a completed or cancelled status, and leave live processing to orders placed after cutover. Refunds for pre-cutover orders stay in the Shopify admin.
-
Build the redirect table. This is the step that pays for the migration. Shopify’s prefixes are fixed and yours are not, so each old path needs a target — an explicit row where the slug changed, a pattern rule only where the mapping is genuinely mechanical.
RewriteEngine On RewriteRule ^products/([^/]+)/?$ /product/$1/ [R=301,L] RewriteRule ^collections/([^/]+)/products/([^/]+)/?$ /product/$2/ [R=301,L] RewriteRule ^pages/([^/]+)/?$ /$1/ [R=301,L] RewriteRule ^blogs/[^/]+/([^/]+)/?$ /$1/ [R=301,L]Place these above the WordPress block in
.htaccess. They only hold where the Shopify handle and the WordPress slug are identical. Collections almost never are, so write those as explicit one-line rules generated fromshopify-urls.txt, and never point an unmatched path at the homepage. -
Re-do payments and tax from scratch. Gateway credentials, webhook endpoints and tax rules do not migrate in any file. Connect the gateway to the new domain, register its webhook URL against the WooCommerce endpoint, and rebuild the tax tables — Canadian sellers should follow GST/HST/QST tax rates setup rather than trusting an automatic rate service on day one.
-
Cut over. Lower the DNS TTL to 300 seconds at least 48 hours ahead. On the day: put the Shopify store in password-protect mode, run a final delta export of orders and customers created since the freeze, apply it, then repoint the A or CNAME record. Keep the Shopify account open and billable through at least one full refund window.
Validate it works
Check the redirects against a real sample of old URLs, not a handful you remember:
shuf -n 25 shopify-urls.txt | while read -r url; do
printf '%s <- %s\n' \
"$(curl -s -o /dev/null -w '%{http_code} %{redirect_url}' "$url")" "$url"
done
Every line must show 301 and a target on the new domain. A 200 means the request never left Shopify (DNS has not propagated to you yet); a 404 means that path has no rule and you have just found a gap.
Then confirm the chains actually land:
curl -sIL -o /dev/null -w '%{http_code} %{num_redirects} %{url_effective}\n' \
https://store.example.com/products/blue-widget
Expect 200 1 and the final product URL. A num_redirects above 2 means you have a rule chain — collapse it, because each hop costs crawl budget.
Finally, prove the catalogue is whole and purchasable:
wp post list --post_type=product --format=count
wp post list --post_type=product_variation --format=count
wp post list --post_type=attachment --format=count
wp wc product list --user=1 --per_page=5 --fields=id,name,price,stock_quantity --format=table
Counts should match your export, the attachment count should be close to your distinct Image Src count, and the product table must show non-empty prices. Then place one real test order end to end and confirm it settles in the gateway dashboard. The broader post-cutover checklist lives in the pre-migration inventory.
Troubleshooting
Variations import but the product page shows no options. The parent’s attribute was created as a per-product custom attribute instead of a global taxonomy. Check with wp term list pa_size --fields=name,count — if it returns nothing, Attribute 1 global was missing or set to 0. Delete the affected products and re-run both passes with the column set to 1.
Orphan variations after pass two. The Parent column matched nothing. WooCommerce resolves it against the parent SKU or against id: plus the numeric post ID. If your Shopify parents have no SKU of their own — common, because Shopify puts SKUs on variants — assign a synthetic parent SKU in pass one and reference that.
Images missing or the import stalls mid-file. Sideloading fetches every Image Src over HTTP during the import request. A Shopify store already taken offline returns 404s for all of them, and a large file will exceed max_execution_time before it finishes. Split the CSV into files of roughly 500 rows, keep Shopify reachable, and run wp media regenerate --only-missing --yes afterwards.
Duplicate products on a re-run. The importer matches existing records on ID or SKU. Rows with a blank SKU always create new products, so a second pass over the same file doubles them. Give every row a SKU before importing, and tick the update-existing option on the import screen when you intend a re-run.
Collection URLs return 404 after cutover. Shopify collection handles rarely equal WooCommerce category slugs, so the pattern rule silently produces dead targets. Generate an explicit rule per collection from shopify-urls.txt and verify each one with the curl sample above before you announce the launch.
When this is the wrong approach
Shopify is a genuinely good product, and several kinds of store should stay on it. If your revenue depends on Shopify-exclusive surfaces — Shop Pay’s conversion on returning customers, Shopify POS with retail hardware in a physical shop, or a checkout customised through Shopify Plus — you are trading a working system for a rebuild with no upside. Stores running native subscriptions or complex bundle apps face the hardest part of this migration, because that data has no CSV at all and the WooCommerce equivalents behave differently enough to need a fresh design.
The other honest boundary is operational. WooCommerce moves hosting, patching, backups, PHP upgrades and PCI scope onto you or your operator. A team without someone who owns that should not take it on to save on platform fees; the first incident costs more than the difference. And nobody should attempt this during a seasonal peak.
Where WooCommerce wins is control: your own database, your own checkout, no per-transaction platform cut, and a plugin surface you can extend without an app store’s permission. Verify the export shape against Shopify’s own help centre and the column reference in the WooCommerce product CSV importer documentation before you commit to a date, and read the WooCommerce CSV import walkthrough for the mechanics of the import screen itself.
Running WordPress that earns real money deserves an operator — Stack Harbor runs that stack under Enterprise WordPress; book an infrastructure consult.