
When changing hosting, a site moves without downtime in this order: inventory what's on the old hosting, shorten the DNS refresh time (TTL) in advance, copy the files and database to the new server, test the site without changing DNS, plan email separately, switch DNS to the new server last, and keep the old hosting open for at least two more weeks. In a move done in this order, visitors notice nothing.
In migrations, problems almost never come from the files. It's email that stops, a forgotten scheduled task, an order that lands on the old server mid-move, or an SSL certificate that didn't renew. The plan exists to catch these in advance.
1. Inventory: what's on the old hosting?
Make a list before you start. Go through these in the hosting panel:
- Site files and databases. Is there more than one site or subdomain?
- Email accounts. How many mailboxes, how many GB in total? Is email on this hosting, or on a separate service like Google Workspace or Microsoft 365?
- DNS records. Do the nameservers point to the host? If so, record every A, CNAME, MX and TXT record.
- Scheduled tasks (cron). Backups, newsletter sends, stock syncs and the like.
- PHP version and any custom server settings.
- SSL certificate and redirect rules (.htaccess).
The list takes ten minutes and prevents most of the 'why doesn't this work' questions after the move.
2. Shorten the TTL in advance
TTL decides how long DNS records are kept in caches across the internet. It's usually somewhere between a few hours and a day. 24 to 48 hours before the move, lower the TTL of the site's A record, and MX records if any, to 300 seconds (5 minutes). Then when you change DNS, most visitors move to the new server within minutes. We explain what DNS records do in our DNS settings guide.
3. Back up and prepare the new server
Take a full backup from the old hosting: all files and a database dump. Keep a copy outside the hosting too, on your own computer or in cloud storage.
On the new server, choose the same or a compatible PHP version. Upgrading PHP on migration day means making two changes at once. If something breaks, you can't tell which caused it. Do the upgrade separately once the move has settled.
4. Copy the files and database
Upload the files to the new server, create a new database and import the dump. On WordPress, update the database name, username and password in wp-config.php with the new details. If the domain isn't changing, you don't need to touch the site URLs in the database.
Many hosts offer a free migration service or a full cPanel-to-cPanel transfer tool. These can move files, databases and mailboxes in one go. Use them if you can, but still run the tests below afterwards.
5. Test without changing DNS
This is the most skipped step and the one that saves the most. If you add a line to your computer's hosts file mapping your domain to the new server's IP address, the site opens from the new server on your computer only. Everyone else keeps seeing the old site while you test the new one. Some hosts provide the same thing through a temporary preview address.
Test list:
- Do the home page and a few inner pages load, and do images appear?
- Can you log in to the admin panel?
- Does the contact form work and send email?
- On a store, does add-to-cart work and does the checkout page open?
- Do permalinks work, and are there pages returning 404?
Remember to delete the hosts file line after testing.
6. Plan email separately
If email lives on the old hosting, this is the most delicate part. Create mailboxes with the same names on the new hosting. To move messages from the old boxes, use the host's migration tool, a tool that syncs over IMAP, or have each user open both accounts side by side in their mail app and drag the folders across.
From the moment you change the MX records, new mail lands on the new server. During the switch some messages may arrive at the old mailbox for a few hours, so check the old boxes for a few more days.
If email is on Google Workspace or Microsoft 365, it's easy: don't touch the MX records, change only the site's A record. After the move you may need to update the SPF record to include the new server's IP; otherwise form emails sent from the site land in spam. We cover this in detail in emails going to spam.
7. The switch: change DNS
If you run a store or a site that receives forms constantly, schedule the switch for your lowest-traffic hour. If new orders were placed on the old site after the last backup, transfer the database once more right before changing DNS. Some shops post a short maintenance notice that pauses orders for this window.
Then point the A record (or nameservers) to the new server. If you shortened the TTL in advance, most visitors move within minutes. A nameserver change can take a few hours.
8. The first day after the switch
- Check the SSL certificate. If none is installed on the new server, visitors see the your connection is not private warning.
- Test the form and email again.
- Set up the scheduled tasks on the new server.
- Watch crawl errors in Search Console for a few days. If URLs didn't change, there's nothing to do on the SEO side. If URLs changed during the move, the 301 plan in how to protect SEO when moving a site is essential.
- Set up automatic backups on the new server and test a restore. The 3-2-1 rule from website backups applies here too.
Don't close the old hosting straight away. Keep it open for at least two weeks; it's the only place to go back to for a forgotten file or email.
If you're moving the domain too
Changing hosting and moving your domain to another registrar are separate operations. Don't do them on the same day; move the site first, and once it has settled, move the domain with the steps in our domain transfer guide. If you haven't chosen which type of hosting suits you yet, our shared hosting, VPS and cloud comparison will help.
If you'd rather not do the move yourself, or your site's store and email need to move together, write to us. We build the inventory and carry out the switch plan with you, without downtime.
Frequently Asked Questions
Does changing hosting affect my Google rankings?
Not if the URLs stay the same and the move has no downtime. If the new server is faster you may even see a positive effect. If URLs change, 301 redirects are essential.
How long does a DNS change take to spread?
Within minutes for most visitors if the TTL was shortened beforehand. If not, a few hours, and up to 24 to 48 hours on some networks. Nameserver changes usually take longer.
Will I lose emails during the move?
Not if you plan it. Create the mailboxes on the new server in advance, move the old messages, and keep checking the old boxes for a few days after the MX change.
When can I close the old hosting?
At least two weeks after you're sure everything works on the new server. Before closing it, download one last full backup to somewhere outside the hosting.
Blog posts are for general information only and are not a substitute for legal, financial or technical advice.
