Upload a website you’ve built

Put an HTML or PHP website online by uploading it as a zip, extracting it into public_html and checking every page loads.

TutorialBeginner15 min to completeLast updated
On this page
  1. What you’ll need
  2. Step 1: Check your home page file
  3. Step 2: Zip the contents, not the folder
  4. Step 3: Open public_html
  5. Step 4: Remove the placeholder
  6. Step 5: Upload the zip
  7. Step 6: Extract it
  8. Step 7: Delete the zip
  9. Step 8: Test every page
  10. Check it worked
  11. If something goes wrong
Level
Beginner
Time
About 15 min
Steps
8
You’ll finish with
A working result, checked

8 steps

What you’ll need

  • Your website files on your computer
  • DirectAdmin access

Uploading one zip file and extracting it on the server is far quicker and more reliable than uploading hundreds of files. You don’t need to wait for your domain to connect to do this. No site to upload yet? Start from a free HTML starter template.

Step 1: Check your home page file

Your site’s front page must be called index.html or index.php, all lowercase. Rename it if needed.

Step 2: Zip the contents, not the folder

Open your site folder, select everything inside it (index.html, css, images...), and compress those items into a zip. This makes the files land directly in public_html.

Step 3: Open public_html

Open System Info & Files › File Manager and go to domains/yourdomain.co.uk/public_html. Where to upload your website: public_html explained

Step 4: Remove the placeholder

If there’s a placeholder index.html you didn’t create, delete it so it can’t hide your site. Seeing a default page instead of your website

Step 5: Upload the zip

Select Upload, add your zip, and wait for it to finish.

Step 6: Extract it

Select the zip, choose Extract, keep the destination as public_html, and extract. Check index.html now sits directly inside public_html.

Step 7: Delete the zip

Remove the zip file from the server. It uses disk space and could be downloaded by anyone guessing its name.

Step 8: Test every page

Once your domain resolves, visit the site in a private window and click through each page, checking images and styles load.

Check it worked

https://yourdomain.co.uk shows your home page, and links, images and stylesheets all load without 404 errors in the browser console.

If something goes wrong

What happensWhat to do
Site appears at yourdomain.co.uk/foldernameYou zipped the folder. Move its contents up into public_html.
Some images or pages 404Linux is case-sensitive; check file name capitals match your links. 404 Not Found: why pages are missing and how to fix it
Unstyled pageCSS paths are wrong. Use paths starting with /, such as /css/style.css.
403 Forbidden on the home pageNo index file in public_html. 403 Forbidden: how to fix it

Following along without an account? Traxio web hosting gives you everything this tutorial uses, at £0.99 a month.

Where this fits: Web hosting for beginners brings together everything you need for a first website, in order.

Spotted something out of date or unclear? Tell us and we’ll fix it.

Keep going