India English
Kenya English
United Kingdom English
South Africa English
Nigeria English
United States English
United States Español
Indonesia English
Bangladesh English
Egypt العربية
Tanzania English
Ethiopia English
Uganda English
Congo - Kinshasa English
Ghana English
Côte d’Ivoire English
Zambia English
Cameroon English
Rwanda English
Germany Deutsch
France Français
Spain Català
Spain Español
Italy Italiano
Russia Русский
Japan English
Brazil Português
Brazil Português
Mexico Español
Philippines English
Pakistan English
Türkiye Türkçe
Vietnam English
Thailand English
South Korea English
Australia English
China 中文
Somalia English
Netherlands Nederlands

How to Upload a Website to cPanel: Step-by-Step Guide

Buy domains, business emails, hosting, VPS and more: Get Started

Cheapest Domains in South Africa

Get your .Co.Za or .Com domain now for just 45.00 ZAR

.CO.ZA for 45.00 ZAR | .COM for 150.00 ZAR

cPanel gives you a browser based way to upload and manage your website files on a hosting account, without needing to touch a server directly or rely on command line tools.

Before uploading anything, it helps to have a few things ready: your website files, an active hosting account, a domain, and database details if your site relies on one. 

The exact process for how to upload a website to cPanel also depends a little on what kind of site you’re dealing with. 

Whether that’s a simple HTML site, a WordPress installation, or a more complex database driven application.

This guide walks through the full process step by step, from preparing your files through to testing the finished site once it’s live.

Be it that this is your first time uploading a website or you’re moving an existing one over from another host, the same general steps apply. 

The exact tools you use inside cPanel might vary slightly depending on your hosting provider’s interface, but the overall flow stays consistent from provider to provider.

What You Need Before Uploading a Website to cPanel

What You Need Before Uploading a Website to cPanel

Before starting, it helps to have the following ready:

  • An active cPanel hosting account
  • Access to cPanel
  • Website files
  • A domain connected to the hosting account
  • A ZIP file of the website files, preferably
  • Database backup if the website uses a database
  • Database name, username and password
  • FTP or SFTP credentials if using an alternative upload method

It also helps to know the website’s document root before uploading anything, since this is the exact folder your files need to land in for the site to actually load correctly. 

Getting this wrong is one of the most common reasons a freshly uploaded site doesn’t show up the way it’s supposed to.

Having everything on this list ready before you start also saves a fair amount of back and forth. 

There’s nothing more frustrating than getting halfway through an upload only to realize the database backup was never exported, or that the domain still needs to be pointed to the hosting account before anything will actually display.

Step 1: Prepare Your Website Files for Upload

Start by gathering all the website files and folders you’ll be uploading.

Check that the site’s main file is included, such as index.html or the appropriate entry point file for whatever application you’re running. 

Remove anything unnecessary before uploading, since old test files or unused assets just add clutter.

Compressing the website into a ZIP archive makes the upload noticeably easier, since it turns dozens or hundreds of individual files into a single upload rather than something that could time out partway through. 

If the website uses a database, export that separately, since it isn’t part of the file upload itself.

It’s worth double checking the ZIP file’s contents before uploading too. 

Occasionally a ZIP tool adds an extra folder layer automatically, which can cause the same kind of nested folder issue you’ll want to avoid later during extraction. 

Opening the archive and confirming the structure looks right beforehand can save a step once the files are already on the server.

Step 2: Log In to cPanel

Access the cPanel login

Access the cPanel login provided by your hosting provider and enter your credentials.

Once you’re in, locate File Manager from the cPanel dashboard. 

File Manager is what lets you upload, extract, move and manage website files directly from your browser, without needing any separate software installed on your computer.

Step 3: Open Your Website’s Document Root

Open File Manager and locate public_html, which is typically the document root for your primary domain.

It’s worth knowing that addon domains and subdomains can have different document roots entirely, so it’s important to confirm you’re uploading files to the directory associated with the correct domain, rather than assuming public_html always applies.

Step 4: Upload Your Website Files to cPanel

With the correct document root open, click Upload and select the website’s ZIP file.

Wait for the upload to complete, which can take a little longer depending on the file size and your connection. 

Once it finishes, return to File Manager and confirm the archive is actually present in the directory before moving on to the next step.

Step 5: Extract the Website Files

Extract the Website Files

Select the uploaded ZIP file and choose Extract, making sure the files land in the correct document root.

Once extraction finishes, check the resulting folder structure carefully. 

A common mistake here is ending up with something like public_html/website/index.html, when the site should actually be sitting directly inside public_html itself. 

If that happens, you’ll usually need to move the contents up a level so the homepage loads from the correct root path.

This one small folder structure issue is responsible for a surprising number of “my site isn’t loading” situations, so it’s worth taking a moment to actually look inside the extracted folder rather than assuming everything landed where it should.

Step 6: Set Up the Website Database

This step only applies if your website actually uses a database.

  • Create a MySQL or MariaDB database in cPanel
  • Create a database user
  • Assign the required privileges
  • Import the database backup through phpMyAdmin
  • Update the website’s configuration file with the new database credentials

For WordPress specifically, wp-config.php is the file that normally holds the database connection details, so this is where you’ll enter the new database name, username and password once everything is set up on the cPanel side.

Step 7: Connect Your Domain to the Website

Make sure your domain actually points to the hosting server the files were uploaded to.

It helps to understand the difference between changing nameservers and updating individual DNS records, since they accomplish similar things in different ways. 

