How to Move a Wordpress Website From One Hosting to Another
Over the time wordpress migration can be difficult and tricky when moving from one hosting to another. In this article, I will explain how to move a wordpress site to a new hosting.
Prerequisite
What you need to make the wordpress website work successfully on new server :
- New Hosting i.e Where the wordpress will reside after migration ( i.e server A).
- Old Hosting i.e Where the wordpress resides before migration ( i.e server B).
- Active MySQL Database (maybe will be with server A).
Note: Database can be located anywhere just know the database name, hostname , username and password. - Finally we should also have access to the domain portal and get the nameserver it points to (will explain this further at the end of the article .
Steps
Note: Before we start the main job note that this migration is based on cpanel hosting, if you want me to write article on virtual hosting please notify on comment below.
A. MOVING MAIN WEBSITE
- Login to server B with your cpanel user detail (username and password) and go to file manager .

2. Compress all the folders containing the website files from the file manager and download it to your local system

3. Login to the new server (Server A) and click on the file manager

3. Upload the zip folder to the new server A

4. Extract the website to the new server

B. MOVING DATABASE
- Go back to the cpanel page and click on phpmyAdmin to download the database from server B

2. Select the database and export it to your local system.

3. Login to phpmyadmin on the new server (server A) and import the database on the system.
Note: You should create a database on the new system and the name should be the same with the one from your old hosting.

If there is no error then you are good to go, your database is set and up and running.
C. Setting Up Database on the Main Website
- Go back to the file manager of the new server and edit wp-config.php this is where you change the settings

2. Change the Database name , username and password values on wp-config.php to the new server (server B). Save and close

D. Pointing the new server to domain
Finally contact your new hosting provider for your nameserver in order to point it to the hosting. Normally it looks like
1. n21.example.com
2. n22.example.com
If all the steps are followed properly you should be able to view your new website on the new host without a problem, if there is any error let me know so that we can resolve it together.
Cheers