WordPress Files and Directory Structure

Last modified: June 17, 2020
You are here:
Estimated reading time: 3 min

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 to 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.

wp-admin

wp-content

wp-includes

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

.htaccess

wp-config.php

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.

 

wp-admin

The admin tools are powered by this folder. As its 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.

 

wp-content

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.

 

Plugin

The plugins are used to add more functionality to the WordPress site. Plugins can offer a custom setup to the WordPress installation while the default WordPress installation is designed to be lightweight.

 

Themes

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.

 

wp-includes

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.

 

index.php

The index file loads and initializes all your WordPress files when a page is requested by a user.

 

license.txt

This is the 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.

 

readme.html

This core file contains the instructions to the user as its name indicates.

 

wp-activate.php

This contains the following:

do_activate_header()

Function: Adds an action hook specific to this page that fires on wp_head.

activate_wp_head

Fires before the Site Activation page is loaded but on the wp_head action.

wpmu_activate_stylesheet()

Function: Loads styles specific to this page.

activate_header

Action Hook: Fires before the Site Activation page is loaded.

 

wp-blog-header.php

This folder contains the http headers.

 

xmlrpc.php

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.

 

wp-config.php

It is one of the cores 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.

 

Was this article helpful?
Dislike 0
Views: 21