It is a risky business if you need to or has to transfer your WordPress blog or website to a new web host because of the potential downtime and data loss associated with it. Imagine you have tons of traffic and you need to change the hosting provider for any reason then you simply can’t afford to lose any data or traffic or to have a downtime.
So, if you are looking to migrate or move your WordPress site to a new host or server then you have come to the right place where I will show how efficiently do it in a step-by-step guide.
Let’s start with the steps and get your WordPress site migrated.
Step 1: Select A New WordPress Host
While choosing a new web host for your WordPress site some important things to consider are how fast is the hosting so that you don’t have to move again.
Make sure, your web host has cPanel or some kind of control panel to manage your hosting account.
Step 2: Add A Domain Name To The New Hosting
Once, you have bought the hosting account then you need to add your existing domain name where your WordPress site is currently hosted.
Here, I am using a cPanel control panel. Go to “Domains->Addon Domains” and follow the instructions to create the domain name.
Step 3: Install A Fresh WordPress
Once, you have created AddOn Domain then you need to install a fresh WordPress on that domain.
Go to “Softaculous Apps Installer” in “Software” section of your cPanel.
Then, navigate to the left-hand menu and click Blogs->WordPress.
It is time to install the WordPress now on the domain name you just added. Here I am using “BlueStasks.Download” as an example. Follow the on-screen installation as shown in below images and get this done.
You will receive a success message once WordPress installation is done.
Note: the website and wp-admin links will still go to the old host as we haven’t updated DNS yet. We will do it in later stage once we do a backup and restore.
Step 4: Backup Your Existing WordPress site using free “All-in-One WP Migration” plugin
Now, it is time to back up the existing host. Simply log in to your wp-admin and go to…
Plugins->Add New->All-in-One WP Migration
Install and activate the plugin and go to left-hand menu…
All-in-One WP Migration->Export->Export To FILE
Depending on how big is your site in size, it may take from few seconds to few minutes and you will see a message like this.
Download the file and keep it in the safe place as you will need to import this on your new host.
Step 5: Change the hosts file entry to update local DNS entry
Without changing the hosts file entry it will still point to the old WordPress site so it is a very important step to do now so that we can login to the new website and restore WordPress and complete the migration.
Open a notepad in administrator mode…
Open “C:\Windows\System32\drivers\etc\hosts” file to setup the local hostname resolution pointing to new web host. The entry will look like this at the end of the file. Make sure you put the IP address of the new host and you can easily find out from the cPanel.
Now, the website will be redirected to the new WordPress we just installed in the earlier step. It will be default installation so don’t worry if it doesn’t look nice. Things are doing to be fine soon.
Step 6: Import the WordPress with the backup file using free “All-in-One WP Migration” plugin
This is a most important step where we will restore the WordPress with the backup we just created. But before that, we need to install All-in-One WP Migration plugin on new site. Repeat step 4 to install the plugin and then go to…
All-in-One WP Migration->Import->Import from FILE
Depending on the size of the WordPress site, it will take few minutes and will show the following message.
After that, as the popup suggests, you must save your permalinks structure twice. That will be the end of WordPress migration.
Step 7: Change the DNS entry
The only two things remaining are to change the DNS entry at your domain registrar to point to the new web host and remove the entry from your “C:\Windows\System32\drivers\etc\hosts” so that whenever you access the website it points to the new hosting.
To change the DNS servers for the domain name, please log in to your domain registrar (GoDaddy, NameCheap, Name.com etc.) and select the domain then update name servers.
The name servers will look like this from your new hosts…
DNS changes can take up to 48 hours to propagate.
To remove the “etc/hosts” entry follow the instructions shown in step 5 to open the file and then delete the entry.
Now, you have same WordPress content on both old and new web hosts so even if it goes to any of the hosts while DNS is getting propagated, you will not see any difference. Just remember to keep your old web hosting account for a couple of days after migration.
I hope this guide will help you migrate WordPress website to a new host without any issues. Please share your experience or ask in the comment section if you need any help.