fbpx

Beginner’s Guide To WordPress File Structure And Directories

Do you want to learn WordPress file structure? But feel overwhelmed due to the number of files in the WordPress directory?

In this article, we are going to discuss the WordPress File Structure. You’ll understand the function of each of the WordPress files and folders.

It will help you master WordPress. Allowing you to configure WordPress files and troubleshoot common WordPress issues.

The only requirement is a site with WordPress installed. If not read our easy-to-follow guide on how to install WordPress for beginners.

If you want to learn more about WordPress. You should start a blog. This way you can put all your learnings to practice.

Why Learn WordPress File Structure?

Why-learn-wordpress-structure

You don’t need to learn about WordPress Files and directories to run your site. But, it helps you understand the way WordPress stores files and directories.

This comes in handy while solving fundamental WordPress issues. You will not require outside help.

Here are the reasons you should learn the WordPress file and directory structure.

  • You can find essential WordPress files to back up.
  • Find the WordPress themes and plugin files and troubleshoot them.
  • Locate the images, media and other uploads on WordPress.
  • Know about the core WordPress files and folders?
  • Learn about standard WordPress configuration files.

Now, to understand the WordPress file structure. We need to access the WordPress root directory.

READ: How To Back Up WordPress For Beginners?

How to Access WordPress Files and Directories?

accessing-wordpress-file-structure

To view the WordPress files we need access to the root directory. You can access the WordPress root  directory using two methods

  • File Manager – Web-based software provided by hosting service. You have to log in to your hosting account and locate the file manager from the different menu options.
  • FTP Client – Software installed on your PC that can connect to your hosting site. You need to install the software (FTP client). FTP client will need your hosting account username and password. 

I recommend using an FTP client method using software called FileZilla. FileZilla is free software and easy to install and use.

If you connect to the WordPress host using any of the methods discussed above. You will view the root directory structure in the image below.

wordpressdirectoryfiles

What is the WordPress File Structure?

understanding-files-wordpress-structure

The WordPress File Structure is a hierarchy of files and folders. A hierarchy resembles a tree-like structure. These files and folders can be  categorized into two types:

  • WordPress Core Files
  • WordPress Configuration Files

Apart from these two major categories of files. There may be a few extra files depending on the WordPress installation.

What are the WordPress Core Files?

WordPress Core Files are the main files in the WordPress file structure. You should never edit these files, always seek professional help.

The core WordPress files and folders are:

wordpresscorefiles

WordPress Directories

  • wp-admin – Used for storing the files related to the WordPress administration. Only the admin can access these files.
  • wp-includes – This directory contains the core WordPress files. 
  • wp-content – Contains the themes, plugins and content you have uploaded to your site.

WordPress Files

  • index.php – The entry point to a WordPress site. If a visitor requests a page from your site, this page loads first.
  • license.txt – WordPress uses the GNU General Public License. This file contains the license text.
  • readme.html – This file contains the instructions for the user to use WordPress.
  • wp-activate.php – Used by WordPress to activate different template components.
  • wp-blog-header.php – This folder has the http header files.
  • wp-comments-post.php
  • wp-config-sample.php – It’s a sample configuration file. You have to copy and rename this file to wp-config. Before proceeding to install WordPress
  • wp-cron.php – It’s used to Automate WordPress processes. Like scheduling posts, checking for software updates and sending email notifications.
  • wp-links-opml.php – The file helps export links from one blog to another. As the WordPress export is not able to handle the links export.
  • wp-load.php – Load required WordPress functions for specific purposes e.g to run a plugin.
  • wp-login.php – A page that shows up as the WordPress login page.
  • wp-mail.php – Gives the post-by-email functionality.
  • wp-settings.php – Sets up common WordPress variable settings.
  • wp-signup.php –  Presents a form for a new user to sign up.
  • Wp-trackback.php – Handle pingback and trackbacks on the WordPress site.
  • xmlrpc.php – Adds the remote interaction function to WordPress. Losing popularity nowadays.

Important: Two files .htaccess and wp-config.php are created after WordPress installation.

The presence of these extra files is dependent on your site setup. Some of the files may or may not be present in your WordPress file structure 

  • Favicon.ico – This contains the favicon usually generated by WordPress hosts.
  • robot.txt – These files contain instructions for the search engine bots.

What are the WordPress Configuration Files?

wordpress-configuration-files

WordPress configuration files store essential settings related to your WordPress site. These configuration files are:

  • .htaccess – This server configuration file is useful for managing redirects and permalinks.
  • wp-config.php – This WordPress file contains the global settings of your site. It also helps WordPress in connecting to the database.

You can edit these configuration files. Ensure you are backing up the file before editing. A small mistake during editing can make your site inaccessible.

What is the wp-admin Folder?

wp-admin-folder

The wp-admin folder contains WordPress administration files. It loads the WordPress dashboard after checking the credentials of the users. It provides access to authorised users only.

The level of access is dependent on the role of the user. Admin has extra privileges than regular users. It’s responsible for connecting the database to WordPress.

What is the wp-includes Folder?

wp-includes-folder

The wp-includes contain files that decide the looks of WordPress. It includes the WordPress core files are the largest in size. They control the visible parts like text and fonts etc.  

What is the wp-content Folder?

The wp-content folder contains the themes, plugins and all your uploads. The common files and folders in the wp-content folder are

wp-content-folder

Directories

  • Themes – This directory contains all the WordPress themes that you have installed. Themes decide the look of your site
  • Plugins – The plugins directory stores all the plugins that you install or download on your site. Plugins add extra functionalities to your site.
  • Uploads – Uploads directory has all your media files like photos and videos. This folder is in the format of /year/month/ by default.

Files

  • index.php – Each directory contains an index.php file. These files are different from the index.php in the WordPress root directory.
  • languages – These files store the languages file for non-English WordPress sites.
  • upgrade – A temporary folder used by WordPress while upgrading to a newer version.

You can edit the files in the WordPress themes folder. But remember that they can be overwritten while updating your theme. 

If you want to preserve your customization it is better to create a child theme.

Important Tip: Back up your uploads folder. As the rest of the files can be reinstalled from the source file.

Conclusion

As you understand WordPress files and folder structure better. It becomes easy to locate the WordPress files and troubleshoot them. We have covered the WordPress file structure with the functions of each of the files and folders.

Let’s have a brief recap of the things we have covered in this article.

  • What are the benefits of learning about WordPress files and directories?
  • Different methods to access WordPress files and directories.
  • Explored the WordPress file structure.
  • Finally, we discussed the three main WordPress directories. i.e wp-admin, wp-includes and wp-content.

What are your views on the WordPress File and directory structure? Let me know in the comments.

Spread the love

As a founder of Startblogpro, Bhagwant Singh helps the reader to launch a blog. A blog can be started as a side hustle and converted into a full-time business. Blogging as a business can help you to leave the 9-5 grind and be your own boss.

Leave a comment