Confirm that the domain is assigned to the correct hosting account and document root, and allow time for DNS changes to take effect where necessary, since this part isn’t always instant.

Step 8: Configure SSL for Your Website

Check whether SSL has already been issued for the domain, and enable HTTPS if it hasn’t been already.

Once that’s done, test the HTTPS version of the website directly rather than assuming it works. 

If you run into mixed content warnings, where some resources still load over the old insecure connection, those are worth addressing before considering the site fully finished.

Mixed content issues often trace back to hardcoded links inside the site’s files or database that still reference the old http version of the domain. 

Updating those references, whether manually or through a search and replace tool appropriate to your platform, usually clears the warning up.

Step 9: Check File and Folder Permissions

Permission settings affect whether your website can actually read and write the files it needs to function properly.

Check whether your files and directories have appropriate permissions, and avoid the temptation to set everything to broad, insecure permissions just to make an error message disappear, since that trades a visible problem for a hidden security risk

If the website still can’t access files correctly after checking permissions, ownership is worth checking next, since a file owned by the wrong user can cause similar symptoms.

Step 10: Test Your Website After Uploading

Once everything is in place, go through the site the way an actual visitor would rather than just glancing at the homepage.

  • Open the homepage
  • Test internal pages
  • Test images and other media
  • Test forms
  • Test login functionality
  • Test database driven features
  • Test links and redirects
  • Test HTTPS
  • Check the website on mobile and desktop

Working through this list catches most issues before a real visitor ever runs into them. 

It’s tempting to skip straight to checking the homepage and calling it done, but the pages and features that get skipped during testing are usually exactly the ones that turn out to have a problem later.

How to Upload a WordPress Website to cPanel

How to Upload a WordPress Website to cPanel

WordPress is likely a big part of what brings people to this guide in the first place, so it’s worth covering separately.

  • Upload WordPress files
  • Create or import the database
  • Configure wp-config.php
  • Point the domain to the hosting account
  • Confirm the WordPress URL
  • Log into WordPress
  • Check permalinks
  • Test plugins, themes and media

Once WordPress is uploaded and connected to its database, the process largely mirrors the general steps above, just with a few WordPress specific checks layered on top, particularly around permalinks and plugin compatibility after the move.

Alternative Ways to Upload a Website to cPanel

File Manager isn’t the only way to get your files onto the server. 

A couple of alternatives are worth knowing about, particularly if you’re used to a different workflow.

a) Uploading Through FTP

FTP makes more sense than File Manager in situations involving a large number of individual files, or when you’re used to a dedicated FTP client and want a more familiar workflow.

The basic process involves connecting to your server using the appropriate FTP credentials, then dragging your files across into the correct directory. 

This method tends to suit developers who are already comfortable managing file transfers this way.

b) Uploading Through Git

Git deployment is a useful option for developers managing code through a repository, rather than uploading static files by hand each time something changes.

This route tends to be preferable when a site is actively being developed and updated regularly, since it allows changes to be pushed directly rather than repeating the ZIP and extract process every time. 

For most standard website uploads, though, File Manager remains the more straightforward starting point, and it’s usually the method worth defaulting to unless you have a specific reason to reach for FTP or Git instead.

Common Problems When Uploading a Website to cPanel

Common Problems When Uploading a Website to cPanel

a) Website Shows a 404 Error

This is usually caused by an incorrect document root, a missing index file, or incorrect DNS and domain configuration pointing somewhere other than where the files actually live.

b) Website Shows a 403 Error

Look at file permissions, directory access settings, or broader configuration issues that might be blocking access to the files entirely.

c) Website Shows a 500 Error

This typically points to PHP or application errors, problems within a .htaccess file, or incorrect configuration somewhere in the setup.

d) Website Loads but Looks Broken

Missing CSS or JavaScript files, incorrect file paths, or files uploaded into the wrong directory are the usual suspects here, often tracing back to that public_html/website subfolder mistake from earlier.

e) Database Connection Error

Check for incorrect database credentials, database user permissions, or a configuration file that hasn’t been updated with the correct connection details.

f) Domain Still Shows the Old Website

This generally comes down to DNS not having updated yet, the domain still pointing to the old server, or DNS records that are simply incorrect and need to be fixed before the new site will appear.

Upload Your Website to Reliable cPanel Hosting

Having an easy to use control panel makes the whole process of managing a website considerably simpler, whether you’re uploading a brand new site or moving an existing one over from another host.

If you’re looking for a hosting environment built around this kind of straightforward file management, Truehost South Africa’s cPanel hosting is worth considering. 

It gives you the tools to upload and manage your website through cPanel, without needing to piece together separate software just to get your files online.

Now that you know how to upload a website to cPanel from start to finish, getting your site live really comes down to working through each step carefully rather than rushing the process.

Ready to get your website online? Explore Truehost’s cPanel hosting plans and get started today.

Ivy Ngari
Author

Ivy Ngari

SEO Copywriter Kenya

Ivy Waithera Ngari is an SEO specialist and digital marketer based in Nairobi, Kenya, with experience in creating high-performing blog content and data-driven infographics. She specializes in keyword research, on-page SEO, and content optimization using tools like SEMrush, Ubersuggest, and Google Keyword Planner. Ivy has worked with agencies and marketing teams to improve search rankings, boost organic traffic, and enhance audience engagement through strategic storytelling and visual content. She is certified in SEO by the eMarketing Institute and has hands-on experience with WordPress, Google Analytics, and Search Console.

View All Posts