How to Transfer a WordPress site to another Hosting service
For whatever reason you may find a time when you need to move or shift your live WordPress site to another hosting provider. This may be due to, you may have found a cheaper web host or you might be currently hosting your site on a shared hosting server and due to the increased amount of traffic you are receiving you have to upgrade to VPS (Virtual Private Server) hosting service.
Whatever the scenario, the process to transfer your WordPress site to another hosting service is the same. In this article I will breakdown and explain the process of how to transfer your existing WordPress site to another hosting service.
We can break the process up into four parts:
- Transfer your existing WordPress files.
- Export and transfer the existing WordPress MySQL database.
- Create and import WordPress MySQL database.
- Reconfigure the settings and database if needed
Transfer your Existing WordPress Files
To move your files from one host to another you can use your favorite FTP client. This article will assume that you already understand what FTP is how to use an FTP client.
1. The first part to this step is to download your existing WordPress files to your local computer. Create a temporary folder on your desktop called “WordPress-Backup” and transfer all the files from your existing site into this folder. This includes all the WordPress core file, plugins & themes, everything.
2. Next we are going to to want to transfer these files over to your new hosting provider. When you signed up with your new hosting provider you would of been supplied with or emailed detailed ftp instructions and login details. Create a new site in your FTP client and add the new login details. You should now be able to ftp and connect to the new host.
3. Once you are able to successfully connect to the new host transfer all the backup files you downloaded from your old or existing host over to the new host. Through the FTP client transfer all the files from the backup folder on your desktop called “WordPress-Backup” that we created in step one.
4. Once you have transferred all your files over to the new host through FTP it is a good habit to not delete the folder from the desktop. What we will do is copy and paste that folder into a safe place on your computer. We do this, because this is basically a complete backup of your WordPress site. So if something goes wrong in the future or your site gets hacked you are able to quickly ans easily restore your WordPress files.
Export & Transfer the Existing MySQL WordPress Database
The second step in the process is to move your WordPress MySQL database. First you need to export your database from the old hosting account.
We will be using cPanel to export and transfer the existing WordPress MySQL database.
You can easily create a dump file (export/backup) of a database used by your account. In order to do so you should access the phpMyAdmin tool available in your cPanel:
You can select the database that you would like to backup by clicking on the “Database” tab in phpMyAdmin and clicking the name of the database. In this example we are going to be working with the database called “WordPress_dev”.
Once you click on the database name you will be directed to a new page displaying a list of the database table. Browse to the top of the screen and click on the “Export” tab.
Next we need to select a few option when backing up our MySQL database. Leave all the default options selected and also select the “Save as File” option (which will save the file locally to your computer in an .sql format) and also the “Add Drop Table” (which will add the drop table functionality if the table already exists in the database backup) options as shown below.
Finally, click on the Go button to start the export/backup procedure for your database.
Once you have clicked the Go button, a download prompt box will popup asking you where you wish to save the file to your local computer. For ease of the tutorial save it also to your desktop.
Create and import WordPress MySQL database.
OK, we are now halfway through our transfer. Our next step is to take the .sql backup that we just created in the previous step and create a new database on the new web host. Once again we use cPanel and phpMyAdmin to help us with these tasks.
1. In cPanel, click on the “MySQL Databases” icon to navigate to the database management page.
2. Next you will need to create a new blank MySQL database. Add a name for your database and click on the “Create database” button.
Add the user(s) to the database and select the appropriate permissions for the database.
3. Next, we need to navigate back into phpMyAdmin. This time it is phpMyAdmin on the new web hosting provider and not the old one. Click the “phpMyAdmin” link found in cPanel. Once phpMyAdmin has loaded up navigate to the “Import” tab.
4. To restore (import) a database via phpMyAdmin, first choose the database you’ll be importing data into. Click the “browse” button and load in the .sql backfile we saved to our desktop in the previous steps.
Once you have loaded the backup .sql file, click on the “Go” button to perform the import. If all goes well you should see a success message as illustrated below.
You have now successfully exported and transferred you WordPress database file over to your new hosting provider.
Note: If your old hosting provider does not use cPanel then you may need to contact the support staff and ask them to backup and provide you with a copy of the WordPress MySQL database file.
Reconfigure the settings and database if needed
Now, you have your successfully completed the transfer of all the files and database from the old web host to the new web host the only task that you have left is to reconfigure your WordPress application to work from the new hosting provider. To do this, open the wp-config.php file in your WordPress root folder and locate the following lines:
-
/* MySQL database */
-
define(‘DB_NAME’, ‘user_database_name’);
-
-
/* MySQL database username */
-
define(‘DB_USER’, ‘user_database_username’);
-
-
/* MySQL database password */
-
define(‘DB_PASSWORD’, ‘user_database_password’);
/* MySQL database */
define('DB_NAME', 'user_database_name');
/* MySQL database username */
define('DB_USER', 'user_database_username');
/* MySQL database password */
define('DB_PASSWORD', 'user_database_password');
Obviously the login credentials for the new web host will not be the same as the old web host. Go ahead and change these details to match that of the new web host. Once you have made the changes you now need to save this file and re-upload it to the new server overwriting the existing “wp-config.php” file.
Your new WordPress site should now be successfully up and running from your new hosting account! Spend a few minutes browsing the front end of the site and the WordPress Dashboard to make sure that all is working as desired.
More information on how to transfer your WordPress site.
If you require more information on how to transfer your WordPress site visit the official WordPress Codex.
Be sure to check out our other great WordPress Articles and Plugins






















3 Comments to "How to Transfer a WordPress site to another Hosting service"
ravi
February 14, 2012
Ryan Sammut
February 21, 2012
rakesh kumar
March 12, 2012