Migrate WordPress from One Host to Another

A successful migration is all about preparation. Everything needs to be done step-by-step to make sure that it gets done right. It’s actually not that difficult to move WordPress from one host to another. It’s just a matter of following some steps and you’ll get it done. In this post I’m going to walk you through the steps you need to take to carry out a manual WordPress migration across web hosts. Here’s what you’ll need to get started:

  • Access to phpMyAdmin on your old and new host
  • Your FTP login credentials

The Steps

If you just want a quick checklist, here’s what you need to do:

  1. Back up your MySQL database
  2. Download your website’s files using FTP
  3. Create an add-on domain at your new host
  4. Create a new MySQL database
  5. Create a MySQL database user
  6. Upload your MySQL backup
  7. Edit wp-config.php
  8. Upload your files using FTP
  9. Update your Domain Nameservers

Let’s go through it in detail.

1. Back up Your MySQL Database

Log in to your hosting account and locate phpMyAdmin. The icon will look something like this:

the phpMyAdmin icon in CPanel

You may be asked to log into phpMyAdmin, in which case you will need your phpMyAdmin login details.

On the left hand side you will see a list of databases. Select the database you wish to migrate.

Tip: the below screenshots are taken from the latest version of phpMyAdmin. If your phpMyAdmin looks different and you’re finding them confusing, check out this guide on the WordPress Codex to Backing up WordPress. Then click on the export tab.

export tab highlighted

If asked, choose the custom export method.

Select all tables that you use for WordPress (if you have other programs installed in your database you may have other tables). WordPress tables will have the prefix wp_, unless you opted for another prefix upon install.

all of the wp tables selected

Under Format make sure you have SQL selected.

sql selected in dropdown menu

Under options make sure that the following are selected:

  • Add Drop table
  • Add Create Procedure
  • Create Table Options: auto_increment
  • enclose table and field names with backquotes

the options with the above selected

When you’re happy, click on Go.

 2. Download your Website’s Files using FTP

Open an FTP program such as FileZilla and connect to your server. You will need the following credentials to log in:

  • FTP username
  • FTP password
  • FTP hostname

If you don’t have these details, contact your web host.

Navigate to your website’s location and drag and drop the files from your remote server to your computer.

a picture of an FTP program. An arrow goes from the files on the remote server to an empty folder on the local computer.

3. Create an Addon Domain at Your New Host

You’ll need to create an addon domain at your new host where you can install WordPress. This basically means that you are adding your domain to your hosting account. Some hosting accounts do have restrictions on the number of add-on domains your hosting account can have.

In your CPanel, or whichever tool you manage your hosting with, find the Addon Domain icon. Add the domain that you are using for your WordPress installation.

a screenshot of the addon domain

Tip: If you are moving domains, things get more complicated as you need to replace references to the old domain in your database. I’ll cover that in a later tutorial. But if you are planning to search and replace on your database, you can safely do it using IT/Interconnect’s Search and Replace tool.

4. Create a New MySQL Database

Log in to your new hosting provider and create a new MySQL database. Click on the MySQL databases icon.

a screenshot of the MySQL icon in CPanel

Give your database a name and click create.

a screenshot of the form for adding a new database

5. Create a MySQL Database User

Your database needs a username and password which will be added to wp-config.php.

Tip: For security, we recommend that you create a new MySQL user and password for each database you use and for each piece of software included in that database. This ensures that, should one of your installations be compromised, the others are protected.

Create the database user.

a screenshot of the form fields for creating a new MySQL database user

Add the user to your new MySQL database.

a screenshot of the form for adding a user to a MySQL database

Be sure to make note your your database name, username and password.

6. Upload your MySQL Backup

Now that your database is created you can log in to it and upload the backup of your original website. Open up phpMyAdmin in your new hosting account and locate your newly created database. Click on it.

At the top of the screen you’ll see the import tab. Click on it:

a screenshot of the import tab in phpMyAdmin

Click on the choose button and find the backup you downloaded from your old hosting provider.

a screenshot of the upload fields for uploading a database back in phpMyAdmin

Click Go.

7. Edit wp-config.php

Locate your website’s files on your computer and open up wp-config.php

Locate these lines:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'database_name_here');

/** MySQL database username */
define('DB_USER', 'username_here');

/** MySQL database password */
define('DB_PASSWORD', 'password_here');

/** MySQL hostname */
define('DB_HOST', 'localhost');

Your own database credentials will be in there. Replace the credentials of the old database with the credentials for your new database that you’ve just created. These will be:

  • The name of your database
  • Your database username
  • Your database password

Save wp-config.php

8. Upload your Website Files Using FTP

Open up your FTP program again. This time navigate to your new remote server. You’ll get your details from your hosting provider.

Drag and drop your files from your computer to your live server:

a screenshot of Filezilla. The files on the local site are highlight and a red arrow indicates that they are to be dragged and dropped to the remote server

9. Update your Domain Nameservers

Finally, it’s time to update your nameservers at your domain registrar. This could be at your old hosting provider or at another domain registrar.

Log in to your domain registrar and locate your DNS settings.

a screenshot of the nameserver icon in GoDaddy

Add the nameservers for your new hosting account. These will have been provided to you when you signed up.

a screenshot of the dns form fields

Save and you’re done! Once your DNS are updated your site migration is complete!


My pages are showing 404 errors: how can I fix it?

Log in to your WordPress admin screens and navigate to Settings > Permalinks.

Select a different format for your permalinks, save, and then revert back to your preferred permalinks. This will flush your rewrite rules and should correct the problem.

Why is some of my functionality not working?

Check to make sure all of your plugins are activated. They may have become deactivated in the migration process.

Newsletter Signup

Laptop on desk

Ready to get started?

Tell us your story.

Let's Talk