Introduction
WordPress is built using a collection of files and folders that work together to run your website. These files contain the core functionality, themes, plugins, and uploaded media used by your site.
Understanding the WordPress file structure is important for developers and advanced users because it helps you manage themes, install plugins manually, troubleshoot issues, and customize your website.
In this tutorial, you will learn about the main folders and files that make up a WordPress installation.
Where WordPress Files Are Located
When you install WordPress on your hosting server, a set of folders and files are created in your websiteβs root directory.
You can access these files using:
- File Manager in your hosting control panel
- FTP clients such as FileZilla
- SSH access (advanced users)
These tools allow you to view and manage your WordPress files directly.
π Main Folders & Files in WordPress
When you install WordPress, youβll see folders like:
/wp-admin
/wp-content
/wp-includes
index.php
wp-config.php
.htaccess
π§© wp-admin Folder
Purpose:
This folder contains all files related to the admin dashboard.
Examples:
/wp-admin
βββ admin.php
βββ dashboard.php
βββ users.php
These files control features such as:
- Dashboard interface
- Post editing
- User management
- Settings pages
This folder powers the backend of your WordPress website where administrators manage content and settings.
You normally do not need to modify files in this folder.
π§© wp-includes Folder
Purpose:
This folder contains core WordPress functionality.
Examples:
/wp-includes
βββ functions.php
βββ formatting.php
βββ plugin.php
These files include:
- Core PHP functions
- WordPress classes
- JavaScript libraries
- CSS files
These files are part of the WordPress core system and should not be modified directly.
π§© wp-content Folder (Most Important for Developers)
This is where you will work most of the time.
/wp-content
βββ themes
βββ plugins
βββ uploads
π¨ wp-content/themes
This folder stores all WordPress themes.
/wp-content/themes/
βββ twentytwentyfour
βββ your-custom-theme
Inside a theme:
/your-custom-theme
βββ style.css
βββ index.php
βββ header.php
βββ footer.php
βββ functions.php
π Important points:
- Each theme has its own folder
- You can create your own custom theme here
- Files like
header.phpandfooter.phpcontrol layout
π wp-content/plugins
This folder stores all WordPress plugins.
/wp-content/plugins/
βββ contact-form-7
βββ woocommerce
βββ my-custom-plugin
π Important points:
- Every plugin lives in its own folder
- You can create your own plugin here
- Plugins add features without touching theme files
πΌ wp-content/uploads
This folder stores all media files.
/wp-content/uploads/
βββ 2026
βββ 02
π Important points:
- All images, PDFs, videos go here
- Organized by year/month
- You normally donβt upload files manually here
βοΈ Important Root Files
π wp-config.php
This file contains:
- Database name
- Username
- Password
- Security keys
Example:
define('DB_NAME', 'your_db_name');
define('DB_USER', 'your_user');
define('DB_PASSWORD', 'your_password');
π Important:
- Controls database connection
- Never share this file publicly
π .htaccess
This file controls:
- Permalinks
- Redirects
- Security rules
Example:
RewriteEngine On
RewriteBase /
π Important:
- Used by Apache server
- WordPress updates permalinks here
π How WordPress Loads Files (Basic Flow)
When a user visits your site:
index.php
β
wp-blog-header.php
β
wp-includes + wp-content files
β
Theme templates load
π This flow helps you understand:
- How themes render pages
- Why template hierarchy works
- Where PHP executes
π« What You Should NEVER Edit
β wp-admin files
β wp-includes files
β core WordPress files
β Always customize:
- Themes
- Child themes
- Plugins
π§ Why Understanding File Structure Matters
Learning the WordPress file structure helps developers perform many important tasks.
For example:
- Installing themes manually
- Uploading plugins via FTP
- Troubleshooting website errors
- Creating custom themes
- Backing up important files
Understanding where files are located makes it easier to manage and customize a WordPress website.
Common Beginner Mistakes
Beginners sometimes make mistakes when working with WordPress files.
Common mistakes include:
- Editing core files directly
- Deleting important system files
- Uploading files in the wrong folder
- Not keeping backups before making changes
It is always recommended to create a backup before modifying files.
β Summary
You learned:
- WordPress main folders
- wp-content structure
- Theme and plugin folders
- Important config files
- What not to edit
Practical Tasks
Try the following tasks to understand the WordPress file structure better.
- Task 1: Open your hosting File Manager.
- Task 2: Navigate to your WordPress installation folder.
- Task 3: Locate the folders wp-admin, wp-content, and wp-includes.
- Task 4: Open the wp-content folder and explore its subfolders.
Tips for Safely Working with WordPress Files
When working with WordPress files directly, it is important to follow some safety practices to avoid breaking your website.
First, always create a backup of your website before editing any files. This ensures you can restore your site if something goes wrong.
Second, avoid modifying WordPress core files located in the wp-admin and wp-includes folders. These files are part of the WordPress system and may be overwritten during updates.
Finally, use a child theme or custom plugin when making code changes. This keeps your modifications safe even when WordPress or themes are updated.
Following these practices helps maintain a stable and secure WordPress website.
Conclusion
The WordPress file structure consists of several folders and files that work together to power your website. The main folders include wp-admin, wp-content, and wp-includes, each serving a specific purpose.
Understanding how these files are organized helps developers manage WordPress websites more effectively. It also makes tasks like installing themes, managing plugins, and troubleshooting issues much easier.
By learning the basics of the WordPress file structure, you take an important step toward becoming a WordPress developer.
In the next tutorial, we’ll learn about What Is The WordPress Loop?.
