WordPress is the most well-known and widely used CMS in the world. It allows you to develop websites without having extensive knowledge of programming or web development. Hence its great success.
After all, WordPress is an interface that allows you to edit the website from there, but it is still an application installed on your hosting account and therefore has its own structure and files to function correctly.
In this guide, we will provide brief instructions about the main files of a default WordPress installation and the structure of its folders.
IMPORTANT: Please note that folder/file names can be manually modified, so we will show the structure and files of a default WordPress installation.
The public folder of cdmon is /web, meaning all your WordPress files are located inside this folder (WordPress root). Inside the /web folder you can see all the content of your WordPress:
WordPress Files
index.php
Main file of your WordPress. This file allows your WordPress to respond externally.
.htaccess
This is a file that is created when you enable friendly URLs in your WordPress. It is also an important file for creating redirects or performing other security tasks.
license.txt
readme.html
Information about the WordPress pre-installation
wp-activate.php
Confirms that the activation key sent in an email after a user registers on a new site matches that user's key and then displays the confirmation.
wp-blog-header.php
Determines what to display based on the parameters passed to the blog. Included from any page that wants to display WordPress content.
wp-comments-post.php
Receives posted comments and adds them to the database.
wp-config.php
The actual configuration file used to connect WordPress to your MySQL database. This is not included in the default installation, but it must exist for WordPress to function properly. You may need to edit this file to modify certain configuration settings.
wp-config-sample.php
A sample configuration file for connecting WordPress to your MySQL database.
wp-cron.php
The WordPress cron is basically a task scheduling file responsible for executing your WordPress scheduled tasks.
wp-links-opml.php
Produces an OPML output of the links added to the blog through the WordPress administration menu.
wp-login.php
The WordPress login page for registered users.
wp-mail.php
Used to retrieve blog posts sent via email. The URL of this file is usually added to a cron job so that it runs regularly and accepts new email posts.
wp-settings.php
Performs various pre-execution routines, including checking the correct installation, loading helper functions, applying user plugins, initializing execution timers, etc.
wp-trackback.php
Handles incoming trackback requests.
xmlrpc.php
Handles incoming XML-RPC commands. Among other things, this allows publishing without using the built-in web-based administrative interface.
WordPress Root Folders
In the root of your WordPress, apart from the files mentioned above, there are also 3 folders, each with a different function. In this section we will show the name of each one and their purpose:
Wp-content
This directory stores all the physical content of the website. In other words, all website data is stored in the database, but the physical content (photos, videos, etc.) is stored inside this folder.
If you access this directory, you will see that it contains up to 5 additional folders, but the most commonly used and reviewed ones are the following:
/plugins: This folder stores all the plugins installed on your WordPress
/themes: This folder stores all the themes installed on your WordPress
/uploads: This folder stores all the media files uploaded from your WordPress (photos | videos)
Wp-admin
Wp-admin is a directory or folder that comes by default with WordPress and contains different backend files necessary for the CMS to function. The wp-admin folder is automatically generated when you install WordPress. Whenever you want to access your WordPress administrator panel to manage your website, you must access this folder (example: domain.com/wp-admin)
Wp-includes
This directory contains the files and folders that provide functionality to the WordPress core, such as providing an API, etc. We do not recommend modifying the files in this folder.
You can get more information about WordPress files and structure on its official page:
More information