You may be asking yourself “Bruh! Why should I even bother reading this? I can handle WordPress well without knowing anything!”. To tell you the truth, you are right to some extent. However, having some basic knowledge about the CMS you are using by reading this very first article in my brand new series “Understanding WordPress” can help you fix some simple problems on your own.
What can this article help you? Well, take a quick look right here:
Now, let the journey begin, shall we?
What you need in the very first step is a FTP client in order to connect to your WordPress server. If you don’t possess this thing, you can rely on File Manager, which is a web based app already built into your WordPress hosting account’s cPanel dashboard. Once you are connected wholly to your WordPress server, you will see a structure of file and directory. Among that pattern, pay close attention to the core files and folders as those are what runs your website.
Let me warn you very clearly: do not do anything on your own with those files and folders, or you are going to be in deep troubles!
Now, you may want to remember this list of those core files and folders:
It would be an endless article if I attempted to explain everything listed above. Why? Because there are so many things to talk about. You know, understanding WordPress is no one-day work. So, I suggest we start by learning about the most important and basic files and folders first, and then we can move to the detailed parts of WordPress’s internal structure, ok?
Residents of WordPress, please meet our very close friends who play a vital part in helping us run our WordPress websites as smoothly as possible:
As you can see it in the name “wp-admin”, this folder is home to the most powerful files which allow you, as a WordPress user, to work your admin tools. In short, it contains the diverse group of files working for the WordPress dashboard. For instance, the admin.php has the function of creating connection to the database, showing the WordPress dashboard and so many more key features such as checking upon any given user. That is the admin.php. Just like other files, if you look close enough, you can see that the files’ names almost match its function displayed on the dashboard. Examples? Well, see the profile.php? It powers the user profile administration screen. Meanwhile, the theme-install.php makes it very obvious that it takes control of the theme installation panel. Likewise, the plugin-install.php does the very similar job for the plugins panel.
You may have known clearly that every single function related to WordPress, for example, writing posts, moderating comments, installing plugins and themes – you name it – are implemented via the WordPress dashboard. What does this mean? It means that only registered users are granted access to this place, and again their activities there are limited by their role. To be specific, the Administrator has full access, then the Editor, followed by the Contributor, and the ones with the least access is Subscriber.
If you ask whether there are anything else important inside wp-admin, I’d go “images”, which is full of images used in the WordPress administration panel, while “css” and “js” are dedicated to CSS code and JavaScript scripts in the same order. Last but not least, the “network” contains the PHP files essential to power WordPress multisite.
To be short, this is one section of the back end where they store all users’ uploaded data. Our wp-content is divided into three sub folders:
Clearly enough, the “themes” directory houses all the themes you have ever installed in your WordPress website. You can install as many themes as you wish to, but by default, you can only activate one theme at a time, of course. For each theme you have, there is a corresponding folder of its on the back end. What you shall see upon accessing a given theme’s folder is a large number of PHP files, just so you know. Moreover, as you may have noticed, this directory can never be empty! There is always at least one theme so WordPress can work with.
Needless to say, the “plugins” does the very same job of containing all the plugins installed in your website. Each plugin you upload to the site will have a sub folder inside the “plugins”, which means this folder can be empty because you actually do not need any extra plugin to run a WordPress website. If you wonder what you shall see when entering these sub folders, well, all I can say is that it varies from plugin to plugin. Thus, there is no firm answer.
How about the “uploads” directory, you ask? Well, this is where all images and other media files (PDFs, videos, MP3s, etc.) you have ever uploaded to your WordPress website are stored, neatly categorized by year, month and day. Owing to its privacy characteristic, please remember that this place needs strict security, or else you will be paying a high price!
Don’t ever underestimate this folder just because I put it down here, under the other two folders. It may sound surprising, but here is where all the most important files are stored. Besides over 140 distinct files in the main directory, other vital folders include “certificates”, “fonts”, “js”, “theme-compat”, and “widgets”. However, these sub folders are not as important as the files in the main directory, for example, the functions.php. There are many more files to list out, but some of other main files you need to know are cache.php, links.php and version.php.
Apart from what is included in wp-admin and wp-content, whatever inside this folder allows the rest of your WordPress website can work in a structured way. That is why I seriously warn you against editing any of these files.
If you are feeling overwhelmed by this so-called internal structure I have just presented above, relax! As I said, understanding WordPress is not something we are born with, it is something we have to learn with time and patience. Give yourself a little time to practice, and you will soon find yourself knowing every bits of WordPress’s directories and core files like the back of your hand. Once you do, these pieces of knowledge will be handy when you need to troubleshoot an issue or carry out a simple tweak.
Everyone has their hard time learning something new, and I myself have also struggled with WordPress at the beginning. The truth is we have all been there. So why don’t you subscribe and share your stories in the comment section below?