In this lesson, we discuss how we can transfer WordPress Website one server to another server or either localhost to live server. First of all, you need to take backup of your WordPress files and Database. In the previous lesson we discussed about WordPress backup, if you don’t read it then we recommend to read first.
After backup everything, we will upload files to the new server Login in the cpanel. After login to the cpanel dashboard, find File Manager option. Your cpanel may be different options but there will be File manager option in the all hosting accounts.
Step 1: Locate your domain root folder and click on upload button in the top.
It will take you next upload screen and select your website zip folder from the computer and upload it. After upload, extract the zip folder. After extracting, files will look like this screenshot.
- Step 2: We have uploaded files now we will import old database in the server. To create database, in the cpanel. Click on Mysql database wizard icon.
- 2.1 Next, you need to complete three steps. Step 1: Create A Database: Enter your database name and click on Next step button.
- 2.2 In the next Step: Create Database User: fill your database username and password. Write down your database name, database Username and password in the text file because you will need to enter these details in WordPress configuration wizard. Then click on Create User button.
- 2.3 In the next step, Add user to the database. Here you will need to check ALL PRIVILEGES checkbox and click on Next step button.
Now you have created database, database Username, and Password.
Step 3: Now we will import old website SQL file into the new database. Click on phpmyadmin option in the cpanel dashboard.
Locate your database and click on import button on the top, then click on upload button and select your SQL file from the computer.
Then Click on Go button. It will import your old website database into the new database.
Step 4: Now we will change database name , database password and database username and host in the wp-confige.php file that located in the website root folder.
1. Change old database name to new database Name
2. Change old database UserName to new database UserName
3. Change new Database Password
4. Hostname will remain same, But some hosting account provides separate hostname i.e. 1and1 servers.
Cheers, It is done Now you can see your working website on the new server.