Move Your WordPress Blog From One Host To Another

Move Your WordPress Blog From One Host To Another Without Any Loss

move your WordPress blog from one host to another

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.

You can also go with Bluehost, iPage, and GreenGeeks.

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.

  1. Installing WordPress on the new web hosting
  2. Export the database from your current web hosting
  3. Backing up your website data
  4. Importing the database to your new web host
  5. Uploading the website back up to the new web hosting directory
  6. Editing the wp-config.php file to fix the database credentials
  7. Change DNS
  8. 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.

n1.hosting.com

n2.hosting.com

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.

You can also connect with us on Twitter, LinkedIn, and Facebook.

by Ravi Chahar

A WordPress Professional and the LinkedIn Influencer. A coder by passion and a blogger by choice. WordPress theme development is his forte. He is your WordPress guy who will teach you how to solve WordPress errors, WordPress security issues, design issues and what not.


Get Free Updates Into Your Inbox

Learn Everything Just Like I Did

SUBSCRIBE



5 comments

  1. Hi Ravi,

    Great step by step tutorial on migrating WordPress to a new host. At one point in our blogging careers, we’ll be faced with the decision on moving to a new host.

    I’ve moved several blogs for myself and for my clients. It’s a little bit scary at first but does get easier with time.

    However, this tutorial walks you through the entire process, I am sure that anyone who follows this won’t have any issues.

    Quick question, I’ve moved a very large site for a client and ended up getting database errors. I ended up having to contact the hosting support to move the database for me.

    Do you have any tips for moving a big database or dealing with database import errors?

    Thanks for sharing this tutorial with us, I truly appreciate it.

    Have a great day ?

    Susan

    1. Hey Susan,

      For the bigger database, you need to increase the file upload limit because for a WordPress website, the default limit is quite less and that’s why you get database error while importing.

      Though many web hostings don’t allow its users to increase it their own still you can confirm to them. But if you’re good with coding, just a simple line of the code and you would be able to upload the database of any size.

      Thanks for stopping by.

      ~Ravi

  2. Hey Ravi,

    Good instructions here.

    I wish I had this when I changed one of my sites. Who knows, I may very well use it on another site I currently have — which is my main one. Not really happy with the host.

    I know for a fact that anything to do with editing the wp-config.php, has me worried. Mainly because I REALLY don’t want to make a mistake and ruin my whole blog or lose an important part. That’s why backing up is very important to begin with.

    I think if/when I move my main site, I’ll be referring to this. It’s much more unstandable than most tutorials on this subject.

    Great job.

    – Andrew

    1. Hi Andrew,

      It happens with all of us. I all wish to have the guide which is easy to follow but never get any. Changing a host is a big decision which should be taken when you’re sure about the features of a new host.

      Yeah, having the backing is important. One wrong step can ruin everything.

      Thanks for sharing your thoughts.

      ~Ravi

  3. Hi Ravi,

    This is a very helpful tutorial. This is one one of the things a lot of webmasters usually find very difficult, which is why most people, when they want to move their site to another host, they’ll start looking for web hosts that offers free site migration.

    But I know that if one can learn how to do this on his own, he’ll no longer border about whether the new host will help him migrate his site or not, but will instead focus more on getting quality web host.

    Thanks for sharing.

Leave a Reply

Your email address will not be published. Required fields are marked *