Key takeaways
- Lower the TTL a day ahead so the DNS switch is fast.
- Test on the new server with your hosts file before changing DNS.
- Keep the old hosting for a few days after the switch.
A careful migration lets visitors keep using the old site until the new one is ready, then switches over in minutes.
1. Prepare
- Lower the DNS TTL for your domain to 300 seconds at least a day before the move.
- Inventory everything: website files, databases, email accounts, cron jobs, DNS records and SSL needs.
2. Copy the site
- Download your files and export databases from the old host.
- Upload files to the new host’s document root.
- Create a new database and user, import the data and update the app’s configuration (for WordPress,
wp-config.php).
3. Test before switching DNS
Preview the site on the new server before changing DNS. Edit your computer’s hosts file to point the domain at the new IP:
203.0.113.10 example.com www.example.com
Check pages, forms, logins and checkout. Remove the line when you’re done.
4. Move email
Create the same mailboxes on the new host. If you need old mail, migrate it with an IMAP migration tool or by connecting both accounts in an email app and copying folders.
5. Switch
Update the A records (or nameservers) to the new host. Because the TTL is low, most visitors move within minutes.
6. Afterwards
- Run AutoSSL on the new host.
- Keep the old hosting active for a few days in case anything was missed.
- Raise the TTL back to a normal value.