Move Your WordPress Blog From One Host To Another Without Any Loss
February 28th, 2018 | by Ravi Chahar || 5 Comments |
The biggest problem occurs when your web hosting ditches you and you decide to move your WordPress blog from one host to another.
Most of the people freak out because of the fear to lose the content or facing the downtime. You would be happy to know that you can easily migrate your blog without any downtime.
WordPress can be tricky to many and if you’re not familiar with the technical things then you can ask your web hosting to do it for you.
Most of the web hostings do it for free. If not, you can pay them or hire someone.
In this post, you will learn the easiest way to move your WordPress blog from one host to another without any error. You wouldn’t need any assistance after reading it.
What are the Steps Required for Migration
Before you start moving your blog, you would need a reliable web hosting. There may be many reasons for the migration.
Either the size of your website has increased or you’re not happy with your current web hosting. There are many signs that you should change your web hosting.
If you are looking for the best and affordable web hosting then we recommend Inmotionhosting at its best. They provide better service and BloggingLove readers will get the maximum discount.
If the size of your website is bigger and you want a managed hosting then WPEngine is one of the best choices.
The Steps You Should take to Move Your WordPress Blog from One Host to Another
After buying a reliable web hosting, you would need to prepare that account to handle the data of your blog. To do so, you have to install WordPress.
Let me mention all the migration steps.
- Installing WordPress on the new web hosting
- Export the database from your current web hosting
- Backing up your website data
- Importing the database to your new web host
- Uploading the website back up to the new web hosting directory
- Editing the wp-config.php file to fix the database credentials
- Change DNS
- Check the WordPress settings
You have to take one step at a time and at last, you will have your website on your new web hosting.
#1. Install WordPress on Your New Web hosting
Most of the web hostings are providing one-click WordPress installation which takes only a few minutes.
You would be happy to know that with this method, the database will get created automatically. During the installation process, you will be asked to fill the database credential details.
But if you don’t get one-click install option then you have to install WordPress manually using cPanel. You would also need to create a new database your own.
If you’re a non-techie person then buy a web hosting only if they provide one-click WordPress installation option.
#2. Export the Database from Your Current Web Hosting
To export the database, you have to go to the cPanel of your web hosting. Just log into the cPanel and go to database>>phpMyAdmin and a new tab will open.
Choose the name of the database from the left side menu and the database files will be shown to you.
You will see the main navigation menu above all the database tables. From which, you have to click on the “Export” button.
It will show the name of the database and you don’t need to configure any setting. Click on the “Go” button and the download will get started.
Depending on the size of the database, the download will get completed within a few minutes.
#3. Backing up your Website Data
To move your WordPress blog from one host to another, you would require the backup of the database and the website.
You have already backed up the database in the previous step. Now is the term to backup your WordPress website.
To do so, you have to follow a few steps.
Step 1: – Login to the cPanel and go to files>>file manager. Don’t forget to check the box to show hidden files.
Step 2: – In the main navigation menu present at the top, you will see an option to select all the folders and files present in the directory.
Select everything and click on the “Compress” button to make a single file of all the data shows.
Step 3: – A popup will appear. You have to choose the ZIP file radio button and rename the file name by changing the extension showing below.
You can name it anything you want. After that, click on the compress button and the compression will be finished within a few seconds.
Step 4: – You will see a ZIP file with the name you have given in the previous step. Double-click on that file and the download will start.
You can also download it by right-clicking and choose the download option.
Depending on the size of your website, the download will be finished.
NOTE: If you’re not comfortable with the manual method then you can also use a plugin like Updraft to backup your website.
#4. Importing the Database to Your New Web Host
Whether you have created the database manually or used the one-click WordPress installation, you will find the database in the phpMyAdmin.
Go to Databases>>phpMyAdmin and select the name of your new database from the left side menu as you did while backing it up.
To import the database, you have to click on the “Import” button showing in the main navigation menu of the page above the database tables.
It will show you a button then choose the file. If your database relies upon the default WordPress upload limit then choose the database from your computer and start uploading.
But if you get an error showing the memory exceeded then you have to increase WordPress upload file limit.
NOTE: You don’t need to do anything extra if you’re able to upload the database. The error appears only if the size of the database bigger than the default upload limit.
#5. Uploading the Website Backup to Your New Web Hosting Directory
Just like backing up, to move your WordPress blog from one host to another, you would need to upload the exported data of your website.
If you’re running a single website on this new web hosting then the backup will get uploaded in the public_html directory which is also called the root directory.
A few steps are required.
Step 1: – Login to the cPanel and open the file manager just like before.
Step 2: – This is the root directory where you have to upload the backup. To do so, click on the “Upload” button showing in the navigation menu and a new tab will get opened.
Step 3: – Click on the “Choose file” button and choose the ZIP file you have downloaded from your old web hosting as the backup.
The upload will start and you have to wait for a couple of minutes until the upload finished. The time depends on the size of the backup.
Step 4: – Once the upload process gets completed, return to the root directory and refresh it. You will see the ZIP file.
You have to extract this file either by using the “Extract” button shown above or use the right-click and extract option.
All the WordPress files will get extracted within a few seconds.
Step 5: – If you see that all the files and folders are successfully extracted then you have to delete the ZIP backup file.
It’s because it will only increase the bandwidth use now. You have already extracted its data so it’s of no use in this process.
#6 Editing the wp-config.php File to Match the Database Credentials
When you move your WordPress blog from one host to another, you have to edit the wp-config.php file to avoid the “Error Establishing a Database Connection“.
It’s because you have created a new database on your new web hosting and the database name, username, password etc are not same as the older database.
To fix this, you have to edit the wp-config.php file and fill the credentials of your new database.
Let me show you an example of the code you have to edit.
define( ‘DB_NAME’, ‘database_name’ );
define( ‘DB_NAME’, ‘username’ );
define( ‘DB_PASSWORD’, ‘database_password’ );
define( ‘DB_HOST’, ‘localhost’ );
Save the file.
NOTE: If you have ever changed the database table prefix ever on your older web hosting then you have to change it as the default one “wp_”. This can also be done using the wp-config.php file.
#7. Change the DNS
You have changed the web hosting, it means the DNS you have filled before have also changed. Suppose if you have bought your domain name from GoDaddy or any other domain provider then you have to edit the DNS.
The Domain Name Servers look like this.
In place of hosting, it would be the name of the web hosting you use. It may vary according to the web hosting you choose.
If you bought the domain name from your older web hosting then ask your new web hosting customer support to migrate it to their server.
Most of the web hostings provide or migrate one domain for free.
Wait for 24 hours and your blog will be running on your new web hosting. The DNS change takes a little bit of time. You wouldn’t even notice any downtime during the DNS change.
#8. Check the WordPress Settings
You have successfully migrated your blog. Now, take a casual tour of all the WordPress settings.
Check the design of your blog. You may have to add the sidebar widgets again. It’s because the images or any ad banner you have added before may not present now.
It’s not a big deal. You can fix such things.
Check the functionality of all the plugins. If everything seems fine. Congrats, you have successfully migrated your blog to a new web hosting.
I Hope it Won’t be so Hard to Move Your WordPress Blog From One Host to Another
It may seem difficult but once you follow the step by step guide, you can easily migrate your blog.
Most of the people fret because they don’t want to lose their content. And it’s natural as if no one wants to see their hard work gets ruined.
To move your WordPress blog from one host to another, you should definitely look for better options. If you’re a non-techie person then you can directly ask your web hosting to do so.
You can also ask any technical person from your circle to do it for you. I am sure, you can get help. If you still have any doubt, feel free to ask.