Moving hosts without losing a minute

A host migration done well is a non-event: visitors don’t notice, orders keep coming in, and rankings don’t move. That comes down to doing things in the right order.

A day or two before

  • Lower the DNS TTL on the records you’ll change, to around 300 seconds. When you switch, the change then spreads in minutes instead of hours.
  • Match the environment. Same PHP version and extensions, same database engine, enough memory, and any cron jobs the site depends on.
  • Take inventory of everything that isn’t the website: email hosting, SPF/DKIM/DMARC records, subdomains, and third-party services that whitelist your server’s IP.

Copy and test

  1. Copy the files and database to the new server.
  2. If the domain or path is changing, run a search-and-replace that understands serialized data. On WordPress, wp search-replace handles this; run it with --dry-run first.
  3. Point your own computer at the new server with a hosts-file entry and click through the site: forms, checkout, logins, search.
  4. Make sure HTTPS will work the moment traffic arrives, either with a certificate issued through a DNS challenge or by installing the existing one.

The switch

  1. Pause content changes, or schedule the move for a quiet window.
  2. Do a final sync of the database and uploads.
  3. Update DNS to the new server.
  4. Leave the old server running, unchanged, for at least 48 hours in case any traffic still arrives there.

After the move

  • Test every form and confirm that emails send and arrive.
  • Watch the server logs and Search Console for new 404 or 5xx errors.
  • Check that backups and monitoring are running on the new server.
  • Put the DNS TTL back to a normal value once everything is stable.

We follow this list on every migration in our server management work.

One useful email a month

Practical tips on keeping a website fast, secure and easy to find. No spam, and you can unsubscribe any time.

We’ll email you a link to confirm. See how we handle your data in our privacy policy.

Keep reading