Migrating a WordPress Website: Here’s How to Do It

Switching web hosts and migrating your WordPress website doesn't have to be difficult. There are several good reasons to try your luck elsewhere: you can drastically improve your site's speed and uptime. It can also save you a significant amount of money.

Whatever your reason for wanting to move your website, you've come to the right place. I'm going to show you 3 ways to change web hosts – ranked from simple to complex.

Option 1: Choose a hosting provider that offers free website migration

By far the easiest method is choosing a hosting provider that offers a free migration service. An example of a hosting provider that does this is Cloud86 (read more about this provider in our Cloud86 review).

Cloud86 offers this service with all their hosting plans except for their cheapest one, the Webhosting Start plan.

Here are the things they will transfer for you:

  • Website
  • Database(s)
  • Email Addresses and Email
  • Domain name

After the migration, they perform a check to ensure everything is working properly. Only then do they transfer the domain name. Until that time, both your website and email address will continue to function with your old hosting provider. This approach minimizes downtime and other potential issues to an absolute minimum.

Below you'll find a few other solid providers that also offer a free migration service:

  • SiteGround – One of the most well-known web hosting providers worldwide. This provider is renowned for their excellent customer service. It's no surprise, then, that they also offer a free website migration service. Read our complete SiteGround review here.
  • Kinsta – Kinsta is a hosting provider exclusively for WordPress websites. The major advantage: you get access to an infrastructure that's 100% optimized for WordPress sites. This results in outstanding performance. Read our complete Kinsta review here.

Option 2: Use a WordPress site migration plugin

If your hosting provider doesn't offer a migration service, you can use a plugin instead. While there are multiple plugins available for this purpose, I recommend using All-in-One WP Migration. This plugin is free, easy to use, and lightweight. Here's how to migrate your website with All-in-One WP Migration.

Step 1: Install the plugin

This step is fairly straightforward. Go to your WordPress dashboard and click on Plugins » Add New. Then search for the All-in-One WP Migration plugin.

Installing the All-in-One WP Plugin

Install and activate the plugin.

Step 2: Export the existing website

Next, navigate to All-in-One WP Migration » Export. Click on the Export To button. You can then download your website to your desktop (using the “file” option) or to a cloud platform such as Google Drive.

Export your site with the All-in-One WP plugin

(By the way, also use this plugin as an external backup solution for your WordPress site, in case something ever goes wrong with the backups from your hosting provider.)

The export process starts automatically:

Step 3: Import the site

Create a fresh WordPress installation with your new web host and log in to the dashboard. Then install and activate the All-in-One WP Migration plugin.

Now navigate to All-in-One WP Migration » Import. Click on Import From and choose the method you just used when exporting your site.

Importing your site with All-in-One WP Migration

Now you just have to wait and… That's it. It's that simple to transfer a website using a plugin.

However, what should you do if you want to use the same domain name as before? The answer to that question depends on whether you've registered your domain name with an external service like Google Domains or with your host directly. The most convenient approach is to ask your new web host what the best course of action would be.

Option 3: Migrate your website manually

Finally, you can also migrate your website manually. This is relatively complicated, and you'll probably be better off choosing one of the options mentioned above.

Here's how the process works for manually moving your website:

Step 1: Purchase a hosting plan from a new hosting provider

Above you'll find some of my recommendations.

Step 2: Create a backup of your files

First, log in to your FTP server. Use an FTP client like FileZilla for this.

After that, locate the root directory of your WordPress website and select all files. Copy the files to your computer.

Step 3: Export the database

How you gain access to this varies by web host. Select the database you want to export and click on “Export.

Step 4: Create a database with your new web host

Now it's time to create a new home for the database you just exported.

Go to your new hosting provider and log in to your account. Navigate to the section about MySQL databases.

Create the following now:

  1. A new database
  2. A database user who has full access to that database
  3. A secure database password

Step 5: Modify the Config.php file

Now it's time to create a new home for the database you just exported. Look for a file called wp-config.php.

The first thing you need to do is make a copy of this file and save it in a secure location. Then open the original file with a text editor and navigate to the following section:

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');

Replace the text “database_name_here, username_here” and “password_here” with the database name, username, and password you just created.

Make sure you also save your MySQL server information instead of using “localhost.

Save the file when you're finished.

Step 6: Upload your files to the new web host

Once you've completed all this, it's time to perform this process in reverse. First, you need to upload the files to your new web host's server. This might take a little while.

Set up your FTP client and connect to the new server. Use your new server's IP address instead of your domain name, as your domain is still linked to your old web hosting. Contact your new host's customer support if needed.

When you're done, upload the files (along with the customized config.php file) to the new root directory.

Step 7: Import the database

The final step involves importing the database. To do this, log in to the database administration tool of your new server.

What is the best way to change web hosting providers?

Considering that many excellent hosting providers offer a free website migration service, there's very little reason not to take advantage of this.

It's fast, requires no effort on your part, and is handled by professionals.

If your new hosting (plan) doesn't offer a free migration service, I recommend using the All-in-One Migration WP Plugin. The manual method is quite complicated and can take a while.

Need to create a new WordPress website?

Perhaps you're not only looking to change web hosts, but also feel it's time to overhaul your WordPress website. If that's the case, check out our free WordPress guide. I'll walk you through step by step how to create a WordPress site the same way I built WebsiteGecko. I'll show you exactly which theme and plugins I used.