What Is public_html?

public_html is the main folder where your website files are usually stored on your hosting account.

When someone visits your domain name, the web server looks inside the public_html folder to find the files that should be displayed.

For example, if your domain is: https://yourdomain.co.za

the website files for that domain are usually inside its public_html folder.


Why Is public_html Important?

The public_html folder is important because it is usually the visible website folder.

Files placed inside public_html can be accessed by visitors through your website address.

For example, if you upload a file called: about.html

inside public_html, it may be available at: https://yourdomain.co.za/about.html


What Files Are Stored in public_html?

The files inside public_html depend on your website.

Common files and folders may include:

  • index.php
  • index.html
  • .htaccess
  • images
  • css
  • js
  • wp-admin
  • wp-content
  • wp-includes
  • wp-config.php

WordPress websites usually have WordPress files inside public_html.

Custom websites may have HTML, PHP, CSS, JavaScript, and image files.


What Is the Index File?

The index file is usually the main file loaded when someone opens your website.

Common index files include:  index.php and index.html

If there is no valid index file inside public_html, your website may not load correctly.


Where Do I Find public_html in DirectAdmin?

You can find public_html using File Manager.


Step 1 – Log Into DirectAdmin

Open your browser and visit: https://cp.yourdomain.co.za (Replace yourdomain.co.za with your own domain name.)

Enter your DirectAdmin username and password.

Click: Log In


Step 2 – Open File Manager

Once you are logged into DirectAdmin, open File Manager.

Click: System Info & Files

Then click: File Manager


Step 3 – Open the Domain Folder

In File Manager, open your domain folder.

Click: domains

Then click: yourdomain.co.za

Then click: public_html

Replace yourdomain.co.za with your own domain name.

You should now see the website files for that domain.


public_html and Multiple Domains

If your hosting account has more than one domain, each domain may have its own public_html folder.

For example:  domains/yourdomain.co.za/public_html or domains/anotherdomain.co.za/public_html

Make sure you upload files to the correct domain folder.


public_html and WordPress

If WordPress is installed on your main domain, the WordPress files are usually inside public_html.

Common WordPress files and folders include:

  • wp-admin
  • wp-content
  • wp-includes
  • wp-config.php
  • index.php

Do not delete WordPress files unless you know exactly what you are doing.


Should I Upload Website Files Into public_html?

Yes, in most cases website files should be uploaded into the public_html folder for the correct domain.

If you upload files outside public_html, visitors may not be able to see them through the website.


Important Notes

Please keep the following in mind:

  • public_html is usually the main website folder.
  • Files inside public_html may be publicly accessible.
  • Upload website files to the correct domain’s public_html folder.
  • Do not delete files unless you know what they are.
  • WordPress websites rely on files inside public_html.
  • If your website does not load, check whether the correct files exist in public_html.

When Should I Contact HostworX Support?

Contact HostworX Support if:

  • You cannot find the public_html folder.
  • You are unsure where to upload your website files.
  • Your website files were uploaded but the website does not load.
  • You accidentally deleted files from public_html.
  • Your website shows a 403, 404, or 500 error.
  • You need help restoring files from backup.

Conclusion

public_html is the main folder where your website files are usually stored.

If you are uploading a website, replacing files, or checking your website structure, public_html is usually the folder you need to use.

Always make sure you are working inside the correct domain folder before uploading, editing, or deleting files.

  • directadmin file management, public_html
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Create an FTP Account in DirectAdmin

FTP accounts allow you to upload, download, and manage website files using FTP software such as...

How to Change File Permissions in DirectAdmin

File permissions control who can read, write, or execute files and folders on your hosting...

How to Create an Additional FTP Account in DirectAdmin

Additional FTP accounts allow other users to upload and manage website files without giving them...

How to Upload Website Files Using DirectAdmin

DirectAdmin includes a built-in File Manager that allows you to upload and manage your website...

How to Use File Manager in DirectAdmin

File Manager allows you to manage your website files directly from your web browser without...