Moving to a new host without breaking anything
A move usually goes wrong in one of two ways. The email stops, because nobody knew it lived with the old host, or the old account is cancelled before the new one is working. This order avoids both.
The steps, in order
-
Find out everything the old host does
The website, certainly. But does the old host also handle your email, your domain registration or your DNS? Each of those needs its own plan, and email is the one people miss. If you aren't sure, the lookups in this guide will tell you.
-
Lower the TTL a day ahead
Every DNS record has a TTL, the time other computers may keep a copy of it. A day before the move, set the TTL on the website's records to five minutes, which is 300 seconds. When you make the switch, visitors follow it within minutes rather than hours. Do it at least as far ahead as the old TTL, or the old value is still being held.
-
Copy the site
The files and the database. For WordPress, a migration plugin does both, and many hosts will do the move for you when you join. Take a full backup from the old host at the same time and keep it yourself.
-
Test it on the new host before you switch
Most hosts give you a temporary address. If not, you can make only your own computer see the new host by adding a line to its hosts file, which is
C:\Windows\System32\drivers\etc\hostson Windows and/etc/hostson a Mac. The line is the new server's address followed by your domain, like the example below. Check every page and every form, then remove the line.203.0.113.10 example.co.uk www.example.co.uk -
Freeze changes
From the moment you copy the site until the switch, nobody should edit it. If it takes orders or bookings, pick a quiet time, and be ready to copy across anything that arrives at the old host during the changeover.
-
Switch the website's records
Change the website's DNS records to the new host's address. Change only those. Leave the mail records exactly as they are.
-
Let the new host issue a certificate
A free certificate can usually only be issued once the domain points at the new host, so expect a short window when the secure address isn't ready. Check the site on https once it is.
-
Keep the old account for a week or two
Some visitors and some mail servers will hold the old address for a while. Keep the old hosting running, check nothing is still arriving there, download a final backup, and only then cancel it.
If the DNS is moving as well
Moving the DNS to a new company means changing the nameservers, and every record has to be copied across first: the mail records, the SPF, DKIM and DMARC records, and any verification records for Google or Microsoft. Miss one and something stops, usually the email. Nameserver changes are also slower to settle, and 48 hours is the usual warning.
If the email is moving too
Treat it as a separate project, on a separate day. The new mail provider sets up the mailboxes, the existing mail is copied across, usually over IMAP, and then the MX records are changed to point at the new provider. Keep the old mailboxes open until nothing new has arrived in them for a few days.
Tell staff beforehand. Phones and laptops will need the new account settings, and a mailbox set up on a phone years ago will quietly stop receiving if nobody updates it.
If you would rather somebody sorted it
Ask me
If you would rather this was somebody else's job, I host WordPress sites on a server I configure myself, with one named person who knows your site. Existing sites can be moved in, and moved out again if you ever leave.
WordPress hosting and care, or write to info@dalaric.com and say what's wrong.
Short answers
Questions people actually ask
How long does DNS propagation take?
It is really caches expiring rather than anything spreading, and how long it takes is set by the TTL on the record you changed. Lower the TTL a day ahead and most visitors follow a change within minutes. Changing nameservers is slower, and 48 hours is the usual warning. Lowering the TTL.
Will moving my website to a new host affect my Google ranking?
Not if the addresses of your pages stay the same and the site is not down for long. Moving host changes where the site lives, not what it is. Changing the domain or the page addresses at the same time is a different and riskier job.
Do I need to move my domain when I change web host?
No. The domain can stay exactly where it is, and you change the record that says where the website lives. Moving the domain too is fine, but it is a separate job and best done on a different day.
Will my email stop working if I move my website?
Only if the email lives with the old host, or if the domain's DNS moves and the mail records are not copied across. Both are easy to check beforehand and very common to miss. If the email is moving too.
More guides
What kind of hosting you actually need
Shared, managed, a server of your own, and which one a small business needs.
Are you actually backed up?
The questions to ask before you need the answer.
My website is down
Is it just you, has the domain lapsed, or has the host stopped serving it?