A WordPress WooCommerce store is moving from Shopify to WooCommerce, or from Magento to WooCommerce, or from one WooCommerce host to another. The catalogue is 12,000 SKUs, the order history is 80,000 records, there are 14,000 active customers and 800 active subscriptions. The migration plan needs to land all of this without losing orders, breaking customer logins, or invalidating subscription tokens that the new payment gateway will not accept. Most “migration” articles cover Shopify-to-WooCommerce import; this one covers the WooCommerce-to-WooCommerce case, which is harder than expected.
What’s happening
A WooCommerce-to-WooCommerce migration moves these data classes:
- Products and variations. WooCommerce uses
wp_posts(post_typeproduct,product_variation) plus extensive postmeta. Categories and tags live inwp_terms/wp_term_taxonomy. - Orders. Either
wp_posts(legacy) orwc_orders+ related tables (HPOS). Both must be migrated to whichever scheme the target store uses. - Customers. WordPress users (
wp_users,wp_usermeta) plus the WooCommerce customer lookup table (wp_wc_customer_lookup). - Subscriptions.
shop_subscriptionpost type with linked renewal-payment metadata. - Coupons, tax rates, shipping zones, payment gateways. Configuration that needs to be reconstructed.
- Uploads. Product images, downloadable products. Usually 50 GB to 500 GB.
Five common pitfalls:
- Customer passwords do not migrate. WordPress uses phpass-hashed passwords. If the source store also uses WordPress, the hashes can move. From Shopify or Magento, customers need a password reset on first login.
- Payment-method tokens are gateway-locked. A Stripe customer ID on store A is not transferable to store B unless both stores point at the same Stripe account. Same for PayPal billing agreements and Square card-on-file tokens.
- HPOS state mismatch. Source is HPOS-authoritative, destination is legacy posts (or vice versa). Order data needs translation.
- Product attribute taxonomies. Source uses
pa_size, destination usespa_size_global. Attribute term mismatches break variation parents. - Permalink structure drift. Old store has
/product/<slug>/, new store has/shop/<slug>/. Existing inbound links break. Need 301 redirects.
How to verify
# Before migration, inventory the source
wp wc product list --format=count
wp wc shop_order list --format=count
wp wc shop_subscription list --format=count
wp user list --role=customer --format=count
# Source's HPOS state
wp option get woocommerce_custom_orders_table_enabled
wp option get woocommerce_custom_orders_table_data_sync_enabled
# Plugin list — both stores should have the same active plugins for compatibility
wp plugin list --status=active --format=csv
# DB size
wp db size --tables --format=table | grep -E "wp_posts|wp_postmeta|wp_users|wc_orders" | head -20
# Uploads size
du -sh wp-content/uploads/
# Existing redirects (if migration adds 301s)
wp db query "SELECT COUNT(*) FROM wp_redirection_items" 2>/dev/null # if Redirection plugin
# Currency, timezone, language
wp option get woocommerce_currency
wp option get timezone_string
wp option get WPLANG
# Existing customer count by source — do they match?
wp db query "SELECT COUNT(*) FROM wp_users"
wp db query "SELECT COUNT(*) FROM wp_wc_customer_lookup"
The single most useful pre-migration step is the side-by-side plugin inventory. If a plugin is active on source but not on destination, any data it created (custom postmeta, custom taxonomies, custom tables) is orphaned post-migration.
The fix
The migration runs in four phases.
Phase 1 — pre-flight on destination.
- Match plugin versions to source. Install and activate everything that runs on source.
- Match WooCommerce version to source — including HPOS state.
- Match PHP version, MySQL version, WP version to within one minor.
- Match permalink structure:
wp option get permalink_structure. - Match currency, timezone, language.
Phase 2 — bulk data import.
For a WooCommerce-to-WooCommerce migration the canonical tool is WP Migrate (paid) or wp db export + file sync.
# On source:
wp db export source.sql --add-drop-table
tar czf uploads.tar.gz wp-content/uploads/
# Transfer to destination via rsync over SSH
rsync -av source.sql uploads.tar.gz dest:/tmp/
# On destination:
wp db import /tmp/source.sql
tar xzf /tmp/uploads.tar.gz -C wp-content/
wp search-replace 'https://oldstore.com' 'https://newstore.com'
wp search-replace '/wp-content/uploads' '/wp-content/uploads' --dry-run # confirm paths
Phase 3 — delta and reconciliation.
Between Phase 2 and the cutover, orders keep coming in on the source. Capture the delta:
# Get IDs of orders since the Phase 2 export
SINCE='2026-05-26 12:00:00'
wp wc shop_order list --date_after="$SINCE" --format=ids > /tmp/new-orders.txt
# Per-order export-and-import (or use a proper migration plugin's delta mode)
for id in $(cat /tmp/new-orders.txt); do
wp wc shop_order get $id --format=json > /tmp/order-$id.json
# Replay on destination via wp wc shop_order create
done
For high-volume cases, schedule a cutover window with the storefront in maintenance mode. That gives you a stable export point.
Phase 4 — cutover.
- Source goes into maintenance mode (Coming Soon plugin, or a static maintenance page at the CDN).
- Capture the final delta.
- Apply DNS change to point to destination.
- Test checkout end-to-end with a real card on the destination.
- Update payment gateway webhooks to the new domain.
- Set up 301 redirects for any permalink drift.
Post-migration verification:
wp wc product list --format=count # should match pre-migration count
wp wc shop_order list --format=count
wp user list --role=customer --format=count
# Random spot-check
wp wc shop_order get $(wp wc shop_order list --per_page=1 --format=ids)
For the broader migration context, the existing cpwp-migrate-from-* family of articles covers host-specific cases (from Kinsta, WP Engine, GoDaddy). Pair with enterprise WordPress hosting for the cutover-window staffing.
Stack Harbor runs WordPress WooCommerce store-to-store migrations under enterprise WordPress hosting — the pre-flight, the delta capture, the DNS cutover, and the post-migration audit. If you are planning a migration with a non-zero order history, we can scope and run it.