Written by 5:38 am Beginner’s Guide, Conversion Optimization Views: 0

How to Move a WooCommerce Store to a New WordPress Site Without Losing Customer Data or Orders

Moving a WooCommerce store to a new WordPress site without losing customer data, order history, or product inventory. This step-by-step guide covers database export, product migration, customer transfer, payment gateway reconnection, and post-move verification so you go live with zero data loss.

WooCommerce store migration guide showing 11-step checklist for moving to a new WordPress host without losing customer data or orders

Moving a WooCommerce store is not the same as moving a standard WordPress site. You have customer records, order history, product inventory, subscription data, and payment gateway connections that all need to survive the migration intact. Skip a step and you might go live missing 3 years of purchase history.

This guide covers every phase of a WooCommerce store migration: what to back up, how to move the database without corrupting order meta, how to reconnect Stripe or PayPal, and how to verify the new site is complete before switching DNS. No customer data lost. No orders gone. No subscriptions broken.


What Gets Migrated in a WooCommerce Move

Before running any migration plugin, know what you are moving:

Data TypeWhere It LivesRisk if Skipped
Products + variationswp_posts, wp_postmetaEmpty store on new site
Orderswp_posts (wc_order) or HPOSNo purchase history
Customerswp_users, wp_usermetaCustomers cannot log in
Couponswp_posts (shop_coupon)Broken promotions
Reviewswp_commentsLost social proof
Subscriptionswp_posts (shop_subscription)Failed renewals, chargebacks
Payment tokenswp_woocommerce_payment_tokensSaved cards stop working
Sessionswp_woocommerce_sessionsCarts empty on new site (acceptable)

The safest migration method is a full database export from the old site plus file copy, not a product-only export. Product-only exports via CSV miss order data, customer accounts, and subscription records entirely.


Before You Start: Pre-Migration Checklist

  • Put the old store in maintenance mode (WP Maintenance Mode plugin or simple .htaccess rule)
  • Take a full database backup with UpdraftPlus, All-in-One WP Migration, or phpMyAdmin
  • Record your WooCommerce version on the old site (check Dashboard > Updates)
  • Note which payment gateways are active (Stripe, PayPal, Square, etc.)
  • Note whether HPOS (High-Performance Order Storage) is enabled under WooCommerce > Settings > Advanced > Features
  • Download all plugin and theme ZIP files you will need to reinstall
  • Verify the new host has the same PHP version or higher (minimum PHP 8.1 for WooCommerce 9.x)

Do not migrate while orders are coming in. Set the old store to maintenance mode before you start the database export to avoid split order records.


Step 1: Back Up the Old Site Completely

Use UpdraftPlus to create a full backup that includes the database, plugins, themes, and uploads folder.

  1. Go to Settings > UpdraftPlus Backups on the old site
  2. Click Backup Now
  3. Check all boxes: database, plugins, themes, uploads, others
  4. Download the ZIP files to your computer when complete

If you prefer the command line, export with WP-CLI:

wp db export old-store-backup.sql --allow-root
tar -czf uploads-backup.tar.gz wp-content/uploads/

Store both files somewhere safe before touching anything on the new server.


Step 2: Set Up WordPress on the New Host

Install a fresh WordPress on the new server before importing anything. Use your host’s one-click installer or WP-CLI:

wp core download
wp config create --dbname=new_db --dbuser=new_user --dbpass=your_password
wp core install --url=https://newsite.com --title="Store Name" --admin_user=admin [email protected] --admin_password=secure_pass

Do not install WooCommerce yet. Import the database first, then activate plugins to avoid table conflicts.


Step 3: Import the Database

This is the step that moves all your orders, customers, products, and subscriptions.

Option A: WP-CLI (recommended for large stores)

wp db import old-store-backup.sql --allow-root

Option B: phpMyAdmin

  1. Log into phpMyAdmin on the new server
  2. Select the new database
  3. Click Import
  4. Upload your .sql file (split large files with BigDump if over 50MB)
  5. Click Go

After import, update the site URL if the new domain is different:

wp search-replace 'https://old-store.com' 'https://new-store.com' --all-tables --allow-root

The --all-tables flag is important for WooCommerce because order meta, customer addresses, and product data are spread across multiple tables beyond the standard wp_posts and wp_postmeta.


Step 4: Copy wp-content to the New Server

Copy the uploads folder, plugins, and themes from the old server to the new one. The uploads folder contains product images and downloadable files attached to orders.

