So you have decided on a change of hosting for your website to a better hosting option. This guide will walk you through on how to go about transferring the WordPress files & database manually to your new hosting.
Looking for a reliable web hosting for your WordPress website? Then, Bluehost is among my top 5 hosting choices.
As with most hosting, you should be provided with cPanel login and you will be needing to access both old and the new hosting control panel in other to successfully transfer your website.
I will be using my hosting with NameCheap for this tutorial.
How to transfer WordPress Website Manually to a New Web Hosting
Compress your website files to ZIP
1) First thing first, make sure you are not making any changes to your WordPress website when you are about to begin the transfer.
2) Next, you will need to login to the Cpanel of the old hosting and locate the file manager.
3) From the file manager, you will need to access the folder of your website and this can either be the public_hmtl folder if your website is the hosting main domain or if your website is an addon domain, then you will see a folder named after your website.
Whichever your website is on, click on the folder.
4) From the website folder, you will need to compress all the files that made up your WordPress website to a zip archive for download
The method of compressing all your WordPress files to a zip archive can be used easily if you don’t have large website files over 1gb data size.
If you know your website file size is over that, then I suggest you use a cloud base moving option such as multi-cloud. You can even use the cloud base moving option to even move smaller websites files, it’s much easier and faster. I hope to write a tutorial soon on how to move files via multi-cloud.
5) You will need to select all the files needed for transfer for compression into a zip archive. Here is how WordPress default installations files look like:
Your website WordPress file structure should look similar with maybe a few additions. But note that, when you are selecting the files avoid selecting other zip archives if yours have, as you will not need them.
6) You can select all the files at once by clicking on “Select All”. If you want to select or unselect individually, you can use Ctrl and click on the files with your mouse.
Once you have all the files selected. right-click anywhere on the file manager and click on “Compress”.
7) A Popup will appear, where you see all the files that are about to be compressed. You will need to select compression types as a Zip archive
8) Still, on the popup, scroll down and edit the name to something you can easily remember.
Note that you have to name the folder along with where the website part is located. For example, if your website is located in the public_html folder, then the part should be something like this:
And if it’s on a domain name, it will be something like
9) Next, click on “Compress file(s)” and let the files begin compressing. Once successful, you will get a success notice that files have been compressed. You can then click on “close”.
10) You can then be able to see the compressed files ending in dot zip format in your website files directory if you name it to your website directory path.
As seen in the screenshot below: mywebsite.zip
Downloading the website Zip file to your computer
Now that the website files have been compressed into dot zip, to download the file to your computer, all you need to do is right-click on the file and click on “download”.
Here we have it, the first part into transferring your website to a new web hosting
Exporting & Downloading the WordPress Website Database
Before a Transfer of a WordPress website can be successful, both the files and database are needed to be transferred and connected. Now that you already know how to compress and download your website files, lets now export and download the database.
1) Firstly, you need to know the name of the database your WordPress website is using, and to do so, we are going to take a look at the wp-config.php located in your Cpanel file manager
2) Still, on your old hosting Cpanel file manager go to your website files directory, locate the wp-config.php file, right-click and click “edit”.
3) On the wp-configure edit screen, look for this line of code with DB_NAME
Your database name is between the two apostrophes (“”).
Once you know the name of the database, next is to export it.
4) From your Cpanel frontend, locate phpMyAdmin & Click on it
5) On the phpMyAdmin page, click on the name of the database you want to export from the left menu. In this case, it should be the one for the website you want to transfer.
6) All the tables that make up the database will show, next you will need to scroll down and select all tables by ticking the box. After that, scroll up and click on Export. See the screenshot below.
7) On the export page, the export method should be quick and the format should be SQL, next click on Go, to begin exporting and downloading the database to your computer.
Once you have successfully downloaded the exported database, you will need to then update your domain nameservers (DNS) to your new hosting if your domain registrar is different from your hosting.
Transferring your website Files to your New Hosting
Before you get to this step, you should have downloaded your website files in a zip and the website databases in SQL from your old hosting to your computer. Also, you should have changed your domain name servers to your new hosting.
Let’s get started with the transfer.
1) Login to the Cpanel of your new hosting, click on Filemanger and located the directory of your website you will be moving the files to.
Some hosting companies do help their customers install WordPress to their domain or a temporary domain so depending on whether your domain name is an addon or the primary domain(public_html), you may already see website files in the directory.
You may want to back up the files first before to your computer before deleting them by extracting to a zip file & downloading them
2) Next, you will need to upload the zip file to your website file directory by clicking the upload button and selecting the zip file from your computer
Note: This tutorial will be done using my public_html domain folder of a folder
3) Once the zip file has been uploaded, right-click on it to begin extracting files to your website files directory.
4) Next, you need to make sure you are extracting the files to your website directory. This is very important.
If your website is on:
a) Primary domain - extract to /public_html/ b) Addon domain - extract to /public_html/websitename.com
5) Once set, click on extract files and the files will be extracted.
That’s it on how to transfer website files to a new hosting. Now that the files are ready, lets now set up the database before we connect the website files to the database using wp-config.php.
Creating the WordPress Database Name & User
1) From your new hosting Cpanel dashboard, locate the databases section & click on “MySQL Databases“.
2) Next, create a new database for your WordPress files. Enter the name of the database you want to use and click on “create database“.
3) Once the database has been created successfully, click on “Go Back”.
4) You will now need to create a database user for the database created. to do so, scroll down to “MySQL Users” and add a new user. Once you have entered a user name & password, click “Create User”. Use the password generator to generate a strong password.
Save the username & password somewhere, you will be needing them.
5) Click on “go back” after the user has been created successfully
Adding the Database User to The Database
Now that the database name & user has been created, we need to now connect them together.
1) Still, on the Mysql databases page, scroll to “Add User To Database” and select the database user and database name from the drop-down. Next click on “Add”.
2) Next, you will need to grant user privileges to the database. Select “All Privileges” and click ” Make Changes”.
3) Click on “Go Back” after the success notice
Now that the database name & user has been created and the user added to the database, lets now import the SQL database file of our WordPress website we exported into the new database created.
Importing the SQL database File into The NEW Database
1) To begin importing the SQL database file into the new database, go back to your new hosting Cpanel dashboard, locate and click on “phpMyAdmin”
2) Once you are in the PHPMyAdmin page, click on the database name you created from the left navigation menu. You will see there are no tables found in the databases.
3) Next, click on “Import” and let’s begin importing the SQL database you exported from the old hosting.
4) Select the SQL file to import from your computer. You are good to go with the default settings for the import, but check that the format you are importing is in SQL.
5) Once set, click on “Go” to begin importing
6) If done correctly, you will get a notice saying “Import has been successfully finished”. You should be able to see database tables
You are on your way to connecting your website files to your database.
Connecting your website files to the SQL database Using Wp-config.php
You will be needing your database name, user & password
1) Go back to Cpanel Dashboard and access your file manager
2) From the file manager, access your website directly.
3) Next, right-click & Edit the Wp-config.php file
4) On the wp-config.php edit page, enter your DB_name, DB_user, and DB_password. They should be entered inside both apostrophe ” “.
5) Double-check you entered the database base information correctly, next, click ” Save Changes”.
That’s it, on how to transfer a WordPress website from one host to another. you can now access your website from your website domain name.
To be sure you are visiting the website from your new hosting instead of the old, visit the old hosting Cpanel file manager and make an edit to wp-config.php there. enter incorrect information and save changes.
What if I use a new domain name instead?
If you followed this tutorial on how to transfer a WordPress website for that of a new domain, you have already successfully transferred your website to a new hosting. But you won’t be able to access your website properly.
Your website transfer will be redirected to the old domain still.
I will write about fixing the redirect, when I do, I will link it to this post
If you like this tutorial on how to transfer a WordPress website to a new host, you may want to check out this tutorial: How to start a WordPress blog.