# What Is a Root Directory?

> Let's take a closer look at the root directory and what it contains. Then, we'll show you how to access and navigate your website folders.

- Author: [Sophia Lee](https://www.namehero.com/blog/author/sophia-lee/)
- Published: 2024-11-14
- Updated: 2024-11-14
- Category: [Domain Registration](https://www.namehero.com/blog/category/domain-registration/)
- Web page: https://www.namehero.com/blog/what-is-a-root-directory/

[![](https://blogcdn.namehero.com/blog/wp-content/uploads/2024/11/14161530/whatisrootdirectory-1024x576.jpg)](https://blogcdn.namehero.com/blog/wp-content/uploads/2024/11/14161530/whatisrootdirectory.jpg)

The root directory contains all the critical files and folders that power your website. But some site owners may not even know it exists, or how to access it.

By familiarizing yourself with the root folder, you’ll be able to manage your site more effectively. For example, you’ll know how to locate it to make file modifications or troubleshoot issues.

In this post, we’ll take a closer look at the root directory and what it contains. Then, we’ll show you how to access and navigate your website folders. Let’s get started!

## An Introduction to Root Directories

The root directory contains core files and folders needed to run your website. It also houses elements that you upload to your site, such as themes, plugins, users, media files, etc.

Most website owners manage to create and [maintain websites](https://www.namehero.com/blog/6-essential-wordpress-website-maintenance-tasks/) without ever needing to access the root directory. But there are some situations when you may need to edit specific files.

For instance, you might want to modify the *.htaccess* file to implement custom server-level rules.

Understanding your site’s folder structure also enables you to troubleshoot technical issues. For example, if you get locked out of the dashboard, you can dig around in the root directory to find the source of the problem.

If you fall victim to website hacks, you’ll want to access the root folder to check that your files are free from malicious code.

Plus, some website owners prefer to install plugins or carry out software updates in the root folder, rather than through the WordPress dashboard.

## What Does the WordPress Root Directory Contain?

Every WordPress installation comes with a root directory that contains critical files and folders that power your site.

For a standard configuration, you’ll find three main folders:

- **wp-admin** contains files needed for the admin interface to function properly.
- **wp-content** supports themes, plugins, and uploads, as well as the *index.php* file (which ensures that your website displays properly in a browser).
- **wp-includes** houses the remaining files required for core functionality.

You should also see a list of files in the root folder. This includes important components like *php.ini,* *robots.txt*, *wp-blog-header.php,* and *wp-login.php*.

If you’ve created a subdirectory, its folder will also reside in the public root directory.

Two of the most critical files in the root directory are the *.htaccess* file and *wp-config.php*. The former contains configuration settings (like redirects and permalinks) while the latter stores database connection details.

These files are typically created *after* the installation. They’re also the only files you should consider editing on your own. Still, you’ll want to [back up your site](https://www.namehero.com/blog/the-importance-of-a-redundant-backup-in-business/) first and proceed with extreme caution.

## How to Access Your Website’s Root Directory (3 Ways)

Now, let’s look at the three main ways to access your root folder.

### 1. Use File Manager

Most [web hosting providers](https://www.namehero.com/blog/hostinger-vs-godaddy-which-hosting-provider-is-better/) offer a File Manager that is accessible within your hosting provider’s control panel. This might be cPanel or a custom solution.

However, not all web hosts let their clients view/edit files and folders in the root directory. That’s why you should choose a quality web hosting company like NameHero:
 ![A good web host like NameHero enables you to access the root directory via cPanel](https://images.surferseo.art/420d6adf-9895-469a-aee8-f9276124a39b.png)

NameHero offers cPanel access, which makes it easy to manage your directories, files, and folders. Better yet, most of [our hosting plans](https://www.namehero.com/web-hosting) come with [free domain names](https://www.namehero.com/blog/how-to-get-a-free-domain-name-and-should-you/), SSL certificates, and advanced security features.

Once you’ve opened cPanel, you’ll need to visit File Manager to locate your website’s root folder. This is usually labeled *public_html*. It can also be called *www* or* htdocs*, or contain your website’s name.

At this point, you should be able to see the entire file system for your site.

### 2. Use FTP

If your hosting provider doesn’t offer File Manager, you can connect to your website files via [File Transfer Protocol (FTP)](https://www.namehero.com/blog/ftp-vs-sftp-which-should-you-choose/).

First, you’ll need to install an FTP client like FileZilla. Then, you have to supply your FTP credentials.

You should have received these via email when you signed up for a hosting account. You can also find them in the control panel.

These details include your host’s key, username, password, and port.

Once you’ve connected to your site, open the root directory. Here, you’ll find the entire file system displayed to the right of the interface:
 ![You can also access the root directory from operating systems via FTP](https://images.surferseo.art/2f474ef4-7779-419c-a39d-9116fe6f30d4.png)

Meanwhile, all your local computer files sit on the left-hand side.

### 3. Use the Admin Dashboard

If you only need to access the root directory to modify plugin or theme-related files, you could technically use the admin dashboard.

However, we only recommend trying this if the previous two methods don’t work, since it can be risky. And as always, be sure to make a fresh backup before you continue.

To get started, go to *Appearance > Theme File Editor *in the backend:
 ![How to find theme files in the admin dashboard](https://images.surferseo.art/34d0d3f7-c19e-43ff-9cfc-851768246a02.png)

Typically, you’ll need *functions.php *or *style.css *to change the look or functionality of your theme. Once you’ve made your edits, click on *Update File.*

If you need to access the code of your plugins, navigate to *Plugins > Plugin File Editor*. Then, use the dropdown box in the top right corner to choose the relevant plugin and click on *Select*.

At this point, you should see all the plugin files in the column to the right while the file content displays to the left:
 ![You can edit plugin files from the admin dashboard](https://images.surferseo.art/f26fb7c5-2813-42b4-bfcb-0907cef42d9e.png)

Note that it isn’t a good idea to modify active plugins since it can introduce compatibilities that may break your site.

## How to Navigate the Root Directory

Now that you have access to the root directory, let’s take a look at how to navigate the main branches.

As we discussed earlier, there’s a distinct hierarchy within the root directory, with files being stored within folders. You may also have subdirectories located here.

The first folder you’ll usually see is *wp-admin, *which stores all data related to the administrative backend. It’s best to avoid making direct changes to these files since they can be overwritten during core updates. Instead, we recommend using [child themes](https://www.namehero.com/blog/how-to-create-a-child-theme-in-wordpress-even-without-ftp/).

After that, there’s the *wp-content *folder, which contains the elements you upload to your site. Within the folder, you’ll find the following items:

- **A theme subdirectory** (labeled *themes*). Here, you’ll see a separate folder for each theme you’ve installed.
- **A plugin folder** (labeled *plugins*). Each folder corresponds to every plugin on your site.
- **An uploads subdirectory **(labeled *uploads*). This stores media files like images and videos. It’s usually sorted by year/month.

You may also find these items:

- **A translations folder** (labeled *languages*) that houses language files for non-English sites.
- **An upgrade folder** (labeled *upgrade*) that may appear temporarily when you upgrade to a new version.
- **Custom subfolders and files**, which may be added during [custom development work](https://www.namehero.com/blog/custom-wordpress-development-do-you-need-it/), or by plugins.

The last of the main folders is *wp-includes. *Here, you’ll find CSS, JavaScript, and PHP files that support the remaining features that enable your site to run properly.

Unless you know what you’re doing, it’s best to leave these files alone. Changes can result in security vulnerabilities and potential breakdown of functionality.

## Conclusion

Every default WordPress installation contains a root directory that houses critical folders that run your website, including *wp-admin *and *wp-content.* You may see other folders if you’ve set up subdirectories or used custom development solutions.

These folders branch out into further folders and/or files. For example, *wp-content *stores folders that contain plugins, themes, and media files, but it also houses the *index.php *file. Typically, you’ll access the root directory via File Manager. But you can also connect to it from your operating system via FTP.

Do you have any questions about your website’s root directory? Let us know in the comments below!

## Related posts

- [CNAME vs A Record: Key Differences Explained](https://www.namehero.com/blog/cname-vs-a-record-key-differences-explained/)
- [What Is Domain Hosting? A Simple Guide for Beginners](https://www.namehero.com/blog/what-is-domain-hosting-a-simple-guide-for-beginners/)
- [Domain vs. URL: How Are They Different?](https://www.namehero.com/blog/domain-vs-url-how-are-they-different/)
