+94 112 827 274 sales@hostasia.lk

How to Upload Your First HTML/PHP Website using cPanel (A Complete Guide)

Home

You have spent hours coding your website on your laptop (Localhost). It looks perfect. Now, the big question is: How do you show it to the world?

If you are a student or a beginner in web development, moving a website from your computer to a live server can feel a bit scary. But don't worry! You don't need to be a server expert to do this.

In this guide, we will show you exactly how to upload your HTML or PHP website using cPanel. It is the most popular and easiest way to manage web hosting in Sri Lanka.

Let’s get your site online in less than 5 minutes!

Step 1: Prepare Your Website Files

Before you log in to your hosting account, you need to get your files ready on your computer.

  • Check your main file: Make sure your homepage file is named exactly index.html or index.php (all lowercase).
  • Zip your files correctly:

    Open your project folder.

    Select all the files inside (CSS, Images, JS, and HTML/PHP files).

    Right-click and Compress them into a .ZIP file.

    Important: Do not use .RAR format. cPanel handles .ZIP files much better.

Step 2: Log in to cPanel

Open your web browser and go to your cPanel login URL (usually sent to your email when you bought the hosting).

  • Username: (Enter your username)
  • Password: (Enter your password)

Step 3: Open the File Manager

Once you are inside the cPanel dashboard, look for the Files section. Click on the icon labeled File Manager.

Think of this as the My Computer or File Explorer for your web server.

Step 4: Locate the public_html Folder

This is the most important step!

  • On the left-hand side menu, look for a folder named public_html.
  • Click on it to open it.

Note: Anything you put inside the public_html folder will be visible to the public. If you see a folder named cgi-bin inside, do not delete it; it is a system folder.

Step 5: Upload Your Zip File

  • Look at the top menu bar in the File Manager and click the Upload button.
  • A new tab will open. Click Select File and choose the .zip file you created in Step 1.
  • Wait for the progress bar to turn Green (100%).

Tip: Do not close the tab until the bar turns green, even if it says 100%.

Step 6: Extract Your Files

  • Go back to the File Manager tab. If you don't see your file yet, click the Reload button in the top menu
  • Right-click on your uploaded .zip file and select Extract.
  • A pop-up will appear asking where to extract. Just click Extract Files.
  • Once done, you will see your index.html and other folders appear..

Cleanup: You can now delete the .zip file from the server to save space.

Step 7: Test Your Website

Now for the exciting part! Open a new tab in your browser and type your domain name (www.your-website.com)

If you see your website design, πŸŽ‰ Congratulations! You have successfully hosted your first website.

πŸš€ Ready to Launch Your Website?

Get Your Fast and Secure Hosting Now

You’ve built your website, and now you know how to upload it. But a great website needs a fast and reliable home. Don't struggle with slow servers or complicated payments. At Host Asia, we make hosting simple for Sri Lankans

βœ… Singapore Servers (Super fast for LK visitors) βœ… Pay via Bank Transfer/Card (No USD issues) βœ… 24/7 Sinhala/Tamil/English Support
Get Started with our Unlimited Plan – Just Rs 250/mo!

Frequently Asked Questions

Everything you need to know about

I uploaded my files, but my website still (says Index of /). How do I fix this?

This error happens because cPanel cannot find your homepage file.
Fix: Make sure your main file is named exactly index.html or index.php. If you named it home.html or Index.html (capital I), rename it inside the File Manager to index.html.

Should I upload my files to the www folder or public_html?

You should always upload your files to the public_html folder. The www folder is just a shortcut (link) to public_html. If you upload to public_html, it automatically works for www.

My changes are not showing after I update my HTML file. Why?

This is usually a Browser Cache issue. Your browser is remembering the old version of your site to load it faster.
Quick Fix: Press Ctrl + F5 (Windows) or Cmd + Shift + R (Mac) on your keyboard to force a hard refresh. Alternatively, try opening your site in Incognito Mode.

My website says Not Secure in the address bar

This means your SSL certificate is not active yet. Most cPanel hostings come with free AutoSSL. It usually activates automatically within 24 hours of connecting your domain. If it takes longer, contact your hosting support.

Can I edit my HTML code directly in cPanel without re-uploading?

Yes! You don't need to re-upload the file every time you make a small change.
  • Right-click on your file in File Manager.
  • Select Edit or HTML Editor
  • Make your changes and click Save Changes at the top right.

Can I transfer my existing website to Host Asia for free?

Yes! Moving to a better host shouldn't be a hassle. Host Asia offers Free cPanel Migration and Free Website Migration services. Our team will safely transfer your files and data from your old provider to our servers without any downtime. Whether you are using cPanel or DirectAdmin, we handle the technical work for you so you can focus on your content.

How does Host Asia ensure my website is secure and fast?

Security and speed are our top priorities. All accounts come with Imunify 360 Protection to guard against malware and attacks, along with CloudLinux OS to ensure stable server performance. Additionally, we provide Free SSL Certificates (https://) for all domains to keep your visitor's data safe. With HTTP/2 Support and data centers in the US, Europe, and South Asia, your site loads quickly for visitors anywhere in the world.

Does Host Asia support dynamic PHP websites and databases?

Absolutely. Host Asia is optimized for developers and dynamic sites. We offer Unlimited MySQL Databases and full PHP Support, making it perfect for custom PHP projects, WordPress sites, or eCommerce stores. Whether you need Perl support or specific PHP versions, our platform is flexible enough to handle complex backend requirements seamlessly.

Can I install apps like WordPress easily with Host Asia?

Yes, you don't need coding skills to manage apps. Our hosting comes with Softaculous, which allows you to install over 380+ Free Apps (including WordPress, Joomla, and Magento) with just a single click. Plus, with Instant Account Activation and a 30-Day Money-Back Guarantee, you can get started immediately with zero risk.
   Host Asia. All Rights Reserved.