WOOCOMMERCE
July 1, 2026

How to Move a WooCommerce Store Without Losing Orders

9 min read
Author
CloudStick Team
Security Specialist
Share this article
How to Move a WooCommerce Store Without Losing Orders
CloudStick
Migration Guide

The Live-Order Problem

A WooCommerce store never truly stops taking orders during a migration window unless you explicitly stop it — a customer can complete checkout on the old server seconds after you've started copying the database to the new one, and that order will not exist in your export. This is the single biggest risk specific to e-commerce migrations that a generic WordPress migration guide doesn't cover.

Freeze Checkout for the Final Window

WARNING

Schedule the final cutover during your lowest-traffic hours and put the store into maintenance mode (or at minimum, disable checkout) for the 10–15 minutes it takes to do the final database sync. Losing 15 minutes of checkout availability at 3 AM is recoverable; losing orders silently is not.

# WooCommerce CLI — put the store in a maintenance-like state
wp option update woocommerce_store_maintenance yes
# Or use CloudStick's maintenance mode toggle from the WordPress manager for a proper holding page

Migrate Orders, Products, and Sessions

With checkout frozen, take the final database dump — this now includes every order placed up to that second, with no risk of missing anything mid-transfer:

mysqldump --single-transaction --quick -u dbuser -p wp_store | gzip > wp_store-final.sql.gz
scp wp_store-final.sql.gz newuser@203.0.113.10:/home/new/
gunzip -c /home/new/wp_store-final.sql.gz | mysql -u dbuser -p wp_store

WooCommerce sessions (cart contents for logged-out users) live in the wp_woocommerce_sessions table and migrate automatically with the rest of the database — no separate step needed as long as you dump the full schema.

Verify Payment Gateway Webhooks

Stripe, PayPal, and most gateways send webhook callbacks to a URL tied to your domain, not your server IP, so webhooks continue working through the DNS cutover without reconfiguration — but verify this explicitly in your gateway's dashboard by checking recent webhook delivery logs after cutover, since a missed webhook (like a delayed payment confirmation) can leave an order stuck in 'pending' indefinitely.

Go-Live Checklist

Re-enable checkout only after confirming: the product catalog loads correctly, a test order completes end-to-end including the payment gateway's sandbox or a small real transaction, and email notifications (order confirmation, admin new-order alert) are actually arriving — SMTP configuration is a separate setting from the database and does not migrate automatically.

Leave a comment
Full Name
Email Address
Message
Contents