Guide for Uploading Website Files and Configuring the Database in cPanel
- Access the “Domains” section:
In the window that appears, select the desired domain.
Click on its root directory.
- Upload the website files:
Once you have clicked the domain's root directory button, you will be taken to the root directory of your site in the file manager.
- Upload the Website Files:
Click on the Upload option from the top menu. A new tab will open with the Select File option.
Click on Select File.
If the website files are compressed in .zip format, select the .zip file from your computer and upload it.
Once the upload is complete, click on the <– Go Back to option.
You should see the uploaded .zip file in the public_html folder. Click on the .zip file.
Use the Extract option in the top right corner of the File Manager to extract the contents of the .zip file.
- Create a MySQL Database:
Go back to the main cPanel page and navigate to the DATABASES section.
Click on MySQL Databases.
In the Create New Database field, enter the desired name for the database and click Create Database.
Click on Go Back.
- Create a Database User:
Scroll down to the MySQL Users section.
Enter a username and a password for the new database user.
You can use the Password Generator to create a strong password.
Click on Generate Password, then check the box for I have copied this password in a safe place. Finally, click Use Password.
Click on Create User to create the database user.
- Add the User to the Database:
Scroll down to the Add User to Database section.
Select the user and the database you just created from the drop-down menus.
Click Add.
On the next screen, check the ALL PRIVILEGES option and click Make Changes to grant full permissions to the user on the database.
Click on Go Back.
- Import the Database Backup:
Go back to the main cPanel page and click on phpMyAdmin under the DATABASES section. This will open phpMyAdmin in a new tab.
In phpMyAdmin, click on the database you created from the left menu.
Click on the Import tab.
Click on Choose File and select the database backup file, which should be in .sql format or a compressed format (e.g., .sql.zip).
After selecting the file, click Open in the file explorer window.
Scroll down and click the Go button to import the database backup.
- Check Your Website:
After completing these steps, configure your website’s settings file and add the database information, user, and password.
Make sure you have already pointed your nameservers to the corresponding hosting server.