Rank #1 on Google Maps
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
Turkey Türkçe
Vietnam English
Thailand English
South Korea English
Australia English
China 中文
Somalia English
Canada English
Canada Français
Netherlands Nederlands

How to Upload a Website to cPanel: Complete Instructions

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

Cheapest Domains in Kenya

Get your .Co.ke domain now for just KSh 999 (Back to 1200 in 7 days)

.CO.KE for KSh 999 | .COM for KSh 999

Uploading a website to cPanel for the first time can seem complicated but i promise it’s not. 

If you’ve built your site locally, maybe a clean HTML/CSS project, a custom PHP app, or a full WordPress installation, uploading a website is a walkover.

So before the upload, ensure you have these essentials:

  • A web hosting account with cPanel access (most shared, VPS, and reseller plans include it).
  • Your website files are neatly organized in a folder on your computer (HTML, CSS, JS, images, PHP files, etc.).
  • For dynamic sites like WordPress: An exported database (usually a .sql file) and your configuration details.
  • Configuration files ready, such as .htaccess or wp-config.php.
  • A stable internet connection large uploads can take time.

For anything beyond a few files, zip your entire website folder first. This speeds up the upload dramatically and reduces errors.

Take a moment to double-check that your files work perfectly in your local environment. Test everything now so you catch issues early.

Now lets get to how to upload a website to cPanel.

The Process of Uploading a Website to cPanel

Step 1: Log in to cPanel

Open your browser and go to your cPanel login URL.

It’s usually one of these formats:

  • https://yourdomain.com/cpanel
  • https://yourdomain.com:2083

Your hosting provider sends you these credentials when you sign up. Enter your username and password, and you’re in.

If you’re hosting with us at Truehost, you can also access cPanel directly from your client area dashboard, no need to remember the URL separately.

Step 2: Open File Manager

Once you’re inside cPanel, look for the Files section.

upload a website to cpanel

Click File Manager. This opens a full browser-based interface that shows all the files and folders on your server.

Step 3: Scroll to Find the Public Folder

Inside File Manager, you’ll see a directory tree on the left side.

You need to scroll to public_html. This is your website’s root folder. It’s where any files you want visitors to see need to live.

cPanel- File Manager - public_html

A quick heads up: if you’re uploading your site for your primary domain, upload directly inside public_html. If it’s for an addon domain or subdomain you’ve set up separately, scroll to the specific folder created for that domain.

When in doubt, public_html is where you start.

Step 4: Upload Your Website Files

Now, the actual upload.

If you compressed your files into a ZIP (recommended):

  1. Click the Upload button in the top toolbar of File Manager (under public_html).
Upload of file manager
  1. A new upload tab opens. Drag and drop your .zip file, or click Select File and browse to it on your computer.
  2. Wait for the upload to reach 100%. Don’t close the tab.
upload a website to cpanel
  1. Once done, click the link at the bottom to go back to public_html.
  2. Right-click your .zip file and select Extract.
  3. Confirm the extraction path, make sure it’s extracting directly into public_html, not into a nested subfolder.
  4. Once extracted, delete the .zip file to keep things clean.

If you’re uploading files individually (smaller sites):

  1. Click Upload.
  2. Select all your files and upload them. Note File Manager can only upload files, not folders, directly. Folders need to be inside a ZIP or created manually first.

Step 5: Create a Database (If Applicable)

If your site is a static HTML/CSS site, you can skip Steps 5–7. But if you’re running WordPress, Joomla, or any CMS, you need a database.

Here’s how to create one in cPanel:

  1. Go back to the cPanel home screen.
  2. Scroll to the Databases section and click MySQL Database Wizard or Database Wizard.
Database Wizard on cPanel
  1. Enter a name for your database and click Next Step. (cPanel will automatically add your account username as a prefix write down the full name.)
upload a website to cpanel
  1. Create a database user. Enter a username and a strong password. Click Create User.
upload a website to cpanel - create user
  1. On the next screen, check All Privileges and click Next Step.
upload a website to cpanel
  1. Done. Your database is created, and your user is linked to it.

Write down these three things you’ll need them in Step 7:

  • Database name (with the prefix, e.g., username_dbname)
  • Database username (e.g., username_dbuser)
  • Database password

Step 6: Import Your Database (If Applicable)

You’ve created an empty database. Now you need to fill it with your data.

  1. In cPanel, go to Databases → phpMyAdmin.
upload a website to cpanel
  1. In the left panel, click on the database you just created.
  2. Click the Import tab at the top.
upload a website to cpanel - phpMyAdmin
  1. Click Choose File and select your .sql file (or .sql.zip if it’s compressed).
  2. Click Go at the bottom.

The import runs automatically. For large databases, this can take a minute or two. When it finishes, you’ll see a success message and your tables will appear in the left panel.

Related: How to Access Webmail Through cPanel

Step 7: Update Configuration Files

Your files are uploaded. Your database is set up. But your website doesn’t know where to find that database yet.

That’s what the configuration file is for.

