How to Upload Your WordPress Site from Your Local Computer to cPanel
Overview
This article aims to provide a comprehensive, step-by-step guide on how to upload your WordPress site from your local computer to a web hosting plan. This process is essential for users who have either developed their WordPress site locally or have a backup of their site stored on their local machine.
Caution
This article is technical in nature. We recommend that these steps be followed only if you are comfortable navigating and managing technical settings. If you are not confident in performing these actions, consider seeking assistance from our support team.
Procedure
- Navigate to your cPanel login page and enter your credentials.
- In the cPanel dashboard, find and click on File Manager.
- Navigate to your website's directory. If the website is your main domain, the directory will be public_html. For other domains, the directory will have the same name as the domain.
Note: If you haven't added your domain name to your hosting account yet, make sure to do so. You can find more information on how to create add-on domains here.
- Click on the Upload button in the File Manager toolbar.
- Click Select File and choose the backup file from your local computer.
- Wait for the upload to complete.
- Locate the backup file you uploaded.
- Right-click on the file and select Extract or use the Extract option in the toolbar.
- Ensure the extraction path is set to the target directory and click Extract Files.
- Check that the files and folders have been properly extracted and are in the correct location.
- Select all the extracted files and folders.
- Click on the Move option in the File Manager toolbar.
- Set the path to the target directory and click Move Files.
- Delete the now-empty folder.
- Right-click on the zip file and select Delete.
- Also delete any empty folders.
Note
If you have a Managed WordPress service, please proceed to the next step.- In cPanel, go to MySQL Database Wizard.
- Make sure you copy all the variables you are entering for the next steps, as we need them for further steps.
- Enter a database name in the New Database field.
- Click Next Step.
- Enter the Username and Password.
- Click Create User
- Select the privileges you want to assign for this user.
- Click Next Step.
- Click Return Home.
- Open phpMyAdmin in cPanel.
- Select the database you created earlier from the list on the left.
- Click on the Import tab at the top of the phpMyAdmin page.
- Click Choose File and select the .sql file from your local computer.
- Ensure the format is set to SQL and click Go to start the import process.
- Wait for the import to complete and verify that there are no errors.
- Edit the wp-config.php file in the site's directory with the following details:
- /** The name of the database for WordPress */
- define('DB_NAME', 'ENTER_DATABASE_NAME_HERE');
- /** Database username */
- define('DB_USER', 'ENTER_USERNAME_HERE');
- /** Database password */
- define('DB_PASSWORD', 'ENTER_PASSWORD_HERE');
- Save the file.