Looking for something?

How to move your WordPress website to a different host

I’m often asked if it is possible to move your self-hosted WordPress website from one host to another.

The answer is yes!

If you aren’t happy with your current hosting provider then you don’t have to stick with them forever! You can move to a new host when ever you like.

There are many reasons why you might choose to move hosts. Maybe their introductory price for the first year was attractive, but you aren’t pleased with the huge renewal price. Maybe they’re slowing down your website, or perhaps their support isn’t good enough. Or maybe you don’t have access to your website files and you are limited to what you can do with your website.

What ever the reason is, if you want to move hosts then this post is for you. I promise, it’s easier than it looks! Plus, I’ve created a free printable checklist to guide you through the process.

In this post I’ll show you how to move your WordPress self-hosted website from your existing host to a different host.


Content

Click the links below to navigate through the post:

1 | Purchase your new hosting package

First things first you need to purchase hosting with your new hosting provider of choice.

Who you choose to purchase your hosting from is entirely up to you. But keep in mind that you are going to need to access your website files so you can upload your exported website, so make sure you will have the ability to do this before you purchase your hosting (i.e. don’t choose a managed hosting package).

Ideally, you will want a host that gives you access to cPanel because it will make your life so much easier!

I personally use and recommend Namecheap (affiliate link) for hosting. I have been a Namecheap customer for over 7 years and truly love them. They’re packages are affordable and their customer service is fantastic.

For more information about purchasing hosting with Namecheap, check out this post.

Once you have purchased your hosting, make a note of your cPanel login details or your FTP credentials . You are going to need these later on!

2 | Install the Duplicator plugin

Now you have purchased your hosting, it’s time to export your WordPress website from your current server.

The easiest way to do this is using a plugin, and I recommend using the Duplicator plugin.

To install Duplicator, hover over Plugins in the left hand menu of WordPress and click Add New.

Once on the plugins page, use the search bar to search for a plugin called Duplicator. It looks like this:

Click Install Now and then when prompted to, click Activate.

3 | Create a package using Duplicator

Once you have installed and activated the Duplicator plugin, you will see a new item in the left hand menu called Duplicator. Hover over this item and click Packages.

In Duplicator you create packages which are essentially just backups of your website. These packages also come with a installer file which is used when you are moving your website from one host to another.

To create a new package, click Create New.

The first step in the process is to setup your package. Start by giving it a suitable name. I recommend leaving all the other settings as they are.

Click Next when you are ready to move on to the next step.

Duplicator will now run a test to make sure it is ready to export your website content.

Hopefully you will see lots of green boxes that say “Good” like in the image below. If you do see this then click Build to move on to the next step.

If you have any “Notice” warnings, like in the image below, it’s worth taking a look at these to see what you can do to fix them. Sometimes Duplicator will not be able to make a copy of your website if there are issues.

In this example, some of the media files were too large and there was an issue with the caching plugin I was using.

If you want to continue regardless of the warnings, tick the box next to Yes. Continue with the build process! and then click Build.

Duplicator will then begin building your package. This might take some time.

Once it is complete you will see the Package Completed confirmation page. As you will see there are two files to download. The first in the installer file that I mentioned before, and the second is the archive which is the backup of your website. The archive file in a compressed zip file.

Make sure you download both of these files ready for the next step. Again, this may take some time!

4 | Upload your Duplicator files to your new host

Now that you have the files created by the Duplicator plugin on your computer, you need to upload them to your new host. Remember, you need to upload both the installer.php file and the archive zip file.

The easiest and best way to do this is via cPanel’s File Manager. This is because the File Manager allows you to extract zipped files once they have been uploaded, and it is much quicker than uploading all the folders and files individually via FTP.

To access the File Manager, log into your cPanel account and click on the File Manager icon under the Files heading.

It looks like this in the old version of cPanel:

Once you are in the File Manager, click into the public_html directory. This is where you need to upload both your installer file and your archive zip folder.

Click Upload and then select the files you wish to upload. This may take sometime.

Once the files are uploaded, you will need to extract the zip file. To do this, right click on the zip file and click Extract.

Once the extraction process is complete you will be able to see of of the folders and files that make up WordPress.

Make sure you also upload the the installer.php file to the sale location as your archive files!

Now you’re ready to move on to the next step.

5 | Create a new database

Before we run the Duplicator installer we are going to create a new database for your WordPress website. You can actually carry out this step while running the Duplicator installer, but I’m going to explaining this process separately to make things less confusing.

To create a new database, log into cPanel, scroll down to the Database section and click MySQL® Database.

On the Datbase page, start by creating a database. All you have to do is enter a name for your database (“wordpress” is a good choice) and click Create Database. Make sure you make a note of this database name (including the prefix) as you will need this later.

Next you need to create a user for your database. Scroll down the page until you see the Add New User heading.

Start by giving your user a username, then choose a password. Again make a note of your username and password as you will need these later.

The final set in this process is to add the user you just created to the database you just created.

To do this, scroll down to the Add User To Database heading, then select your user and your database. When you’re ready, click Add.

You’ll then be asked to choose the privileges for this user. I suggest selecting All Privileges.

Now your database is ready to use.

6 | View your website on your new host locally

Now that you have uploaded your files to your new host and you’ve created your new database, you need to view the installer.php file you uploaded. The URL of this will be:

https://YOUR-DOMAIN.com/installer.php

However, if you load this page you will see that it doesn’t exist.

Why? Because you are viewing your website on your current host, not your new one. Your domain hasn’t been pointed at your new host yet!

At this point, you could update your domain so that it points at your new host, but this will cause your website to go down until you have set up your website on your new host, and I’m sure you don’t want this to happen.

So instead, what we are going to do is make some changes to your hosts files so that you can preview your website on your new host locally. And this means only you will be able to see the changes on your computer.

