To transition from a basic content creator to an authoritative, enterprise-grade WordPress engineer, you must intimately understand the filesystem architecture that makes WordPress operate. When you open a root WordPress directory via SFTP or local file explorer, you see a collection of core PHP boot files, three primary subdirectories (wp-admin, wp-includes, wp-content), and vital server configuration scripts. This class provides a file-by-file autopsy of the WordPress filesystem.
These root files orchestrate the bootstrapping lifecycle of every incoming web request:
| Root File | Role in the Execution Lifecycle | Developer Edit Rule |
|---|---|---|
index.php |
The main entry point. Loads wp-blog-header.php to initialize the environment and process the request. |
NEVER EDIT! Part of WordPress core. |
wp-config.php |
The Master Config: Contains MySQL DB credentials, cryptographic salts, table prefix, and debug flags. | Editable: Created during install; edited for dev constants. |
wp-load.php |
Loads the wp-config.php file and sets up core PHP error handling and environment paths. |
NEVER EDIT! |
wp-settings.php |
Initializes core classes, loads $wpdb, activates active plugins, and establishes default constants. |
NEVER EDIT! |
.htaccess (Apache) |
Directs server rewrite rules for SEO permalinks, security headers, and compression directives. | Editable: Modified by caching & security plugins. |
xmlrpc.php |
Legacy remote publishing API. Often blocked by security firewalls to prevent brute-force attacks. | NEVER EDIT! Block via firewall. |
Contains all the administrative screens, styling, and JavaScript logic powering http://example.com/wp-admin/. Files here enforce user capability checks via auth_redirect(). If an unauthenticated user attempts to access any file in this directory, they are immediately redirected to wp-login.php. Core Rule: Never add, edit, or delete any files in /wp-admin/!
This directory is the computational powerhouse of WordPress. It houses all foundational PHP classes, helper functions, and external vendor libraries that run the CMS:
class-wp-query.php: Powers the database query engine and The Loop.wp-db.php: Houses the $wpdb database abstraction class.plugin.php: Powers the entire Action and Filter Hook system.template-loader.php: Resolves the template hierarchy based on the current query.This is the ONLY directory where developers write code and upload assets! WordPress updates will never overwrite /wp-content/:
| Directory Path | Contents & Purpose |
|---|---|
/wp-content/themes/ |
Stores all installed active, inactive, and child themes. |
/wp-content/plugins/ |
Stores all third-party and custom-developed plugins. |
/wp-content/uploads/ |
Stores media library uploads organized by year and month (/2026/11/). |
/wp-content/mu-plugins/ |
(Optional) Must-Use plugins that execute automatically site-wide. |
/wp-content/languages/ |
Translation .mo and .po language files for internationalization. |
In viva exams: "Can a developer edit a file inside /wp-includes/ to fix a bug?" ABSOLUTELY NOT! Modifying core files (known as "hacking core") is the cardinal sin of WordPress engineering. Any core edits will be completely erased during the next WordPress security patch. Instead, developers modify behavior using Hooks (Actions & Filters) from within custom plugins or child themes!
Expand your CMS mastery by studying these tightly integrated WordPress development topics:
Trace template files located inside your active theme directory.
Learn where functions.php and mu-plugins sit within the execution order.
Set strict file permissions (755 folders, 644 files) across the file tree.
How wp-config.php bridges the filesystem with the MySQL database.