How to Migrate a WordPress Site to Another Web Host?

How to migrate a WordPress site to another web host 1

Do you wish to transfer your WordPress site to a different server or a new web hosting provider? Though such transfers can be done, there are risks involved. When a website is moved to a different server or when web hosts are switched, there is a risk of losing data and downtime.

After reading this, you may get stressed out. Do not worry. In this article, we will tell you about ways to migrate your WordPress site safely to another host, and that too without any amount of downtime.

Also, we will try our best to answer questions that are frequently asked related to migrating a WordPress website to a new web hosting provider. These answers will save you from making few common mistakes.

WordPress Migration from Present Host to New

Please note, we wish to inform you that many WP hosting companies help in migrating the WordPress site for free.

They may not mention this on their site. Hence, you will need to ask them about this. Mostly, it is free. But few may ask to pay a small amount of fee.

Let’s understand the steps that are needed to shift WordPress from one hosting to another new one without any amount of downtime.

Step 1: Decide Upon Who your Next New WP Host Would be

If your web host is slow even after getting the WordPress performance and speed optimized, it is time to migrate your WordPress website to another web host. This new host should be able to manage the growing traffic of your WordPress site.

When you start searching for another WP host, you need to be very careful. You wouldn’t like to keep shifting from one host to another every now and then because of any bad choices made by you.

What we recommend:

According to us, Bluehost is a trustworthy shared hosting. has even recommended them officially.

Using our coupon of Bluehost, WP Beginner users can avail 60% discount and also a domain name for free.

If cloud hosting is on your mind, or if you are looking for some providers specifically based on their location, we suggest you look at SiteGround. Their data centers are in three continents.

In case you are interested in managed WP hosting, then you could check WP Engine as they are very popular and the best hosting providers.

Once you buy the new hosting, please do not try installing WordPress immediately after that. Wait for it. We will explain later.

Right now, what is needed is that your newly purchased account of web hosting should totally be empty. The main directory should not have any folders and files in it.

Step 2: Easy WordPress Migration to be Done by Setting Up Duplicator

At first, installing and activating the no charge plugin ‘Duplicator’ on your WordPress site that you wish to shift is important.

We highly recommend Duplicator, which is a plugin that is free. It can also help you in moving your WordPress site to a domain name that is new without any fear of losing SEO.

In today’s article, however, we will talk about how you could shift your WordPress website from your existing host to a new host with no downtime.

After installing and activating Duplicator, you will need to go to Duplicator’s page of packages that you will find in the admin area of your WordPress.

After this, click the button ‘Create New’ that you will find in the right corner at the top.

Then, hit the button ‘Next’. You will be needed to follow the required steps for creating your package.

Do check the results before clicking the button ‘Build’.

Few minutes may be needed to complete the process. So, keep the window open while the job is done by the plugin.

After the completion of the process, you will find the download options related to the Archive package and Installer.

You will have to click the link that says ‘One Click Download’. By doing so, both these files will get downloaded by you.

Your total website’s copy is known as the archive. The installer file helps you in automating the process of WordPress installation.

Step 3: Get your WordPress Site Imported to the Newly Chosen Host

After downloading the installer and archive files, you next need to get them uploaded to the new host.

This can be done by using FTP to connect to the new host.

Basically, when getting the FTP client connected, you will have to type in your site’s name as the host.

But, because the domain name of your WordPress site is pointed towards the old host, to make the connection, you will have to enter the IP address of your server or its hostname.

This information can be found by you from the cPanel dashboard of your new web hosting account.

How to find the server’s hostname or IP address in the dashboard of cPanel?

If it gets difficult to get this information, ask for help from the current hosting company. They will be willing to help.

You have to get the file and the installer.php file uploaded to your website’s root directory when using the FTP client.

Usually this is: /username/ public_html/ folder

But, again, if unsure, please approach your new host.

Do note that your site’s root directory has to be totally empty. WordPress is automatically installed by few hosting companies after you register.

This WordPress installed by them will have to be firstly deleted from your site’s root directory.

After this is done, you have to get the installer.php file and the file installed in the root directory of your website.

Step 4: Prevent Downtime by Changing the Hosts File

After uploading both the files to the root directory, you will then have to get the installer.php file accessed in a browser.

This can normally be accessed by using the URL:

But you will reach your previous web host using this URL. You will be notified of error 404. This happens basically because the domain name of your site is still pointed towards your previous web host.

You may think that you would be better off by changing the nameservers of your domain and pointing them to the new web hosting company.

Sorry to say, this would be totally the wrong thing to do. Because, if you did this, a broken site would be viewed by your visitors as it is being migrated.

You will wonder then what should be done. Well, we will tell you here how you could get temporary access to your new website without damaging your previous site.

You can do this on your PC by using the hosts file.

This hosts file helps map the names of the domain to particular IP addresses. This means you get to trick your PC by making it believe that your site has been moved when in reality, it has not.

Let’s understand how you can add the name of your domain to the hosts file in such a way that it shows towards the new web-hosting company.

The changes that you make will let you have access to the new host files by using your domain name when the entire world will actually have access to your website through your old host still. You will also have 100% uptime because of this.

You will be required to first search your present web-hosting server’s IP address. You can find this by logging into the dashboard of your cPanel, and by clicking on the link for expanding stats that you will find in the sidebar on the left side. The address of your server will be shown as IP Address that is shared.

Certain hosting companies will show this information below the heading ‘Account Information’.

Finding IP Address that is Shared

Users of Windows have to follow this path: Go to Programs, then ‘All Programs’, select ‘Accessories’, right-click ‘Notepad’ and then select Run as Admin.

