|

How to move WordPress to a new host without downtime

Hostnado is reader-supported. If you buy through our links we may earn a commission, at no extra cost to you. It never changes our scores. How we make money

2 min read
On this page
  1. 1. Lower your DNS TTL a day before
  2. 2. Take a full backup
  3. 3. Set up the new host
  4. 4. Test before anyone else sees it
  5. 5. Switch DNS and keep the old host for a week

Moving a WordPress site sounds risky, but the trick is simple: build a full copy on the new host, test it privately, and only then point your domain at it. Visitors keep using the old host until the moment the new one is ready.

1. Lower your DNS TTL a day before

In your DNS provider, set the TTL (time to live) of your domain’s A record to 5 minutes. When you switch later, the change spreads quickly.

2. Take a full backup

Use a plugin such as UpdraftPlus or All-in-One WP Migration to export your files and database, and download the backup to your computer as well.

3. Set up the new host

  1. Add your domain to the new hosting account (don’t change DNS yet).
  2. Install a fresh WordPress and the same migration plugin.
  3. Import or restore your backup.

4. Test before anyone else sees it

Point the domain to the new server on your own computer only, by editing your hosts file, then click through the site, log in and test forms and checkout.

# macOS / Linux: add a line to /etc/hosts
$ sudo nano /etc/hosts
# 203.0.113.10  example.com  www.example.com

Freeze changes

Pause comments, orders or new posts during the switch, or re-export just before you change DNS, so nothing written on the old host gets lost.

5. Switch DNS and keep the old host for a week

Update the A record to the new server IP. Remove the line from your hosts file, check SSL is issued on the new host, and keep the old account running for a few days in case you need something from it.

Leave a Reply

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