Migrating a WooCommerce shop without losing orders

A brochure site can be copied at leisure, because it does not change while you copy it. A shop changes all the time: an order that comes in after you export the database is left out of the copy. So migrating a shop is, first of all, a problem of sequence: what you copy, at what time, and who takes orders afterwards. The rest (files, database, DNS) is what you already know from moving a site by hand.

The plan, in the right order

1 Take inventory. The payment and shipping plugins, the invoicing extensions, the PHP version, the scheduled tasks. If any depends on an address or an IP, note it.
2 Make a full backup and keep it off-site (your own backup).
3 Rehearse the migration on a test subdomain, end to end, and place a test order with the payment method in test mode (a test site before touching what is live). The rehearsal tells you how long the database import takes, which is the window in which the shop must be stopped.
4 Pick a quiet hour. Look in your statistics for when fewest orders arrive.
5 On the day, put the old shop in maintenance. No new orders come in from here on. If you left it open, orders placed after the export would be lost.
6 Export the database again (the final version) and copy the images and files that are new since the rehearsal. Import at the destination.
7 Change the DNS (migrating without downtime). While the DNS spreads, anyone still reaching the old server sees the maintenance page, not a shop where they would order into the wrong place.
8 Place a real order on the new site, pay it and refund it. Confirm the order e-mail arrived (WooCommerce e-mails not arriving).
9 Keep the old shop for a week and compare the order counts: none may exist only there.

What usually gets forgotten

Item What to check
Payment methods The return and notification addresses registered with the payment provider may still point at the old site. Some providers only accept requests from authorised server addresses: the new server’s IP is different. See getting paid in WooCommerce.
Scheduled tasks WooCommerce uses scheduled tasks for e-mails, order statuses and subscriptions. If WP-Cron fails, they sit still: swapping WP-Cron for a real server cron job.
Shop e-mails SPF and DKIM must still authorise whoever sends. Test an order.
How orders are stored According to WooCommerce’s settings, orders may live in their own table instead of WordPress’s general tables. A whole-database migration takes everything; a migration plugin has to support that mode. Check the shop’s advanced settings.
SSL certificate It is only issued after the domain points at the new server. Between the DNS and the certificate there can be a window without the padlock, and a shop without HTTPS must not take payments (no padlock on your site).
Products and images Compare the product count, and open one with variations and a gallery image.
Never leave both shops taking orders at the same time. Each has its own database: orders end up split and merging them is manual, order by order. One of them is always in maintenance.
No real payments in the rehearsal. On the test site, set the payment method to test mode or switch it off, and stop e-mails to customers. A rehearsal site wired to real payment charges for real.
To change platform, not just server, the road is different: see changing shop platform. And to carry only the products, the CSV export is in importing and exporting products with a CSV file.

About to migrate a shop and want to review the plan with us before the day? Write to us.

Open a support ticket

SEE ALSO

How to migrate a site without downtime

A test site before touching what is live

WooCommerce: what it is, and what you need before you start

Hosting migration

RECOMMENDED PRODUCT

WordPress hosting

One-click install, updates handled, and speed that holds up. from $6.60/mo (3-year plan, with coupon)

See plans
  • 0 Users Found This Useful
Was this answer helpful?