Understanding Your Website's File Structure

Understanding Your Website's File Structure

Overview

If you're managing a website through cPanel or FTP, you'll eventually come across folders and files that make up your website.

At first, this can look confusing. Fortunately, you usually only need to understand a few basic concepts to manage your website safely.

This guide explains the basics of website file structure and where your website's files normally belong on a Have Freedom Hosting account.


Your Website's Home Directory

For most standard hosting accounts, your primary website is stored inside:

public_html

Think of public_html as the main folder for your website.

Files placed in the appropriate location inside this directory can be made available to visitors through your domain.

For example:

public_html/
├── index.html
├── about.html
├── contact.html
├── images/
└── css/

The exact structure will depend on how your website was built.


What Is an Index File?

An index file is commonly the default page that a web server looks for when someone visits a website or directory.

Common examples include:

  • index.html

  • index.php

For example, if someone visits:

https://example.com/

the server may load:

public_html/index.html

or:

public_html/index.php

depending on how the website is configured.

If you upload a website and visitors see a directory listing, a default page, or an unexpected page, an incorrectly placed or missing index file may be one possible cause.


Website Files and Folders

A website is usually made up of many different files and folders.

You may encounter files such as:

  • HTML files

  • PHP files

  • CSS files

  • JavaScript files

  • Images

  • Fonts

  • Configuration files

You may also see folders containing related files.

For example:

public_html/
├── index.php
├── css/
├── js/
├── images/
└── uploads/

The names and structure depend entirely on the website or application you're using.


WordPress Websites

WordPress has its own standard file structure.

A typical WordPress installation contains folders such as:

public_html/
├── wp-admin/
├── wp-content/
├── wp-includes/
├── index.php
└── wp-config.php

You generally shouldn't move, rename, or delete WordPress files unless you know what they do.

Most routine WordPress management can be handled through the WordPress dashboard rather than manually editing files.


Subdomains and Additional Websites

Your hosting account may contain more than one website.

Additional domains or subdomains can have their own document root directories.

For example:

public_html/
└── blog/

A subdomain could potentially use the blog directory as its website location.

The exact location depends on how the domain or subdomain was configured in cPanel.

If you're unsure where a particular domain points, check its configuration in cPanel rather than guessing.


Website Files vs. Personal Files

Your website's document root should contain files that are intended to be accessed by your website.

You should generally avoid storing private documents, passwords, backups, or other sensitive personal files inside a publicly accessible website directory unless you know how access is being restricted.

A file placed inside a website's document root may potentially be accessible through a web browser.

For example, placing:

public_html/private-document.pdf

does not automatically make that document private.


Uploading Files to the Correct Location

When uploading an existing website, one of the most common mistakes is putting the files in the wrong directory.

For your primary website, the files will normally belong in:

public_html

For example, if you receive a ZIP file containing:

website/
├── index.html
├── images/
└── css/

you generally want the contents of the website to end up in the appropriate document root.

Be careful not to accidentally create:

public_html/website/index.html

when you intended:

public_html/index.html

The extra directory can cause your website to appear missing or require an unexpected URL.


Hidden Files

Some applications use files that are hidden by default.

One common example is:

.htaccess

Files beginning with a period may not always be immediately visible in file managers.

These files can control important website behavior, including redirects and access rules.

If you're using cPanel File Manager, you may need to enable the option to show hidden files.

Be careful when editing hidden files. A small mistake in a configuration file can cause website errors.


File Permissions

Website files and folders have permissions that determine who can read, write, or execute them.

You may see permissions represented by values such as:

644

or:

755

For most customers, you should not need to change file permissions manually.

If an application specifically tells you to change a permission, follow the application's instructions carefully.

Avoid changing permissions simply because a file or folder isn't working unless you know what the required permission should be.


Don't Delete Files You Don't Recognize

It's normal to encounter files and folders you don't recognize.

They may belong to:

  • WordPress

  • A website application

  • cPanel

  • A security tool

  • A plugin

  • A theme

  • A previous website configuration

  • Another service running on your account

If you're unsure what something does, don't delete it just to clean things up.

Ask support or check the documentation for the application that created it first.


File Manager vs. FTP

There are two common ways to manage website files.

cPanel File Manager

File Manager is convenient when you need to:

  • Upload a few files

  • Create folders

  • Rename files

  • Extract ZIP files

  • Edit simple files

  • Delete or move files

FTP

FTP or another supported file-transfer method is useful when you need to:

  • Upload many files

  • Download website files

  • Transfer an existing website

  • Work with files from your computer regularly

Both methods ultimately manage files on the same hosting account.


Before Making Major Changes

If you're about to replace or significantly modify an existing website, take a moment to make sure you have a backup or another copy of the files you may need.

This is especially important before:

  • Replacing an entire website

  • Deleting folders

  • Installing major software updates

  • Changing application files

  • Making significant configuration changes

It's much easier to recover from a mistake when you have a copy of the original files.


A Simple Example

Suppose your domain is:

example.com

and your website is stored in:

public_html/

You might have:

public_html/
├── index.html
├── about.html
├── contact.html
├── css/
│   └── style.css
└── images/
    ├── logo.png
    └── banner.jpg

A visitor going to:

example.com

would normally receive the site's index page.

Your other files can then be referenced by the website as needed.

The exact structure will vary depending on the website.


When Something Goes Wrong

If your website suddenly stops working after changing files, don't panic.

First, think about what changed.

For example:

  • Did you upload new files?

  • Did you move something?

  • Did you rename a file?

  • Did you delete something?

  • Did you edit a configuration file?

  • Did you install or update an application?

If you know what changed, let Have Freedom Hosting Support know.

Providing the approximate time of the change and what you were attempting to do can make troubleshooting much easier.


Need Help?

You don't need to be a web developer to use your hosting account.

If you're unsure where a file belongs, how to upload your website, or whether something is safe to change, contact Have Freedom Hosting Support before making a change you're uncomfortable with.

We're happy to help you understand what you're looking at and point you in the right direction.

 

  • 0 Kasutajad peavad seda kasulikuks
Kas see vastus oli kasulik?

Seotud artiklid

Connecting to a third-party mail client

How to Set Up Your Have Freedom Email in an Email App Overview You can use your Have Freedom...

Accessing your email

How to Access Your Have Freedom Email Overview Have Freedom Hosting provides Webmail access for...

Installing WordPress (or other applications) via Softcalous

How to Install WordPress or Other Applications Using Softaculous Overview Have Freedom Hosting...

Uploading files via FTP to your website

How to Upload Files to Your Website Using FTP Overview FTP, or File Transfer Protocol, allows...

Uploading files via the cPanel to your website

How to Upload Files to Your Website Using cPanel File Manager Overview cPanel's File Manager...

Powered by WHMCompleteSolution