Journal / Tutorial

Tutorial

How to migrate a WordPress site to a new host without downtime

How to migrate a WordPress site to a new host without downtime

A WordPress migration goes wrong most often not during the file transfer itself, but around DNS and timing. Here's an approach that keeps the live site online throughout.

Set up the new host before touching DNS

Get the site fully running on the new host first, reachable by its temporary hosting URL or IP address, with the old site still live and serving visitors at the real domain. Nothing about DNS changes yet — this step is purely about proving the new environment works.

Move the files and database

Most hosts and migration plugins handle this as one combined step: theme, plugins, uploads, and a full database export/import. Whichever method you use, the two must move together — a mismatch between an old database and new files (or vice versa) is the most common source of a broken migration.

Test thoroughly on the new host's temporary URL

Before changing anything DNS-related, click through the migrated site on its temporary address: check forms submit correctly, check the WooCommerce checkout if you have one, check that uploaded media actually loads. Domain-dependent things like some hardcoded URLs may look slightly broken at this stage — that's expected and gets fixed in the next step.

Fix hardcoded URLs

WordPress stores the site URL in the database in multiple places, and some plugins or page builders hardcode it directly into content. A search-and-replace tool (many migration plugins include one) run against the database, swapping the old domain for the new, resolves the majority of these issues in one pass.

Lower the DNS TTL in advance

A day or two before the actual cutover, lower your domain's DNS TTL (time-to-live) setting. This makes the eventual switch propagate faster across the internet once you do point the domain at the new host, shrinking the window where different visitors might briefly see different versions of the site.

Cut over, then verify from multiple locations

Update the domain's DNS to point to the new host. Because DNS propagation isn't instant everywhere, check the live domain from a few different networks or a DNS-propagation checking tool over the next few hours rather than assuming the change is instantly global.

Keep the old host running briefly as a safety net

Don't cancel the old hosting account immediately — keep it (and its now-outdated copy of the site) available for a few days in case DNS propagation reveals an issue only some visitors encounter. Once everything checks out everywhere, it's safe to close it down.