Beginner’s Guide to File Structure in WordPress

Spread the love

Do you want to learn about File Structure in WordPress?

On the server hosting your website, all core WordPress files, themes, plugins, and user uploads are kept.

In this beginner’s guide, we’ll explain the File Structure in WordPress.

File Structure in WordPress

Why You Should Learn About File Structure in WordPress?

The majority of users don’t even need to know about WordPress files or directories to manage their WordPress website. Nonetheless, you can handle a lot of common WordPress issues on your own by being aware of how WordPress keeps files and directories.

This guide will help you:


  • Learn which WordPress files and folders are core files.
  • Understand how WordPress stores your images and media uploads.
  • Where WordPress stores your themes and plugins.
  • Configuration files are stored on your WordPress install.

This information also helps you learn how WordPress works behind the scenes and which WordPress files you should back up.

Having said that, let’s take a look at the WordPress file and directory structure.

Accessing WordPress Files and Directories

Your site hosting server houses your WordPress directories and files. These files are accessible with an FTP client. For further instructions, refer to our guide on using FTP to upload WordPress files.

The File Manager application, which is included in the majority of WordPress hosting control panels, is a simpler substitute for FTP.

File manager app in hosting control panel

Following an FTP or File Manager connection to your WordPress website, the file and directory structure will appear as follows:

WordPress files and folders

The essential WordPress files and directories are located inside the root folder. The files and folders listed here are what power your WordPress website.

Other than wp-config.php and.htaccess files, you shouldn’t alter other files by yourself.

The following is a list of essential WordPress files and folders that are located in the root directory of your WordPress website.

  • wp-admin [dir]
  • wp-content [dir]
  • wp-includes [dir]
  • index.php
  • license.txt
  • readme.html
  • wp-activate.php
  • wp-blog-header.php
  • wp-comments-post.php
  • wp-config-sample.php
  • wp-cron.php
  • wp-links-opml.php
  • wp-load.php
  • wp-login.php
  • wp-mail.php
  • wp-settings.php
  • wp-signup.php
  • wp-trackback.php
  • xmlrpc.php

The wp-config.php and.htaccess files are absent from the list above. This is so because WordPress is installed before those two files are produced.

WordPress Configuration Files

Some unique configuration files are located in the root directory of your WordPress installation. Important WordPress-specific settings are contained in these files.

WordPress configuration files


  • htaccess – A server configuration file, WordPress uses to manage permalinks and redirects.
  • wp-config.php – WordPress needs this file to connect to your database. It also configures your WordPress website’s global settings.
  • index.php – When a user requests a page, the index file essentially loads and initializes all of your WordPress files.

Sometimes you may need to make changes to the wp-config.php or. htaccess file. When modifying these two files, proceed with additional caution. A small error could render your website unavailable. Always make backup copies of these two files on your computer before changing them.

Check see our guide on why you can’t find the. htaccess file in your WordPress root directory if you can’t see the file in your root directory.

You could or might not have these files in your root directory, depending on how WordPress is configured on your website.

  • robots.txt – contains instructions for search engine crawlers
  • Favicon.ico – A favicon file is sometimes generated by WordPress hosts.

Inside the wp-content Folder

WordPress stores all uploads, plugins, and themes in the wp-content folder.

WordPress content folder

The ability to edit files and directories inside the wp-content folder is typically taken for granted. But this isn’t totally accurate.

To learn more about it and what you can accomplish, let’s take a closer look at the wp-content folder.

Inside wp-content folder

The contents of the wp-content folder may vary throughout WordPress websites. But typically, every WordPress website has these:

  • [dir] themes
  • [dir] plugins
  • [dir] uploads
  • index.php

Your theme files are kept by WordPress in the /wp-content/themes/ subdirectory. Although editing a theme file is possible, it is usually not advised. All of your modifications will be lost when you update to a newer version of your theme.

For this reason, in order to customize a WordPress theme, it is advised to build a child theme.

The /wp-content/plugins/ subdirectory contains all of the WordPress plugins that you can download and install on your website. Unless you have written a WordPress plugin specifically for your own site, you should not alter plugin files directly.

You can add code snippets to your WordPress website by following the instructions in numerous WordPress tutorials. You can add custom code to your WordPress website by either making a site-specific plugin or adding it to the functions.php file of your child theme.

However, utilizing a code snippets plugin like WPCode is the simplest and safest approach to add custom code. See this guide on adding custom code to WordPress for step-by-step instructions.

All of your uploaded images and media files are stored by WordPress in the /wp-content/uploads/ folder. Uploads are arranged in the /year/month/ directories by default. When backing up WordPress, you must always include the uploads folder.

WordPress core, your theme, and any installed plugins are all available for download directly from their respective sources. However, it would be quite difficult to restore your uploads folder without a backup if you lost it.

You could notice a few more default directories in your wp-content directory.

  • languages – This folder is where WordPress keeps language files for non-English WordPress websites.
  • upgrade – This is a temporary folder created by WordPress during the upgrade to a newer version.

In order to store files, many WordPress plugins may also make their own directories inside of your wp-content area.

To store user uploads, certain WordPress plugins might create directories inside the /wp-content/uploads/ subdirectory. For example, the Smash Balloon, WooCommerce, SeedProd, and WPForms plugins have generated folders on this demo website.

Plugins may create their own folders inside uploads directory

Some of these folders may contain important files. This is why we recommend backing up all such folders as a precaution.

To store user uploads, certain WordPress plugins might create directories inside the /wp-content/uploads/ subdirectory. For example, the Smash Balloon, WooCommerce, SeedProd, and WPForms plugins have generated folders on this demo website.

That’s all, we hope this article helped you understand the WordPress file and directory structure. You may also want to see our beginner’s guide to WordPress database management with phpMyAdmin, and our tutorial on how to create a custom WordPress theme without any coding knowledge.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Instagram and Facebook.

LEARN FREE WordPress wite Wehavedigitaltool

Spread the love

Leave a Comment

Verified by MonsterInsights