WordPress Files and Directory Structure
Having an understanding of the WordPress directory structure will help you to navigate more efficiently. In this article, we are going to discuss WordPress directory structure in detail.
What is WordPress?
WordPress is a web content management system. It is used to create websites and add data into it. Using a CMS like WordPress enables people who are not technically savvy to perform operations easily with the help of a user friendly interface.
What is Directory Structure?
The directory structure is the organization of files into a hierarchy of folders. It describes how files are arranged for an application. A hierarchy is similar to a tree structure.
The WordPress Directory Structure
The core WordPress files and directories are listed below.
These are the core WordPress directories and files. Now, let’s see some of the important files and folders in detail. Keep in mind that the first three are folders and rest are files.
The admin tools are powered by this folder. As it’s name indicates, this deals with the administrator. The main file inside this directory is the admin.php. It enables the connection to the database, displays the WordPress dashboard, and performs any other number of key functions, such as checking if any given user is in fact the admin in question.
The next folder we are going to see is the wp-content. The Themes and Plugins are familiar to every WordPress user. These are stored inside this directory.
The plugins are used to add more functionality to the WordPress site. Plugins can offer custom setup to the WordPress installation while the default WordPress installation is designed to be light weight.
The WordPress themes provide the graphical interface to the website. There are many files that work together to achieve this.
The themes and plugins are the major parts in the wp-content directory.
The wp-includes is the final top-level folder and is large in size. As we have seen earlier, the wp-admin includes all the files necessary to power said admin functions, wp-content stores all your themes and plugins, and wp-includes is what enables the site to run.
This folder is where most of the WordPress core files are stored. A fresh WordPress install will include over 140 different files in the main directory, and fourteen different folders including certificates, fonts, js, theme-compact, and widgets.
These subfolders aren’t important as the files included in the main folder, such as functions.php. This file is part of WordPress’ core, and it comes with a lot of the functions that enable the WordPress installation to work. As an example, some lines of code will be seen when you open the file on a text editor, and they’re just a regular function meant to transform dates into different formats.
The index file loads and initializes all your WordPress files when a page is requested by a user.
This is WordPress license file. The WordPress is a free software and is licensed under the GNU General Public License as published by the Free Software Foundation.
This core file contains the instructions to the user as its name indicates.
This contains the following:
Function: Adds an action hook specific to this page that fires on wp_head.
Fires before the Site Activation page is loaded, but on the wp_head action.
Function: Loads styles specific to this page.
Action Hook: Fires before the Site Activation page is loaded.
This folder contains the http headers.
WordPress uses an XML-RPC interface. WordPress has its own implementation for WordPress-specific functionality in an API called the WordPress API. This should be used when possible, and your client should use the API variants beginning with the wp prefix.
XML-RPC functionality is turned on by default since WordPress 3.5.
In previous versions of WordPress, XML-RPC was user enabled. To enable, go to Settings > Writing > Remote Publishing and check the box.
It is one of the core WordPress files which contains information about the database, including the name, host (typically localhost), username, and password.
There are many other folders and files, but these are the most important folders and files in the WordPress directory structure.
If you need any further assistance please contact our support department.