Blog Posts

The Anatomy of WordPress Itself

12 Sep The Anatomy of WordPress Itself

WordPress in and of itself is nothing more than a collection of files and folders. When put on your server, however, they make up the complex yet incredibly intuitive content management system we all know and love. There are a lot of files and folders that make up WordPress itself, and obviously we can’t cover every single file, but there are a lot of notable ones.

Folders

At the root level, there’s only three folders: wp-content, wp-admin, wp-includes. They all have their specific purposes, but work together as well.

The wp-content folder is where all your sites contents live: plugins, themes, uploads, etc. and is the only folder that actually has nothing in it on a fresh install (except the default themes). This is also the only folder that should be edited. When upgrading WordPress, this folder remains untouched. That is why it is the only folder that should be edited.

When I (or anyone) refers to the “WordPress core” they’re talking about everything that ISN’T in the wp-content folder. One reason it is so easy to upgrade WordPress is because of this content modularization. All the content and design remain separate from the actual framework of the site.

The wp-admin folder contains all the styles and functions for the admin panel of your WordPress site. Once you login, you’ll notice that in the URL is “wp-admin.” That’s because of this folder.

The wp-includes folder contains a hodge-podge of functions and files that make the rest of WordPress work. It’s actually where the meat of WordPress lives. It contains files and folders that have a ton of classes and functions, enabling quick theme development. All of these files are loaded before the theme is (except the functions.php file), so all themes have access to these functions and includes.

Files

At the root level, there aren’t many files that are notable. Perhaps the most important file, in all of WordPress, lives in the root though. And that’s the wp-config.php. This is where all your database and salt (encryption) is stored. Often when people try to hack you’re site, they’ll start here, to get all the database info to gain access.

This wp-config.php file is the only file you should ever edit that’s not in the theme. And that’s only if you do a manual install.

Most other important files live within the actual theme itself. These are all the files you’ll see under appearance > editor on your WordPress dashboard.

See: Anatomy of a WordPress theme.

No Comments

Leave a Reply