# From the old server, rsync to new server:
rsync -avz wp-content/uploads/ user@new-server:/var/www/html/wp-content/uploads/
rsync -avz wp-content/plugins/ user@new-server:/var/www/html/wp-content/plugins/
rsync -avz wp-content/themes/ user@new-server:/var/www/html/wp-content/themes/

If rsync is not available, download via FTP and re-upload. It is slower but produces the same result.

After the file copy, set correct permissions:

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

Step 5: Update wp-config.php

Open wp-config.php on the new server and update the database credentials to match the new host:

define('DB_NAME', 'new_database_name');
define('DB_USER', 'new_db_user');
define('DB_PASSWORD', 'new_db_password');
define('DB_HOST', 'localhost'); // or your host's DB hostname

Also generate new salt keys. Visit https://api.wordpress.org/secret-key/1.1/salt/ and paste the output into wp-config.php, replacing the old keys. This invalidates old sessions for security.


Step 6: Verify the New Site Before Switching DNS

Before pointing your domain to the new server, test the new site using the hosts file trick. Add a line to your local machine’s hosts file that points the domain to the new server IP:

# On Mac/Linux: edit /etc/hosts
# On Windows: C:\Windows\System32\drivers\etc\hosts
1.2.3.4 new-store.com www.new-store.com  # replace with actual new server IP

Now open the site in your browser. You are viewing the new server while the old site still runs for everyone else. Check:

  • Products load correctly with images
  • Log in with a test customer account and verify order history shows
  • Add a product to cart and confirm checkout loads
  • Check WooCommerce > Orders and confirm past orders are present
  • Check WooCommerce > Customers and confirm customer list is present

For a full checklist of what to verify before and after DNS cutover, see our guide on how to migrate your WordPress site without downtime, which covers DNS propagation timing, TTL reduction, and rollback steps in detail.


Step 7: Reconnect Payment Gateways

Payment gateway API keys are stored in the WordPress database (wp_options table), so they come over in the database import. However, you need to verify they are still active and pointing to the correct accounts.

Stripe

  • Go to WooCommerce > Settings > Payments > Stripe
  • Verify the publishable key and secret key match your Stripe dashboard
  • If you moved domains, update the webhook endpoint in your Stripe dashboard: Developers > Webhooks > update endpoint URL to new domain
  • Send a test event from Stripe to confirm the webhook receives it

PayPal

  • Go to WooCommerce > Settings > Payments > PayPal
  • Re-enter your PayPal client ID and secret if the keys did not carry over
  • Update IPN notification URL in your PayPal account settings to the new domain

Always place a real $1 test order on the new site before going public. Refund it immediately after verifying the transaction appears in your payment gateway dashboard.


Step 8: Handle WooCommerce Subscriptions

If your store uses WooCommerce Subscriptions (the official extension), subscriptions come over in the database export. However, you must verify that recurring payment tokens and next-payment dates are intact.

  1. Go to WooCommerce > Subscriptions on the new site
  2. Verify subscriptions are listed with correct status (Active, On Hold, etc.)
  3. Check the next payment date for a sample of subscriptions
  4. Verify payment method column shows the correct gateway for each subscription
  5. If subscriptions show payment method as “Manual” after migration, the stored payment tokens did not transfer. Contact the extension developer for the token migration process specific to your gateway

Stripe payment tokens for subscriptions are stored in wp_woocommerce_payment_tokens and wp_woocommerce_payment_tokenmeta. These tables should have been included in your database export. If they were not, you will need to ask customers to re-enter their payment method at next renewal.


Step 9: Set Up HPOS if Enabled on Old Site

High-Performance Order Storage (HPOS) stores orders in custom database tables (wp_wc_orders, wp_wc_order_addresses, etc.) instead of wp_posts. If HPOS was enabled on the old site, these tables were included in your database export.

  1. Go to WooCommerce > Settings > Advanced > Features on the new site
  2. Enable High-Performance Order Storage to match the old site setting
  3. Run the data sync tool if prompted to synchronize legacy and HPOS tables

If HPOS was disabled on the old site, leave it disabled on the new site for now. You can enable and migrate later once the store is verified live.


Step 10: Flush Permalinks and Test Everything

After importing the database and setting up the new site, flush rewrite rules:

wp rewrite flush --allow-root

Or go to Settings > Permalinks and click Save Changes without changing anything.

Then run a full store test:

  • Browse shop page and category pages
  • Open a product and confirm images, variations, and Add to Cart button work
  • Complete a full checkout with a real or test payment method
  • Verify the order confirmation email arrives
  • Log in as a past customer and check account > orders shows history
  • Verify downloadable product links still work (check stored file paths in wp_postmeta)

