WordPress Structure

WordPress Structure

Here is a list of core WordPress files and folders you would see in your WordPress site’s root directory.


  • [dir] wp-admin
  • [dir] wp-content
  • [dir] wp-includes
  • index.php
  • license.txt
  • readme.html
  • wp-activate.php
  • wp-blog-header.php
  • wp-comments-post.php
  • wp-config.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

Files and folders in Bold Type are the core WordPress files. These are the files and folders that run your WordPress site. You are not supposed to edit those files on your own.

WordPress Configuration Files

Your WordPress root directory contains some special configuration files. These files contain important settings specific to your WordPress site.

  • .htaccess – A server configuration file, WordPress uses it to manage permalinks and redirects.
  • wp-config.php – This file tells WordPress how to connect to your database. It also sets some global settings for your WordPress site.
  • index.php – The index file basically loads and initializes all your WordPress files when a page is requested by a user.

You may need to edit wp-config.php or .htaccess file sometimes. Be extra careful when editing these two files. A slight mistake can make your site inaccessible. When editing these two files, always create backup copies on your computer before making any changes.

If you don’t see .htaccess file in your root directory, then checkout our guide on why you can’t find .htaccess file in your WordPress root directory.

Depending on how your WordPress site is setup, you may or may not have the following files in your root directory.

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

Inside wp-content Folder

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

It is generally assumed that you can edit files and folders inside wp-content folder. However, this is not entirely true.

Let’s take a look inside wp-content folder to understand how it works and what you can do here.

The contents of wp-content folder may differ from one WordPress site to another. But all WordPress sites usually have these:

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

WordPress stores your theme files in /wp-content/themes/ folder. You can edit a theme file, but it is generally not recommended. As soon as you update your theme to a newer version, your changes will be overwritten during the update.

This is why it is recommended to create a child theme for WordPress theme customization.

All WordPress plugins you download and install on your site are stored in /wp-content/plugins/ folder. You are not supposed to edit plugin files directly, unless you wrote the plugin just for your own WordPress site.

In many WordPress tutorials, you will see code snippets that you can add to your WordPress site. The best way to add custom code to your WordPress site is by adding it to functions.php file of your child theme or by creating a site-specific plugin.

WordPress stores all your image and media uploads in the /wp-content/uploads/ folder. By default, uploads are organized in/year/month/ folders. Whenever you are creating a WordPress backup, you should include uploads folder.

You can download fresh copies of WordPress core, your theme, and installed plugins from their sources. But if you lose your uploads folder, then it would be very hard to restore it without a backup.

Some other default folders you may see in your wp-content directory.

Many WordPress plugins may also create their own folders inside your wp-content folder. For example, in the screenshot above we have a gallery folder created by Envira Gallery plugin.

Some of these folders may contain important files. Like the gallery folder may contain your gallery images. You should always backup such folders to avoid losing important data.

Other folders may contain files that you can safely delete. For example your caching plugins like W3 Total Cache or WP Super Cache may store cached files in their own folders.

That’s all, we hope this article helped you understand WordPress file and directory structure. You may also want to see our beginner’s guide to WordPress database management with phpMyAdmin.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials.

Eric Pickstone