How To Move WordPress Site to New Hosting?

Moving WordPress Site to New Host:

Moving WordPress site to new host sounds very difficult but actually it is a very easy task if executed properly. This tutorial is for someone who wants a direct, step by step guide for moving a WordPress website from one hosting provider to another manually.

Note: It is assumed that you are having only one website at your old hosting provider which is installed at the public_html folder of your hosting account.

A WordPress site consists of two parts-WordPress files and its database. The migration process is divided into following steps:

  • Back up your Website.
  • Transfer your site’s (WordPress) Files.
  • Transfer your site’s (WordPress) Database.
  • Connecting WordPress files with the database.
  • Redirect Nameservers.

Back Up Your Website:

The first thing you need to do is to take a complete backup (Website files + database) of your site at the old hosting. But, before you proceed, you should make sure that the size of your website’s database and files are as small as possible. To achieve this you should:

  • Empty all website Cache by using Delete all cache option in your Caching Plugin.
  • Deactivate and uninstall all the plugins which are not required.
  • Keep only the required themes files deleting the unnecesary.
  • Remove all the trashed posts, pages, comments etc.

If your old hosting provider is cPanel powered, you can create a .ZIP archive of your website files (public_html folder) by using its File Manager tool.

For taking the backup of your website database you can go through the following tutorial.

How to Export and Import WordPress Powered Site’s Database

Transfer your site’s (WordPress) Files:

WordPress files can be transferred from one hosting provider to another by various methods. My favourite is through FTP Client. Move the .zip archive created above first to your local PC and then upload it to the new hosting account and extract it in the public_html folder.

Recommended Read:

How to use FTP Client for file transfer

Transfer your site’s (WordPress) Database:

The next step is to move your database. Login to your new hosting account and create a new database there and import your database tables into it which you have previously backed up from the old hosting account.

Also create a new database user with all the privileges and associate it with this database. Keep all the information like db_name, db_username, db_password handy.

How to Export and Import WordPress Powered Site’s Database

Connecting WordPress files with the database:

Now, the next step is to reconfigure your wp-config.php file so that your website files and the database can communicate with each other and your website works from the new server.

To do this, open the wp-config.php file with any text editor like Notepad or Notepad++ etc and locate for the following lines. wp-config-php-file

You will find the wp-config.php file in the in root folder of your WordPress installation like here in this case it is in the public_html folder.

Replace the DB_NAME, DB_USER, DB_PASSWORD  values with your actual database name, database username and password and save the file. DB_PASSWORD value is the password of the DB_USER which is going to use the database.

Redirect NameServers:

At last the final step is to Redirecting the NameServers. NameServers tell domain names where to find the content. If you are typing a site url on address bar, the url finds the website’s content by seeing the NameServers. Let’s say your website is www.mydomain.com and all your website content is hosted at Bigrock’ Hosting Services, you should point your domain’s NameServers to “Bigrock”.

Recommended Read:

How to point a Domain to the NameServers of a hosting account?

After pointing the NameSevers to your new hosting provider your WordPress site should be up and running from your new hosting account. If it is not working you should first check the status of your NameServers updation at this link http://intodns.com.

To be sure that your site is running from your new hosting account delete all your website content at the old hosting provider after changing the NameServers.

That’s all! This is the process which I followed to transfer my own website last week. It worked for me! However, if you feel any difficulty in transferring your website please let us know via the comments below.

Add a Comment

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