If you encounter missing orders or corrupted data after migration, a complete database restore is faster than trying to reconstruct data manually. See our guide on how to restore your WordPress site from a backup for the full recovery process.


Step 11: Switch DNS and Monitor

Once the new site passes all your pre-launch checks:

  1. Lower your domain’s DNS TTL to 300 seconds (5 minutes) at least 24 hours before the switch. This speeds up propagation.
  2. Update the A record (or nameservers) to point to the new host’s IP
  3. Wait for DNS to propagate (5 minutes to 4 hours depending on TTL)
  4. Remove the hosts file override from your local machine and reload the site to confirm you are now hitting the new server
  5. Disable maintenance mode on the new site
  6. Monitor WooCommerce > Orders for the first 30 minutes to confirm new orders are coming in correctly
  7. Check your payment gateway dashboard (Stripe, PayPal) to confirm payment webhooks are being received

Keep the old server running for at least 72 hours after DNS switch in case any customer hits the old IP via cached DNS and you need to check what they saw.


Common WooCommerce Migration Problems

Missing product images

Images are stored in wp-content/uploads. If images are missing, the uploads folder was not copied correctly. Use rsync or FTP to re-sync the folder. Check that image file paths in the database match the actual file paths on the new server.

Checkout redirect loop

This happens when the site URL in wp_options still points to the old domain after a domain change. Run: wp search-replace 'https://old.com' 'https://new.com' --all-tables. Then flush object cache if using Redis or Memcached.

Stripe webhook 401 errors

The webhook signing secret is domain-specific. Go to Stripe Dashboard > Developers > Webhooks, delete the old endpoint, and create a new one pointing to https://new-store.com/?wc-api=wc_stripe. Copy the new signing secret into WooCommerce > Settings > Payments > Stripe > Webhook Secret.

WooCommerce session errors after migration

Sessions in wp_woocommerce_sessions are tied to cookies from the old domain. These will expire naturally. Customers may need to re-add items to their cart once. This is expected and harmless.


Migration Checklist: At a Glance

  • Old site in maintenance mode before export
  • Full database backup downloaded locally
  • wp-content/uploads copied to new server
  • Plugins and themes copied to new server
  • Database imported on new server
  • search-replace run on all tables for new domain
  • wp-config.php updated with new DB credentials
  • New salt keys generated
  • Site tested via hosts file before DNS switch
  • Products, orders, and customers verified
  • Payment gateway webhooks updated
  • Test order placed and refunded
  • Subscriptions checked for correct next-payment dates
  • Permalinks flushed
  • DNS TTL lowered 24h before switch
  • DNS switched and propagation confirmed
  • Old server kept running for 72 hours

Frequently Asked Questions

Can I use All-in-One WP Migration for a WooCommerce store?

Yes, for stores under 512MB. The plugin bundles files and database into one archive and handles the search-replace automatically. For larger stores, use the manual method with WP-CLI and rsync for more control and no file size limits.

Will customer passwords work on the new site?

Yes. WordPress stores passwords as bcrypt hashes in wp_users. The hashes come over in the database export and are independent of the server or domain. Customers log in with the same credentials.

Do I need to notify customers about the migration?

If you are keeping the same domain, no notification is needed. If the domain is changing, send an email to your customer list explaining the new URL before the DNS switch. Update the URL in your email marketing platform (Mailchimp, Klaviyo) too.

How long does a WooCommerce migration take?

For a store with under 10,000 products and 50,000 orders, expect 2 to 4 hours including setup, testing, and DNS propagation. Large stores with 100,000+ records and several GB of uploads can take a full day.

What happens to active carts during migration?

Shopping cart contents live in browser cookies and the wp_woocommerce_sessions table. Existing sessions will not transfer correctly and customers will see empty carts. This affects only in-progress sessions at the time of migration, not completed orders. Putting the old store in maintenance mode before export prevents new sessions from starting.


Ready to Migrate?

The full database method is the only migration approach that preserves every customer record, order, subscription, and product variation. Plugin-based CSV exports are fine for a product catalog seed, but they are not a migration strategy for a live store.

Put the old site in maintenance mode. Export everything. Test on the new server before DNS. Reconnect payment gateways. Monitor for 72 hours post-cutover. Do it in that order and you will not lose a single order.

Visited 1 times, 1 visit(s) today

Last modified: April 24, 2026

Close