fbpx

Beginner’s Guide To WordPress File Structure And Directories

Do you want to learn more about the WordPress file structure? And you don’t know where to start from? We are here to help you.

In this article, we are going to discuss WordPress files and folders. We’ll discuss the functions of each of the WordPress files and folders.

This will help you in configuring and troubleshooting the most common WordPress issues.

For this, you should have a WordPress installation. If you have not installed WordPress. I have an easy to follow guide for you.

READ: How To Install WordPress For Beginners?

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

Here are the major topics that we are going to discuss in this article.

Let’s start with the benefits of learning the WordPress file structure. 

Benefits Of Learning About WordPress File and Directory

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

This comes handy when you have to solve the basic WordPress issue’s without outside help.

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

  • You can find out the important WordPress files to backup.
  • Find the WordPress themes and plugins files and troubleshoot them.
  • Locate the images, media and other uploads on WordPress.
  • Know about the core WordPress files and folders?
  • Learn about common configuration files.

First, let’s understand the files in the WordPress installation. To study the WordPress structure we have to view the WordPress root directory.

READ: How To Back Up WordPress For Beginners?

How to Access WordPress Files and Directories?

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 – A 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 as in the image below.

What is the WordPress File 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 file. Tthere are a few extra files depending upon the WordPress installation.

What are the WordPress Core Files?

WordPress Core Files are the main files used for running WordPress. You should never edit these files, always seek professional help.

The core WordPress files and folders are:

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 the content that you have uploaded to your site.

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 Wpordpress
  • wp-cron.php – It’s used to Automate WordPress processes. Like scheduling of posts, checking for software updates and sending of email notifications.
  • wp-links-opml.php – The file helps exporting 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 for e.g to run a plugin.
  • wp-login.php – A page that shows up 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’s pingback and trackbacks on the WordPress site.
  • xmlrpc.php – Adds the remote interaction function to WordPress. Losing popularity nowadays.

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

  • Favicon.ico – 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 store important 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 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?

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 to the database to WordPress.

What is the wp-includes folder?

The wp-includes contain files that decide the looks of WordPress. It contains 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
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 have 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.

Most important tip: You should backup 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 for you to locate the 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 the 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