One of WordPress’ best attributes is its ease of use. Anyone can learn how to use WordPress and run a successful website, even if they don’t know how to tinker under the hood. However, the chances are that, at some point, knowing what the WordPress core files are and where to find them could help you troubleshoot a potentially crippling issue.
There are hundreds of files that make up each WordPress install, but only a few of them are essential to get to know. In this article, we’ll learn a bit more about what these files are, what they do, and where you can find them. Furthermore, we’ll give you some tips on how to keep your interactions with them safe.
Also, please keep in mind that this is just an introduction to the topic of WordPress core files. We’re omitting a lot of details on purpose here, only to keep the whole message digestible if you’re just starting out with WordPress.
Let’s jump right in!
What are the WordPress core files?
When we talk about WordPress core files, we refer to those making up the platform’s key functionality. They come in many shapes and sizes, but the ones that you’re most likely to run into are .htaccess, wp-config.php, or functions.php.
If those names sound like gibberish to you, don’t despair – we’ll cover each of them in a minute. For now, let’s take a look at what a core file looks like from the inside:
Most WordPress core files come well-annotated, as you can see in the example above. If you ever feel like diving in and checking them yourself, keep an eye out for comments throughout the code (i.e. the text in between the
/* */ tags). They’ll let you know what each function does.
As we mentioned earlier, knowing your WordPress core files – and where they’re located – can come in handy for several reasons. It’ll enable you to troubleshoot basic WordPress problems, skillfully navigate your back end, and gain an understanding of how the platform works.
What do the WordPress core files do?
Firstly, a warning: when dealing with WordPress core files, it’s critical that you never change any settings unless you know what you’re doing. They are the blocks upon which your WordPress installation rests, and you don’t want to topple them.
With that in mind, you’ll want to back up your site before tinkering with your back end. While you can do it manually, having a quality plugin to do the job for you will be ideal for most. It’s worth repeating here: Don’t skip this step!
Finally, to access your back end (and the files within), you’ll need to use an FTP client. We recommend FileZilla, which is free, and works on every operating system. With that out of the way, let’s move onto the files.
The .htaccess and wp-config.php files
The .htaccess and wp-config.php files are part of every WordPress installation’s top (or main) directory. To access them, you’ll need to connect to your site via FTP with a set of credentials that should’ve been provided when you signed up for your hosting plan. If you’re unsure what yours are, check with your web host for more information.
Once you’ve successfully accessed your site, you’ll want to head to public_html (sometimes called www). Inside, you’ll find the two aforementioned files:
First on the list is .htaccess (which stands for ‘hypertext access’). This file controls access to your files, folders, and your overall permalink structure. It’s an often-edited file that you should get to grips with.
Next, we’ve got wp-config.php. This includes all of your basic WordPress settings. It enables you to edit your database settings, modify your memory limit, and even turn on WordPress auto-updates. You can also enable WordPress’ debug option from this file, which makes it vital for troubleshooting.
WordPress’ top-level folder contains a whole bunch of other important files, but chances are your interactions will be limited to those two during troubleshooting.
The wp-admin folder
The wp-admin folder houses most of the files that power your WordPress dashboard. A quick look through the files included within should reveal one for almost every included feature. This folder contains plenty of WordPress core files, but our interests lie with one in particular – admin.php:
The admin.php file is at the heart of the wp-admin folder. It enables any number of critical features, including connecting to the database and loading the dashboard. It even checks whether users have administrative permissions.
Other notable WordPress core files in this directory include network.php (which governs Multisite functionality), update.php (this one is self-explanatory), and users.php (which controls your user administration panel).
The wp-includes folder
There are two main WordPress folders we haven’t covered yet: wp-content and wp-includes. However, wp-content mostly houses your theme and plugin files, rather than anything related to WordPress’ core. That’s why we’re going to focus on wp-includes.
This folder basically stores the rest of the files that enable your WordPress site to function. If wp-admin is the directory that governs your admin tools, wp-includes is the one called upon to make it possible. If you open the directory, you’ll find over 100 files in the top level alone, and it goes without saying we can’t cover them all. Instead, we’ll focus on one of the most important of all WordPress core files – functions.php:
The functions.php file kind of behaves like a WordPress plugin. It enables you to add functionality to your site by calling on pre-defined functions, and even create your own (if you know PHP, that is). In addition, every theme also ships with its own functions.php file, which enables you to add theme-dependent features to your site. It works separately from the one located in wp-includes, and those functions only remain active as long as your theme does.
Knowing what the WordPress core files are, what they do, and where to find them will open up an entire world of possibilities for your WordPress website. You’ll be able to troubleshoot issues on your own, and even implement a few advanced features if you feel adventurous enough.
In this piece, we’ve gone over the essential WordPress core files you need to know. Let’s quickly recap them:
- .htaccess: Controls access to your files, folders, and overall permalink structure.
- wp-config.php: Covers your basic WordPress settings, including database configuration and auto-updates.
- admin.php: Governs all of the functionality behind your dashboard.
- functions.php: Enables you to add features to your site, and also works with individual themes (they have their own versions of the functions.php file).
Do you have any specific questions about the WordPress core files? Share them with us in the comments section below!