Sounds confusing and complicated? Don’t worry! I promise to make this a painless as possible.

Ok, first things first, you need to find out the IP address of your new server. Sometimes this will be in your welcome email from your host, but if not, the easiest way to find this out is via cPanel. Once you have logged into cPanel, look for a link to the Server Information. This is usually in the General Information box on the right hand side of the screen.

Click on this link to see more information about your server, including it’s IP address. The IP address will either be a shared or dedicated IP address.

Now make a note of this because you are going to need it later.

Now you have your server’s IP address you need to open the hosts file. Every computer will have this hosts files. I’m a Windows user so the instructions I am sharing here are for fellow windows users.

However, if you are a macOS or Linux user you should follow these instructions.

Now, normally when you open the hosts file and edit it, you aren’t able to save the changes you make. But we need to save our changes. So, instead of opening up a Notepad document as normal, you need to right click on the Notepad icon and click Run as administrator.

Once Notepad is open, click File then Open and navigate to C:\Windows\System32\drivers\etc. In the etc folder you should see a file called hosts. You need to open this file.

If you don’t see any files in the etc folder, click on the file type dropdown in the bottom right hand corner and select All Files. Now you should be able to see some files.

The hosts file should look a little something like this:

In this file you need to enter your server’s IP address followed by your website’s URL, like so:

You can add this anywhere in the file. Just make sure it’s on a new line, and IP address and URL are all on the same line.

Now save this file and open up the URL of your installer file again:

https://YOUR-DOMAIN.com/installer.php

You’ll know if this has worked because you will see the installer page instead of an error page:

If you aren’t able to see this installer page, I’d recommend hopping on a live chat with the support team of your new hosting provider. They will be able to check if the details you are adding to your hosts file are correct.

7 | Run the Duplicator installer

Now that you have a database it’s time to run the installer, so head back to installer.php page.

On the first page of the installer you will see some information about your archive and the validation checks that Duplicator runs.

If you see a “Warn” warning next to an item, click on the item to see more details.

As you can see here, I have a warning about the configuration file. To correct this I can just delete the wp-config.php file from the WordPress files on my new host. Then once  refresh the installer page I will see that this issue has now been corrected and I can continue running the installer.

If you are happy to proceed, tick the box next to I have read and accept all terms & notices then click Next.

Next you will be asked to enter your database details. Hopefully you will have already set up your database (and made a note of the name of database plus your username and password!) but if not, head back to step 6.

Once you have entered your database details click Test Database.

If your database passed the test you will see a success notification. If this is the case, click Next to continue.

If it doesn’t pass the test, you might need to double check that you entered the correct details.

On the next page you will be able to double check the settings for your new WordPress installation. Double check that the Site URL is the same as your current website URL.

You don’t need to create a new admin account as it will already import your existing admin account.

If you are happy to proceed, click Next.

You will be then asked to confirm that you want to install your Duplicator package. If you do, click Yes.

Finally you will be taken to the final page of the installer which looks like this:

Click Admin Login to login to your WordPress website. If you’ve left your IP address and URL in your hosts file then hopefully you will see your website running on your new hosting.

I always suggest making a small change to test that the admin area you are logged into is that of your new hosts not your existing one.

8 | Point your domain at your new host

The final step in this process is to point your domain at your new host. This means when some tries to visit your website they will be shown your website on your new host, not the one on your old host. You should only do this when you are happy that you have completed the migration process and it has worked.

In order to make this change, you first need to find out your nameservers from your new host. Sometimes your nameservers will be in your welcome email that you received when you purchased hosting. Sometimes they will be in your hosting admin area.

If you aren’t sure what your nameservers are it might be worth speaking to your host to find out what they are.

Once you know what your nameservers are, head over to the website where you purchased your domain from and log in to your account. In your account you need to look for where you should change your nameservers or DNS details. This will vary from one domain registrar to the next, so if you are unsure then you might need to Google it.

So if you purchased your domain from GoDaddy, you would Google “GoDaddy change nameservers”. Alternatively, if the option is available, hop on a live chat with support. They may even be able to update the nameservers for you.

You will need to remove the nameservers of your old host and replace them with the nameservers of your new host.

9 | Wait for propagation

Once you have updated your nameservers, you need to wait for propagation to happen. This is when everything is updated so that when someone tries to visit your website they are shown your website on your new host. Depending on who your host is, this can take up to 72 hours to happen.

Don’t forget to remove your IP address and website URL from your host’s file because if you don’t you won’t know when your host has changed!

If you want to check which nameservers your domain is being pointed at, search for your website using this WhoIs Lookup tool.

Hopefully, you will see the nameservers of your new host here.


Grab your free checklist!

I have created a checklist for you to help you with the process of moving hosts, and you can find it in my freebies library. To access my freebies library and join my community just fill in the form below. Find out more information about my community right here.


Need help with moving hosts?

Perhaps the idea of moving hosts yourself seems a little overwhelming, and you’d rather hand over the process to someone else with more experience.

I offer hosting migrations as a part of my WordPress Support service and I would love to help you out.

Click the button below to find out more.

Help me move! 


How to move your WordPress website to a different host | HollyPryce.com


Comments

  1. Leah Mullins says:

    What a VALUABLE blog! I have heard SO many bloggers lament the process of changing web hosts. Thank you so much for providing this great information!

  2. […] copy of your WordPress files and the database that your website runs on. Duplicator can be used to move your website from one host to another, but it also provides an easy way to make a copy of your content so that you can create a local […]

  3. […] I have a tutorial which will take you through the process step by step. Alternatively, I can do the hard work for you! Find out more about my WordPress support services here. […]

Leave a comment

Comment

* = Required. Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.