Guide to Migrate Your WordPress Site to a New Host

Migrating a website to a new host can be a very complicated and even dangerous process. The most common threat website owners face when migrating their sites is data loss, and we all know how troublesome that would be. But switching to a new hosting account is a process that requires much more than mere data backup. If you want to migrate your WordPress site to a new host without causing too much trouble for yourself, you will have to do everything by the book. In case you don’t know what by the book means in this case, don’t worry – we do!

In case you don’t want to migrate your WordPress site to a new host by yourself…

…you absolutely don’t have to! There are professionals who will gladly do the migration for you – if you pay a nice sum of money for their efforts, of course. Then again, you might be so lucky to stumble upon a hosting provider that offers site migration in their package of hosting services. Although that might not have so much to do with luck as it does with an effort on your side to find such a provider. However, what happens if you’ve found your perfect provider but they only have one flaw – they don’t offer site migration? Then you’ll have no other option but to migrate your site yourself. Don’t start panicking just yet – it just sounds much more complicated than it really is.

A pink piggy bank.
Can’t afford to pay for someone to migrate your WordPress site to a new host? No worries!

Install the Duplicator – a free site migration plugin

The Duplicator is a free plugin for WordPress site migration that comes highly recommended. That’s why the first step you should take is installing and activating the Duplicator. Once you have finished with this process, go to the Packages page in your admin area, and click Create New. Once you click on the Next button, you will be able to create your package. If the system scan checks out and shows Good results for every item, you can feel free to click on Build. With this plugin, you will have downloaded both the archive and installer files, and you will be able to move on to the next step.

Importing your site

To import your WordPress site to a new host, you can use FTP. Since you won’t be able to enter your website’s domain name as it is still pointing to the old host, the best option is to change your host’s file.

On windows navigate to C:\Windows\System32\Drivers\etc\hosts.
On Mac : /etc/hosts.

Open the file in any text editor. At the bottom of the page add the IP address of your new host and your domain name with and without www. Like this:

Now you will be able to see what is happening on your new hosting. Do not worry. This is only what you see, everyone else still sees your old website on your old hosting. We only changed the way your computer sees it.

And for what you need to do next, you will have to turn to your directory. If you have one website, it will be located in the public_html folder, this folder should be empty before you begin the process. If you have added an addon domain, locate to the folder in public_html that has the name of your domain. It should be empty. If not, make sure to delete everything inside. Be sure that you are in the right directory and right hosting account. Deleting these files on your live hosting will crash your website. However, you can be at ease knowing that you do have a backup version of your website, so if anything goes wrong, you can always get your website back.

You will have to upload both your archive.zip file and the installer.php file to the aforementioned directory. In case you check the directory and you see WordPress installed in it, you’ll first have to delete it and then proceed to upload the zip file and installer.php file.

Create a MySQL database on your new hosting account

In the cPanel dashboard of your new hosting account, you will be able to see a MySQL database icon. It will allow you to create a new database by providing a new name for it and clicking on the Create Database button. Once you are done with this part, find the MySQL Users section. In this part, you will need to come up with a new username and password that you will use later on, so make sure you write this information down. With this, you will create a new user.

A woman holding a laptop about to migrate your WordPress site to a new host.
Some pieces of information are too important to be lost.

Now add this user to your database with which you will grant it all permissions to work on the database. And just like that, your database is ready to be used and you have almost managed to migrate your WordPress site to a new host! But we aren’t quite there yet!

Run the installer

At this point, you are finally ready to begin the Duplicator migration process. And our team of WordPress experts salutes you – it took some work getting here. Navigate to http://www.example.com/installer.php where the example.com part will be replaced with your domain name. This will start the installer which will run a few tests and hopefully give you a passing mark when it comes to Archive and Validation. Once this happens, you will move on to step 2 out of 4 – entering the details of the database you created. Once the Duplicator connects, click Next to continue.

Step 3 shouldn’t give you any problems. Here, a person should update site URL or Path, but you are not changing domains, so this step is superfluous. By clicking Next, you will get to the final step of the process. You will be shown the login button, which will allow you to log into your website on the new host.

Finish up the migration of your WordPress site to a new host

By now, there’s only one thing left to do – update your DNS. To do that, you will need to switch your DNS nameservers. You will need the DNS nameserver information from your new host. Luckily, this is usually just a couple of URLs. In the end, you will need to change your NS server or A record. For this, you need to go to your domain and edit the DNS settings.

If you change the NS all of your records will point to the new hosting, including MX records which are used for mailing. If you are using webmail, this means you will have to create new emails on your new hosting account and will have to either migrate your emails to the new hosting or say goodbye to them.

The other option is changing your A record to point to your new hosting. This is the safer option, however, have in mind that the old hosting cannot be disabled or you will lose your emails and other records.

Now, the process of changing the DNS is different with every host. So it will all depend on the hosting provider you choose. Although you should know this isn’t something that will give you a lot of headaches. At least it shouldn’t be.

A thumbs up gesture.
Congrats – soon enough, it will all be worth the trouble.

In order to migrate your WordPress site to a new host, you will definitely have to go through some trouble. No one can deny that. And this is certainly not the simplest of processes, meaning you should have at least some background knowledge on the subject. But with a bit of guidance from our WP team, and all the tips you will be able to find online, migrating your website to a new host will be as easy as it can be.

https://pixabay.com/illustrations/piggy-bank-money-finance-banking-2889042/

https://pixabay.com/photos/analytics-computer-hiring-database-2697949/

https://pixabay.com/photos/thumbs-up-okay-good-well-done-2056022/

Stay Informed