Guide WordPress

How to move WordPress to a new host

Copy the files and database across, update the configuration, test before anyone sees it, then switch DNS with the old site still live.

Updated 10 min read Intermediate

Moving WordPress to a new host is the same files-and-database copy as any backup or restore, done between two live servers instead of to and from an archive. Handled in the right order, the old site keeps working the entire time you are building the new one, and nothing goes offline until you choose to switch.

You do not have to do this yourself

Free migration is included with hosting here, and our support team can move the site for you. The rest of this guide is for anyone who wants to do it themselves or understand what is involved.

Step 1: back up the current site

Before anything else, take a complete backup on the old host — files and database together. This is your safety net if anything goes wrong during the move, and it is also, conveniently, most of what you need to actually perform the move. See backing up a WordPress site.

Step 2: set up the new hosting account

On the new host:

  • Add the domain to the account, even though it is not pointing here yet.
  • Create a new database and a database user with full privileges on it, and note the name, username, password and host.
  • Confirm the PHP version matches, or is at least compatible with, what the site was running on the old host.

Step 3: copy the files

Two practical options:

  • Direct transfer: if both hosts support it, a migration tool can copy files straight from the old server to the new one without you downloading and re-uploading anything, which is considerably faster for a large site.
  • Download and upload: download the full files backup from the old host, then upload it to the new one through FTP or the file manager and extract it into the web root.

Either way, the entire WordPress install needs to arrive — wp-admin, wp-includes, and critically all of wp-content, since that is where your theme, plugins and uploaded media live.

Step 4: import the database

Import your exported .sql file into the new database using phpMyAdmin, following importing a database with phpMyAdmin. If the export is too large for a browser upload, that guide also covers importing over SSH.

Then open wp-config.php in the newly uploaded files and update the four database constants to match the new account:

define( 'DB_NAME', 'new_database_name' );
define( 'DB_USER', 'new_database_user' );
define( 'DB_PASSWORD', 'new_database_password' );
define( 'DB_HOST', 'localhost' );

Step 5: test before switching anything

The domain still points at the old host at this stage, so the new copy is not reachable by its normal address yet. Preview it one of two ways:

  • A hosts file entry on your own computer, which points just your machine at the new server's IP address while everyone else still sees the old one. See previewing a site with your hosts file.
  • A temporary URL your new host may provide, which reaches the account directly without needing DNS to be pointed there.

Click through the site properly: the homepage, a handful of inner pages, the admin area, any forms, and — if it is a shop — the checkout. This is the point to catch a problem, while the live site is still safely on the old host and nobody is affected.

Links pointing at the wrong place during preview

While previewing through a hosts file or temporary URL, links, images or the admin area may point at the old address if the site URL is hardcoded somewhere. This is often cosmetic during preview and resolves once DNS is switched — but if wp-admin will not load at all on the new copy, see changing a WordPress site URL.

Step 6: point the domain at the new host

Once you are satisfied the new copy works, update DNS — either the nameservers or the relevant A record, depending on your setup. Leave the old hosting active and do not cancel it yet: DNS changes spread gradually, so for a period some visitors will reach the old server and some the new one. As long as both are running and both hold the same content, nobody notices the difference.

Step 7: after the switch

  • Wait before cancelling the old hosting. Give DNS a day or two to fully settle before switching the old account off.
  • Check email is unaffected, particularly if mail was hosted on the old account.
  • Update any hardcoded references to the old server's IP address, if you used any anywhere outside WordPress itself.
  • Re-check SSL. If the domain is newly added to the new account, issue a fresh SSL certificate there before or immediately after the switch so visitors are not shown a warning.

For a broader checklist that applies beyond WordPress specifically — SEO considerations, DNS timing, and what people most often forget — see the website migration checklist.

Frequently asked questions

Will there be any downtime?

Not if you follow this order. The site keeps running on the old host while you build and test the copy on the new one, and DNS is only changed at the very end, once the new copy is confirmed working. There is a short window while DNS updates where different visitors may reach either server, but both are serving the working site.

What about email during the move?

If your email is hosted separately from your website — a common setup — it is unaffected by a website-only migration. If your email runs on the same hosting account as the site, plan that part separately; see keeping email working during a migration.

Is migration free?

Free migration is included with hosting here — our support team can carry out the transfer for you rather than you doing it by hand, which is worth using if the site is large or you would rather not risk it yourself.

Related reading