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
- Copy the files and database to the new server.
- If the domain or path is changing, run a search-and-replace that understands serialized data. On WordPress,
wp search-replacehandles this; run it with--dry-runfirst. - Point your own computer at the new server with a hosts-file entry and click through the site: forms, checkout, logins, search.
- 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
- Pause content changes, or schedule the move for a quiet window.
- Do a final sync of the database and uploads.
- Update DNS to the new server.
- 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.