✓ 99.9% UPTIME ✓ 24/7 SUPPORT ✓ SINCE 2016 Status Looking Glass +92 312 6565434
Troubleshooting · 2026-11-21 · Zain Ul Abddin

How to migrate a website to a new host without losing orders

A step-by-step migration with DNS pre-work, serialized search-replace, checkout testing and a rollback window — plus the five mistakes that cost sales.

Network cabling during a hosting migration

Most migrations are not technically hard. They fail on sequencing: the database is copied before the last order, DNS is switched before the checkout is tested, or the old host is cancelled the same afternoon. Here is the order that keeps sales flowing.

Before anything: measure and stage

  1. Inventory. Files, database size, cron jobs, mail accounts, DNS records, SSL, third-party integrations (payments, shipping, ERPs), and any hard-coded IP allowlists at your providers.
  2. Lower DNS TTL to 300s. Do this 24 hours ahead. It is the single most useful pre-step and costs nothing.
  3. Provision the target. Same PHP version, same extensions, same database engine. A migration is not the moment to also upgrade PHP.

Copy, then fix, then test — in that order

Copy files first, then the database. If the site is live, take a second database dump right before the switch; the first one is for testing only.

Then fix URLs. WordPress stores serialized data, so a naive SQL UPDATE corrupts widgets and options. Use a serialization-aware tool:

wp search-replace 'https://old.example' 'https://new.example' --all-tables --precise --dry-run
wp search-replace 'https://old.example' 'https://new.example' --all-tables --precise

Test on the new server using a hosts-file override or a temporary subdomain — never by pointing the live domain first. Walk the whole funnel: home, category, product, add to cart, checkout, payment callback, order email, admin order view.

The switch window

  1. Put the old site in maintenance mode (or pause checkout) for the duration.
  2. Take the final database dump and import it.
  3. Re-run the URL replace if the domain did not change (it usually has not, so this is a no-op).
  4. Switch DNS A records, both apex and www.
  5. Clear caches: host cache, CDN, WordPress object cache, browser.
  6. Place a real test order with a live payment method and refund it.

Total downtime should be minutes, and mostly the maintenance window, not the DNS propagation.

After the switch: the 72-hour list

  • Watch the error log, not just the front page. 404s on images and 500s on admin-ajax show up there first.
  • Re-check cron: WordPress scheduled events, cPanel cron, queue workers, backup jobs. They never migrate themselves.
  • Re-verify email. SPF, DKIM and DMARC records may still point at the old host.
  • Confirm SSL renewed on the new server and that the certificate covers www.
  • Keep the old host running for 72 hours. Cancel after the first clean Monday.

Five mistakes that cost real sales

  1. Testing on the live domain. Customers find the broken checkout before you do.
  2. Ignoring mail. Orders arrive, but password resets and invoices do not.
  3. Forgetting cron. Stock sync and abandoned-cart emails silently stop.
  4. Cancelling early. The moment you need the old copy is the moment it is gone.
  5. Changing two things at once. New host plus new PHP plus new theme equals an unfixable bug hunt.

How we run migrations

Free cPanel-to-cPanel migration is included, and WordPress moves follow the same sequence above with the checkout test done before DNS. If you would rather not touch it, we schedule the window and hand back a working store. See cPanel hosting or KVM VPS.

Questions from readers

How much downtime should I expect?

Minutes, if DNS TTL was lowered in advance and the database is re-imported during a maintenance window. Propagation is the variable, not the copy.

Will my email move too?

Mailboxes need their own migration step. We copy mail on cPanel-to-cPanel moves; on other stacks we help you recreate accounts and re-point SPF, DKIM and DMARC.

Can you migrate a WooCommerce store?

Yes, including orders, customers and serialized settings, with a live test order before the DNS switch.

Need this set up for you?

Managed VPS and Windows RDP from $12.50/mo, with the stack installed before handover.

Chat on WhatsApp See prices