For WordPress:

  1. In File Manager, go to public_html (or wherever you uploaded WordPress).
  2. Find wp-config.php, right-click it, and select Edit.
  3. Update these four lines with your new database details:
  4. Click Save Changes.
define('DB_NAME', 'your_new_database_name');
define('DB_USER', 'your_new_username');
define('DB_PASSWORD', 'your_new_strong_password');
define('DB_HOST', 'localhost');

DB_HOST is almost always localhost on shared hosting. If you’re unsure, check with your host.

For custom PHP sites:

Look for a file named config.php, database.php, connect.php, or similar. Open it in the editor and update the database name, username, and password fields to match what you created in Step 5.

If you’ve migrated from one domain to another, also check your config file for any hardcoded old URLs and update them to your new domain.

Step 8: Update WordPress Permalinks

This step is WordPress-specific. If you’re on a static HTML site, skip ahead.

After uploading and connecting the database, WordPress sometimes loses track of its URL structure. Pages start returning 404 errors even though everything looks correct.

The fix is quick:

  1. Log in to your WordPress dashboard (yourdomain.com/wp-admin).
  2. Go to Settings → Permalinks.
  3. Don’t change anything just scroll down and click Save Changes.

That’s it. This regenerates your .htaccess file, which is what actually controls how WordPress handles URLs. It takes about ten seconds and fixes most post-migration link errors.

Read also: How to Host an HTML Website in cPanel

Step 9: Test Your Website

Don’t assume everything is working. Test it properly.

Check for Errors:

Open your domain in a browser. Does the homepage load? Click through a few pages. Try any forms or interactive elements. If you get a white screen, a 500 error, or a database connection error, something in your config file is likely off  go back and double-check the database credentials.

Make Sure Permissions are Correct:

File and folder permissions control who can read, write, or execute your site files. Wrong permissions are a common cause of 500 errors.

The standard rules:

  • Folders: 755
  • Files: 644
  • wp-config.php: 600 (more restrictive is better for security)

To check or change permissions in File Manager: right-click any file or folder, select Change Permissions, and set the correct value.

Clear Cache:

If you see an old version of your site or pages don’t load as expected, clear your browser cache and any caching plugin you’re running. On WordPress, go to your caching plugin’s settings and flush the cache. This forces everything to reload fresh from the server.

Step 10: Finalize Your Live Website

Almost there. Two final things to take care of before you call it done.

SSL/HTTPS:

Your site should load over HTTPS, not HTTP. Most cPanel hosts, including Truehost, provide free Let’s Encrypt SSL certificates you can activate with a few clicks.

In cPanel, find the SSL/TLS section (or look for Let’s Encrypt or AutoSSL, depending on your host). Enable and install the certificate for your domain.

After activating SSL on WordPress, go to Settings → General and make sure both the WordPress Address and Site Address start with https://. Then re-save your permalink settings to regenerate .htaccess with HTTPS rules.

Backup:

Now that your site is live, back it up.

In cPanel, use the Backup Wizard under the Files section to download a full account backup. This gives you a copy of both your files and your database. Store it somewhere safe, like a local drive, Google Drive, or an external backup service.

A backup right after going live means you have a clean, working restore point from day one.

Related: How to Access a Subdomain in cPanel

Your Website is Live

That’s the complete process from raw files on your computer to a fully working website on the internet.

Truehost Cpanel hosting screenshot

To recap what you’ve done:

  • Logged into cPanel and used File Manager to upload and extract your site files
  • Created a MySQL database and imported your data via phpMyAdmin
  • Updated your configuration file with the correct database credentials
  • Fixed permalink settings and tested everything thoroughly
  • Activated SSL and created your first backup

If something doesn’t work as expected, the most common culprits are: a typo in the config file, files extracted into the wrong folder, or a missed database import.

Go back through the steps methodically; the answer is usually in one of those three places.

Need reliable cPanel hosting to get started or move your site?

Our hosting plans at Truehost come with full cPanel access, free SSL, and local support. It’s a straightforward way to get your site running without the headaches.

Good luck, your site is live. That’s the hard part done.

Cheapest Domains in Kenya

Get your .Co.ke domain now for just KSh 999 (Back to 1200 in 7 days)

.CO.KE for KSh 999 | .COM for KSh 999

Winny Mutua
Author

Winny Mutua

SEO Specialist Nairobi, Kenya

Winfred Mutua is a results-driven SEO Specialist with over 5 years of experience in technical SEO, keyword strategy, and organic growth. She helps tech and web hosting brands improve visibility, rankings, and conversions through in-depth keyword research, content optimization, and technical SEO.
Proficient in SEMrush, Ahrefs, Screaming Frog, Google Analytics, and Search Console.
What She Excels At

- Technical SEO audits & site optimization
- Keyword research and search intent analysis
- SEO content strategy & long-form content creation
- On-page optimization and WordPress management
- Performance tracking and data-driven growth

Currently an SEO Content Specialist at Truehost Cloud, driving organic growth for a tech/web hosting brand. She has also built and scaled two niche WordPress websites from scratch, achieving monetization through organic traffic.
Fully remote-ready and open to new SEO opportunities.

View All Posts