How to Transfer a WordPress Site from One Host to Another
Your current hosting provider is failing to provide you with the necessary hosting power to run your WordPress site at an acceptable speed and performance. You already contacted the technical department to fix the problem, but they are unable or don’t have the willing to help you out.
Is your current hosting provider failing to provide you with the necessary hosting power? Your WordPress website is slowing down? You can’t accept a pitfall in speed and performance! You have contacted the technical department, but they failed to fix the problem. They are unable or don’t have the willing to take care of your website.
What can you do in this case? First of all you will need to find a new, reliable web host that supports WordPress.
Hosting companies I recommend for WordPress sites:
$3.95 / mo
$3.95 / mo
$3.49 / mo
BlueHost is the best choice when it comes to business WordPress hosting. They have multiple shared plans, managed hosting for WordPress, VPS and Dedicated hosting as well cloud hosting. This hosting provider is great from small to large websites. Check out our BlueHost review to find out more about the company.
HostGator is a good, inexpensive hosting provider for hosting small to large WordPress sites. This hosting company use cPanel as control panel, so if you are looking for a cheap cPanel host, this could be a good option for you. Find out more about this company in our HostGator review.
InMotion Hosting is another great hosting provider, with affordable rates. It is another great option for hosting a small to medium sized WordPress site. They also offer WordPress optimized hosting service and option to upgrade to VPS or Dedicated hosting as well. This host is great for both new as well established and growing sites. Learn more about InMotion by reading our full InMotion Hosting review.
Important! Before you proceed further, please backup your whole WordPress site. Make a backup of the files and database as well.
After you found a good WordPress host, you will have to follow the steps below.
Step 1: Transferring WordPress Files
To transfer your WordPress files to the new host, you have two options: using FTP or using cPanel. In the following I will explain both methods.
You will need to use an FTP client to be able to connect to your server. I recommend using FileZilla, it is free and easy to use. You will need an FTP account at both new and old hosting provider, to be able to connect to the server. You can create an FTP account in the hosting control panel.
- Connect to your old server and access the public_html folder. Here are stored the files of your WordPress site.
- Download the files to your computer via the download function – depending on the size of your website, this can take quite some time
- After the download is finished, connect to your new server, and upload these files to the public_html folder. At this point you are done with the file transfer, you can move the databse.
But before, we move on to the next step, let’s take a look how you can transfer your site using cPanel. This is a faster process and you don’t need any additional software. This method only works if both, the old as well the new host, are using cPanel.
- Access your old hosting account and login to cPanel.
- Go to the File Manager and locate the folder where the files of your site are stored; it should be in the public_html folder.
- Select the folder and compress it to a .zip (or other extension you prefer) using the compress option from the menu.
- With the download button, save the compressed files to your computer. Depending on your internet connection, server speed and size of your site, the download will take few minutes.
- Once the download is finished, login to your new host and access the cPanel.
- Add your domain name to your new host (if not added yet) in the Addon Domain section – this will create a folder on your host.
- Upload the archived files to your new host using the File Manager and upload function. Upload the file to the public_html folder (or to the folder which was created in the previous step)
- Unzip the compressed file using the unzip function and select the destination folder carefully
- At this point, you have successfully transferred the files to your new host and can start moving the database.
Step 2: Moving WordPress Database
Now you will need to transfer the database of your WordPress site from the old host to the new one.
- Again, go to the cPanel of your old host and access the phpMyAdmin tool.
- Once you have connected to the database server, in the left side of your screen you will be able to see all your databases hosted on this host. Select the database you want to transfer. If you are having problem figuring out which is the correct database you should open the wp-config.php (which is located in the root folder of your WordPress installation) file and the find the line that looks like this: define(‘DB_NAME’, ‘your_database_name’); This line stores the name of the database to which your files are connected to.
- Now select the database in the left side of the screen and at the top you will be able to see some options. Go to the “Export“ menu.
- Now export the selected database with Quick Export mode to SQL format and save it to your computer.
- Now go and access the cPanel of your new hosting account and with the help of the MySQL Database Wizard, create a new database and user. Save the name of the user and password, because you will need this data later on.
- Once the empty database is ready, access the phpMyAdmin on your new host and in the left side select the database you created earlier
- Click on the “Import” menu at the top and choose the database you saved to your computer.
- At this point you are done with the database transfer, but this is not ready yet.
Step 3: Updating Config File
Now you will have to connect the files with the database on your new host.
Find and open the wp-config.php file on the new hosting account either with cPanel or FTP.
Find the following lines and replace the old data with the new that you saved earlier.
/** The name of the database for WordPress */
/** MySQL database username */
/** MySQL database password */
/** MySQL hostname */
You will need to change the database name, user and password; localhost can remain, the database host will remain the same, as most hosting providers use localhost.
Now, if you did everything right, your files should connect with the database. And you are basically DONE!
There are however some additional steps that might be interesting and useful for you.
Step 4: Migrating Email Accounts
If you are using your host for hosting your emails and having one ore multiple email accounts associated with your domain name, this step should help you move your email accounts also.
- Migrating email accounts is very similar to moving the WordPress files.
- All settings and emails of your email accounts are located in the public_html/mail/ folder.
- You can use either FTP or cPanel to move the email accounts, just like before with the files.
- Here, you can find more about migrating email accounts from one cPanel host to another.
By downloading the email accounts from your old server and uploading it to the new one, will keep all the settings. You won’t need to change email settings in your email client (in Thunderbird, Outlook or other).
Step 5: Change Name Servers / Move Domain
To avoid any downtime while moving your site to a new host, you should keep this step at last. After you are done with files and database transfer and the migration of your email accounts, now you can change the name servers of your domain name.
If your domain is registered with the hosting company you are moving out, you will need to transfer the domain to your new host. In this, you can get assistance from your new host, but will need to contact your current host and tell them about that you want to transfer your domain. This might be a longer process and the whole domain transfer can take couple of days.
If your domain is registered at a third party registrar you only have to change the name servers provided by your new hosting company. Once name servers are updated, this can take up to 24 hours for the change to take effect. So be patient!
I really hope that this detailed tutorial has helped you moving your WordPress site to a new web host. If you still have any question, please use the comment section below.