Knowledge Base

How to Migrate a WordPress Site to a New Host

WordPress logo

This article will show you how to move a WordPress site to a new host.


1. Choose Your Method

A migration plugin handles small and medium sites well. For a large or busy site, moving the files and database by hand is more reliable, because plugins time out on big transfers.

2. Back Up Everything

Take a full backup of files and database from the old host, and keep a copy on your own computer before you start.

3. Export the Database

Export the database as a .sql file from phpMyAdmin on the old host.

4. Copy the Files

Download the WordPress directory, or move it host to host over SSH if you have access to both. The wp-content folder is the part that matters: themes, plugins and uploads all live there.

5. Create the Database on the New Host

Create a database and user, assign the user with full privileges, and import the .sql file.

6. Update wp-config.php

Change the database name, username, password and host to match the new server. The site will not load until these are right.

7. Test Before Switching DNS

Preview the site on the new server by editing the hosts file on your computer. Check the admin area, a few posts, and anything that submits a form.

8. Update the Site URL If It Changed

If the domain is changing as well as the host, the old address is stored throughout the database and needs a proper search and replace. Editing it by hand breaks serialised plugin settings.

9. Point the Domain and Watch

Switch DNS, then keep the old hosting for a fortnight. Check for broken images and missing uploads, the usual casualties of an incomplete file copy.


Next: How to Migrate a Website to a New Host covers email and the wider move.

Please rate this article to help us improve our Knowledge Base.

0 0