WordPress is a robust Content management system in itself. In fact, it is one of the most user-friendly options in every right. It lets you work with every aspect of building your website through the dashboard.
However, if you are looking to have better control over your site, it would be a good idea to understand the file and directory structure of WordPress in a better manner. Moreover, you may be able to troubleshoot any of the issues you may be facing in easily.
Why should You learn more about WordPress File and Directory Structure?
Most of us tend to run WordPress without paying attention to the file and directory structure that it comes with. However, it would be helpful and useful learning the file structure so that you can have a clear understanding of how it works and what factors can affect its proper functionality.
Our aim in making you go through these guides into the file and directory structure is to guide you in the following scenarios –
- You will be able to learn which files and folders are used as the core files in your WordPress installation.
- You will be able to learn the method used in storing the media you upload on WordPress
- You will also understand where the themes and plugins are stored. This will help you troubleshoot the issues with plugins and themes just in case.
You would also be able to learn the location of configuration files so that the troubleshooting would be much simpler and easier enough. The knowledge of the file structure and directory would help you understand the exact backup needs as well.
How To Access the WordPress File and Directory Structure?
To access the WordPress files, you need to have access to an FTP client. We would assume you are already aware of how to use an FTP client for accessing the WordPress files. However, if you are not aware of how to use FTP or do not want to use it for any reason, you can use the File Manager plugin from within the Admin panel of your WordPress dashboard.
As soon as you connect using the FTP client or File manager, you will find the file and directory structure.
The core folders in a WordPress structure include
- wp-admin
- wp-content
- wp-includes
In addition, you would find other important files like favicon.gif, readme.html, license.txt, and similar other important files. The core files in a WordPress directory structure would include
- PHP
- txt
- 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
- PHP
Along with the above files, the folders wp-admin and wp-includes together constitute the Core files for WordPress.
Public-HTML Folder
The public_html folder consists of the following files –
This folder consists of all the above files and folders. However, one of the important files is missing from the above list. And, if you are viewing the file structure through the FTP client, you would not be able to find this file as it is hidden most of the times.
Yes, we are talking of .htaccess normally referred to as hypertext access. This file is very important for the functioning of a WordPress site and even one mistake in .htaccess file can take the whole site down instantly. Another file worth the attention would be the index.php file. It will work as the default homepage for your website if you do not have a front-page.php or a home.php file configured.
Other important files in this directory include
- wp-config.php – This file takes care of the base configuration of your WordPress installation. It will also include your MySQL settings and other database settings.
- wp-comments-post.php – This, evidently enough, helps you handle comments and takes care of duplicate comments.
In addition, you would also find the files like wp-activate.php and wp-signup.php to help you in the activities like signup, sign in and user confirmation functions.
wp-admin Folder
This is one of the top-level folders on your WordPress installation. The files inside the folder would help you control the admin functionalities of your WordPress site. It has several files within it –
- php – This file will enable the connection to the dashboard and display the contents. It will also find if the user in question is actually an admin.
- wp-load.php – This file is used for loading the config file
The wp-config.php file would typically have the following structure –
The other files included inside the wp-admin folder include profile.php which works with the user profiles, plugin-install.php that controls the plugins, themes-install.php that takes care of theme installations and several other files.
wp-content folder
This is probably the section that you would be working with most of the time when working with your website or blog. The most important subfolders within this folders would be plugins and theme
The plugins folder will have each of the plugins you install on it in its own subfolder. The individual content of these subfolders will be dependent upon the individual plugins you would be using. This folder would be an important factor to consider when you have issues with any of the plugins. You can access the individual plugins through FTP and delete or troubleshoot the plugin.
The Themes folder hosts the themes you have installed in your WordPress installation. Again, you will find the multiple subfolders within the folder depending upon the number and type of themes you have installed.
wp-includes folder
This is the highest top-level folder in your WordPress installation. This is exactly what would help you run your website like a charm. It is in this folder that most of your core files are stored.
The folder consists over 140 different files and around 14 folders. And this is when you are checking the WordPress installation when it is freshly installed. The number can go up further when you go on using it ahead. Some prominent files included within the wp-includes folder include functions.php, cache.php, links.php, and versions.php.
The functions.php file within the wp-includes folder an important file and controls a wide range of functions so that your WordPress installation will be working to its fullest capabilities. In addition, the wp-includes folder also has a wide range of files folders that control a wide range of functionalities including certificates, fonts, js, theme-combat, and widgets.
The Concluding Thoughts
It may be a little difficult to understand the concept and functionality of WordPress core files and folders at the first attempt. Moreover, it can be a little scary for the beginners to dive deeper into the file structure. However, learning these intricate details can help you get a better understanding of the WordPress functionality. It should be simple to work with as it would help you out in troubleshooting the errors, opting for a few tweaks, or handle it in an efficient manner.
To begin with, you can make a start with a clear understanding of wp-admin, wp-content, and wp-includes folders and take it ahead with an understanding of core files like wp-config.php, functions.php, and .htaccess. Of course, you can keep learning further as you move ahead.
Alternatively, check out the Marketing91 Academy, which provides you access to 10+ marketing courses and 100s of Case studies.