How to Migrate a WordPress Website to a New Server Without Downtime

Written by

in

Moving a WordPress website to a new server does not have to mean downtime. With some preparation, visitors keep seeing the old site until the new one is tested and ready. This is the process we follow.

1. Lower your DNS TTL in advance

TTL controls how long DNS answers are cached. A day or two before the move, lower the TTL on your A record (and the www record) to 300 seconds, so the final switch takes effect quickly.

2. Take a full backup

Back up all website files and the database before you change anything, and keep a copy somewhere other than the old server.

3. Copy the files and the database

Copy the WordPress files, including wp-content with your themes, plugins and uploads, to the new server. Export the database from the old server, create an empty database and user on the new one, and import the export.

4. Update wp-config.php

Set DB_NAME, DB_USER, DB_PASSWORD and DB_HOST to match the new server. If the domain name stays the same, you do not need to change the site URL.

5. Test before you switch

Edit the hosts file on your own computer so that your domain points to the new server’s IP address. Only you will see the new server. Browse the whole site, log in to the dashboard, test forms and, if you have a shop, test checkout. Remove the hosts entry when you are done.

6. Do not forget email

If your mailboxes live on the old server, recreate them and move the mail across. If you change nameservers, make sure every DNS record, including MX, SPF and DKIM, exists in the new DNS zone before you switch.

7. Switch DNS

Point the A record, or the nameservers, to the new server. Because you lowered the TTL earlier, most visitors will reach the new server within minutes.

8. Keep the old server for a few days

Leave the old account active for at least 48 hours in case some DNS caches are slow to update. Meanwhile, check the SSL certificate, save the permalinks again (Settings, then Permalinks), test your forms and confirm that backups and scheduled tasks are running.

Prefer to hand it over? We handle website migrations between servers, from €79.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Ready to talk about your website?Get a free quote