A UAC prompt of Windows will appear. You then have to select “Yes” by clicking it. This action of yours will launch Notepad having privileges of an administrator.

On the screen of Notepad, go to file, select Open and go to the folder C:\Windows\ System32\ drivers\etc. Select the hosts file from the folder and open the file.

Mac users should open the Terminal application. They then need to add the following command for hosts file editing:

sudo nano /private/ etc/hosts

Mac and Windows users, at the hosts file bottom, will have to feed in the IP address that they copied. They then can enter their domain name. They would have to do it this way:

Remember to get the IP address replaced with the address copied by you from the cPanel, and using your domain name.

Save the changes after doing all this. 

Now using your local computer, you can access the files on your new web host, which will be possible by utilizing the name of your domain.

Please note: After finishing the WordPress migration (Step 6), do remember to undo all the changes done by you to the hosts file.

Step 5: Create Database on the Newly Chosen Host

You need to make a MySQL database on the new web hosting account before the installer is run by you on this new web host.

But, if a MySQL database has already been created by you, then proceed to the step that is next.

A new database needs to be created in cPanel.

Visit the cPanel dashboard of your new web hosting account. Then, scroll downwards to the section ‘Databases’. After that, click the icon of MySQL database.

There you will come across a field that is needed for making the new database. You will need to add a title for this new database before you click the ‘Create Database’ button.

Once the MySQL database is created, scroll to the section ‘MySQL Users’.

After this, mention the username & password for this new user. Then, click the button that reads as ‘create a user’.

Once the username is created, you have to add the user to the new database. By doing this, your user will get all permissions that will allow them to work on your database.

To add the user, you need to scroll down and go to the section ‘Add User to Database’. Go to the dropdown menu and select the user you have created for your database from the menu that is next to the user. After that, click on the database, and hit the button ‘add’.  

You can now use your database with WordPress. Note down the username, password, and database name. This information is vital, especially for the following step.

Step 6: Start the Migration Process of the Duplicator

You can now get the installer running. Go to the browser window and navigate to this address, where you will replace with the name of your domain:

Initialization of Duplicator Installer

Some tests will be run by the installer before it can show you the ‘Pass’ next to the archive option and validation tests.

Then, you can click on the ‘Next’ button after going through the terms and conditions and ticking the required checkbox.

After this, you’ll be prompted to give your MySQL username, host, password, and database name.

Most likely, the host will be localhost. Next, fill in the database details that were created by you before.

Connecting to the Database

Click the button ‘Test Database’ to ensure the information entered by you is correct.

Once the Duplicator connects, a string will be seen by you that starts with Pass. Or else, the details regarding connection errors with the database will be seen by you.

Continue by clicking on the button ‘next’.

Now, your WordPress database will be imported by Duplicator from the archive zip to your newly created database. 

After that, you will be requested to update your site’s Path or URL. Here, there is no need to alter anything as the domain names are not being changed by you. 

Just continue by clicking the button ‘Next’.

The remaining steps will be run by Duplicator, and you will be shown the button to log in. 

Completion of Migration of the Duplicator Website

Finally, log in to the WordPress site owned by you on the present host. Make sure to check that all is functioning as per your expectations.

Step 7: Your DNS needs to be Updated

A complete backup of your WordPress files and database has been created by you on your present web-hosting server. However, your domain is still pointed towards your previous hosting account.

To get your domain updated, your DNS nameservers will have to be switched.

By doing this, you make sure that your visitors will be directed to your site’s new location after they enter your domain in their browsers.

If your domain is registered with the hosting provider, you should think of transferring the domain to the other host.

You have to get your nameservers updated if your domain registrar has been anyone like GoDaddy,, Network Solutions and so on.

Information related to the DNS nameserver will be needed by you from your present host. This information consists of a few URLs:

Because of what we have explained so far, we will let you know as to how you could change with GoDaddy, the DNS nameservers.

Based on your web host and domain registrar, you may see different screenshots. But the concept basically is similar.

Go to the area of domain management. Search for nameservers there. In case you need any help to update your nameservers, you have to just request the same from your hosting company. They will be willing to help you.

When using GoDaddy, you will have to login into your account with GoDaddy. After logging in, you will need to click ‘Domains’.

Then, you will have to click the button ‘Manage’ that you will find at the side of your domain name that you wish to alter.

Managing Domain

Below the section ‘Additional Settings’, click ‘Manage DNS’ in order to continue.

Managing DNS

After the above is done, you then have to scroll downwards to the section of Nameservers. Click the button ‘Change’.

Changing Nameservers

Firstly, you have to change the dropdown of the nameserver type to ‘Custom’ from ‘Default’. Then, all the information of your new web hosting provider can be filled in by you under Nameservers.

Update DNS Nameservers

Make sure to hit the button ‘Save’. This will help store all the changes made by you.

Now, finally, your domain’s nameservers have been changed successfully by you. DNS changes could take around 4 to 48 hours to get all users propagated.

Because identical content is available on your new and old host, the difference will not be noticed by your users.

The migration process of your WordPress will be impeccable and with no downtime at all.

For the safety of your website, we suggest you not to disconnect your previous web-hosting account immediately. Wait at least for the completion of seven days after migrating your site.


We are hoping that the detailed steps mentioned by us in the article help you in moving your WordPress site from the old host to a new host, with zero downtime.

In case you face any issues related to the migration of your WordPress site to the new host, please do check our guide that talks about the typical WordPress mistakes and how they can be fixed. You can also check our article on How to Secure your WordPress Site?

Leave a Comment