Basic Guide To WordPress File And Directory Structure

Ultimate Guide To WordPress File And Directory Structure

WordPress platform is designed to be customized. It is really one of the most user-friendly solutions in any field. So, it’s essential for all WordPress users to have at least minimal knowledge of how the WordPress core works to navigate your WordPress site. For this, it would be a good idea to better understand WordPress file and directory structure in order to take full control of your site.

In this article, we are going to describe the WordPress root file and folder structure in detail that helps you to solve common WordPress problems by yourself.

WordPress File And Directory Structure

As we know, The directory structure is that files are grouped into a folder hierarchy. This explains how files are arranged for your website.

Nonetheless, knowing how files and folders are stored in WordPress will not only help you to solve several WordPress problems but also assist you to perform troubleshooting issues of your website.

To access your WordPress files, you have to use an FTP client such as FileZilla or File Manager so that you can connect to your WordPress server with it. 

Once you have connected to your WordPress site, you will see a file and directory structure that looks like this: 

WordPress files and directory structure

Moreover, you will see that it consists of a bunch of files that will assist you to run your WordPress site.

There are three main root files which are – 

  • wp-admin
  • wp-content
  • wp-includes

Apart from the root files, there are also some WordPress files and folders you would see in your WordPress site’s root directory.

  • .htaccess
  • index.php
  • license.txt
  • readme.html
  • wp-activate.php
  • wp-blog-header.php
  • wp-comments-post.php
  • wp-config-sample.php
  • wp-cron.php
  • wp-links-opml.php
  • wp-load.php
  • wp-login.php
  • wp-mail.php
  • wp-settings.php
  • wp-signup.php
  • wp-trackback.php
  • xmlrpc.php

These are the core WordPress files and directories. We recommend you not change these files because it directly affects your site performance.

Now let’s know the function of each file.

WordPress Core Files Structure

1. wp-admin

The folder wp-admin holds administrative files which control the WordPress dashboard.

  • It basically contains all the configuration files of the WordPress installation.
  • It also possesses some other functions like loading the dashboard, establishing a connection to your database, etc.
  • In the wp-admin folder, the heart of the folder is admin.php which basically performs all the key functions like verifying whether any given user is actually the administrator or not etc. 

2. wp-includes

The wp-includes files are responsible for the way WordPress looks.

  • Basically, it contains all the core functions of your site design like the fonts, theme-compat, widgets etc.
  • In this folder, the heart of this directory is the functions.php file which holds all the functions that enable your WordPress installation to run and work to its fullest.
  • Without a function.php file, some important files included within the wp-includes folder are functions.php, cache.php, links.php, and versions.php.

3. wp-content

The wp-content folder is the folder in which all the themes, plugins, upgrades, or uploads you have used on your site are stored in that directory folder. For instance, if you install a new plugin/theme, all the information on that file is stored here. 

Moreover, it has 3 main folders which are plugins, themes, and uploads.

Plugin folder

All plugin information is stored in the ‘plugin’ folder. Once you have installed any plugin, all the directory files of that plugin will be contained in that sub-folder. Apart from that, they will be available under the “Plugins’ ‘ tab in the WordPress Admin dashboard. From here, you can activate or disable the plugin. 

If you don’t install any plugins for your site, this subfolder will be empty so that you can perfectly manage your WordPress site.

Theme folder

The theme folder includes all the themes that will be available or installed on your WordPress site.

 You can install multiple themes for your site but you have to activate one theme at a time. Here, each theme is stored in its own folder so it’s quite easy to find out the theme details from the subfolder.

Uploads

In the uploads folder stores all the media files like images, PDFs, and Docs you have uploaded on your website from the very beginning of your site. Here, all the media files are arranged by year, month, and day order.

WordPress Configuration Files

Instead of core files, WordPress file and directory also holds some configuration files for your WordPress blog. These are – .htaccess, wp-config.php, and index.php files. All these files contain specific settings for your site performance.

wordpress configuration files

.htaccess 

This .htaccess (abbreviation of hypertext access) file is essential for a WordPress site to function. It is basically a server configuration file. Moreover, it helps you to manage the permalink structure, and files of your WordPress site.

Furthermore, You have to be careful to use the file as one mistake the.htaccess file will immediately take down the whole site. It also provides you the option to block a certain IP address to access your site. 

So, it is an incredibly important configuration file for your site performance and security.

Sometimes .htaccess may not be seen in your cPanel. To appear it, you need to go back to the cPanel settings and choose the Show Hidden files to appear the file.

wp-config.php

The wp-config.php file is the main file for your site because it contains your website’s database-connection information. You have to be very careful to edit the file because it is a medium of your WordPress and the database. In addition, this file stores your WordPress database name, password, user information etc.

Not only this, but you can also enable the Multisite feature and set global settings from this file for your site. It is incredibly important when you are moving your website to a new server or taking a backup of your site.

index.php 

Another fundamental file would be the index.php file. If you don’t have a front-page.php or a home.php file installed, this file will act as the default homepage for your website.

Whenever a user requests a page or link, the index file essentially loads all of your WordPress files and initializes them to display the requested page or link.

That’s all. So, these all are the root files and directories of WordPress that you have to be more familiar with as a starting.

Conclusion

Although for the first attempt, it might be a bit difficult to understand the function of the WordPress file and directory structure, it would undoubtedly come in very handy in the future for managing your site or detecting any issue on your site. 

Hopefully, this basic guide helps you to familiarize yourself with the core files of your website. To learn more about WordPress, you may check our WordPress Tips and How-To’s to know more about WordPress.

If this article will help you, then please subscribe to our YouTube channel to get more tutorials related to WordPress. You may join our Facebook page to update yourself with more tips, solutions, offers, and so on.

You may also ask any questions related to it in the comment or want us to write on some specific topics you have in your mind. We appreciate your further comments, support, or suggestions!


Leave a Reply