• Portal Home
  • Knowledgebase
  • Transfers and migrations
  • How to Upload Your WordPress Site from Your Local Computer to cPanel

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

  1. Navigate to your cPanel login page and enter your credentials.
  1. In the cPanel dashboard, find and click on File Manager.
  1. 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.

  1. Click on the Upload button in the File Manager toolbar.
  2. Click Select File and choose the backup file from your local computer.
  3. Wait for the upload to complete.
  1. Locate the backup file you uploaded.
  2. Right-click on the file and select Extract or use the Extract option in the toolbar.
  3. Ensure the extraction path is set to the target directory and click Extract Files.
  1. Check that the files and folders have been properly extracted and are in the correct location.
  1. Select all the extracted files and folders.
  2. Click on the Move option in the File Manager toolbar.
  3. Set the path to the target directory and click Move Files.
  4. Delete the now-empty folder.
  1. Right-click on the zip file and select Delete.
  2. Also delete any empty folders.

Note

If you have a Managed WordPress service, please proceed to the next step.
  1. In cPanel, go to MySQL Database Wizard.
  2. Make sure you copy all the variables you are entering for the next steps, as we need them for further steps.
  3. Enter a database name in the New Database field.
  4. Click Next Step.
  5. Enter the Username and Password.
  6. Click Create User
  7. Select the privileges you want to assign for this user.
  8. Click Next Step.
  9. Click Return Home.
  1. Open phpMyAdmin in cPanel.
  2. Select the database you created earlier from the list on the left.
  3. Click on the Import tab at the top of the phpMyAdmin page.
  4. Click Choose File and select the .sql file from your local computer.
  5. Ensure the format is set to SQL and click Go to start the import process.
  6. Wait for the import to complete and verify that there are no errors.
  1. 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');
  2. Save the file.
Was this answer helpful?