Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Beginner’s Guide to WordPress File and Directory Structure

When you first look at your WordPress files and folders, it can seem like a confusing maze. It’s natural to worry that one wrong click could bring your entire website crashing down.

Our team has worked with thousands of WordPress sites, so we understand that feeling well. Knowing this structure is the key to fixing common problems and managing your website with confidence.

This guide will be your friendly map to the WordPress file and directory structure. We will show you exactly what each file and folder does, so you can work on your site without fear.

WordPress file and directory structure explained for beginners

Here is a list of topics we’ll cover in this guide:

Why You Should Learn About WordPress File and Directory Structure?

Learning about WordPress’s file and directory structure helps you easily troubleshoot common WordPress problems.

While many users run their WordPress website without ever touching these files, learning about them can be immensely helpful.

This guide will help you understand:

  • Which WordPress files and folders are part of the core software.
  • How WordPress organizes your images and media uploads.
  • Where your installed themes and plugins are stored.
  • Where to find the key configuration files for your site.

This knowledge also helps you understand how WordPress works behind the scenes and which files are most important to back up.

How to Access Your WordPress Files and Directories

Your WordPress files live on your web hosting server. You can access these files using an FTP client or the File Manager app in your WordPress hosting control panel.

An FTP client is a special app for connecting to your server. You can see our guide on how to use FTP to upload WordPress files for detailed instructions.

An easier alternative for many users is the File Manager app. This tool comes built into most WordPress hosting control panels.

File manager app in hosting control panel

Once you connect, you will find your WordPress files inside the /public_html/ or /www/ folder.

Here, you will see a file and directory structure that looks something like this:

WordPress files and folders

Inside this main folder are the core WordPress files and folders that run your website. You should not edit these files directly, with the rare exception of .htaccess and wp-config.php.

Here is a list of the core WordPress files and folders. In this list, [dir] indicates a directory, which is another name for a folder.

  • 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 list above is missing .htaccess and wp-config.php files. This is because those two files are created after the main WordPress installation is complete.

WordPress Configuration Files

Your main WordPress directory contains special configuration files.

These files hold important settings that are specific to your website.

WordPress configuration files
  • .htaccess – This is a server configuration file. WordPress uses it to manage permalinks and redirects. Note that the .htaccess file is used by Apache web servers. If your host uses a different server type, like Nginx, it will not use this file.
  • wp-config.php – This file tells WordPress how to connect to your database. It also sets some global settings for your site. For extra security, you can move this file one level above your public root directory, and WordPress will still know how to find it.
  • index.php – This file acts as the starting point. It begins the process of loading the rest of the WordPress framework to display your website when a user visits.

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

If you cannot find the .htaccess file in your root directory, check out our guide on why the .htaccess file may be hidden.

Depending on your site’s setup, you may or may not have these files in your root directory:

Inside the wp-content Folder

WordPress stores all of your user-added content, like uploads, plugins, and themes, in the wp-content folder.

WordPress content folder

While this is the folder you’ll interact with the most, you must still be very cautious. Directly editing files here without knowing what you’re doing can cause errors or break your site.

Let’s look inside the wp-content folder to understand how it works.

Inside wp-content folder

While the contents can differ between websites, all WordPress sites will have these:

  • [dir] themes
  • [dir] plugins
  • [dir] uploads
  • index.php
Themes Folder (/wp-content/themes/)

WordPress stores your theme files in this folder. We don’t recommend editing a theme file directly. If you update the theme to a newer version, your changes will be overwritten.

This is why we always recommend you create a child theme for any theme customizations.

Alternative tip for beginners 💡: Most users will find working with SeedProd, a drag-and-drop custom theme builder, much easier than editing code.

Plugins Folder (/wp-content/plugins/)

All WordPress plugins you download and install on your site are stored here. You should not edit plugin files directly, unless you wrote a site-specific WordPress plugin for your own use.

Many tutorials show you code snippets to add to your site. The easiest and safest way to add this custom code is by using a code snippets plugin.

We recommend using a plugin like WPCode because it prevents the types of errors that can break your site if you edit files like functions.php directly.

It also keeps your code snippets organized and separate from your theme. We use WPCode to manage code snippets on our own websites.

To learn more, see our full WPCode review or follow our guide on adding custom code snippets in WordPress for step-by-step instructions.

Uploads Folder (/wp-content/uploads/)

WordPress stores all your images and media uploads in the /wp-content/uploads/ folder. By default, these uploads are organized into subfolders by year and month.

⚠️Important: When you are creating a WordPress backup, you must include the uploads folder. While you can always re-download WordPress core, your theme, and plugins, this folder contains your unique content. If you lose it, it can be very difficult to restore without a backup.

Other Folders in wp-content

You might see some other folders in your wp-content directory:

Many WordPress plugins also create their own folders inside wp-content. For example, some plugins create folders inside /wp-content/uploads/ to save user-generated files.

This demo website has folders created by the Smash Balloon, WooCommerce, SeedProd, and WPForms plugins.

Plugins may create their own folders inside uploads directory

Some of these folders can contain important files, so we recommend backing them up as a precaution.

Other folders, like those created by caching plugins like WP Rocket, may contain data that you can safely delete.

Inside the wp-admin Folder

The wp-admin folder contains all the files needed to power your WordPress admin dashboard. This is the backend area where you write posts, change themes, install plugins, and manage your site.

It includes files like admin.php, index.php, and folders for JavaScript, CSS, and images used in the dashboard interface. When you log in to WordPress, everything you see is loaded from this folder.

Unless you’re a developer customizing the admin area, there’s no reason to open or edit anything inside wp-admin. These files are essential to your site’s operation. Editing or deleting even one can break your website.

If your admin panel isn’t loading, it’s safer to reinstall WordPress or restore from a backup than to try fixing anything inside this folder manually.

Inside wp-includes Folder

The wp-includes folder is like the engine room of WordPress. It contains the core code that makes WordPress work, including functions, scripts, and classes that power themes, plugins, and features.

This folder has hundreds of files, such as functions.php, class-wp-query.php, and folders like js andfonts. These files do things like control how posts are loaded, how widgets display, and how your theme interacts with WordPress.

You should never edit anything in the wp-includes folder. These are core files maintained by WordPress. Any changes you make here will be overwritten during the next update, and a single mistake can break your whole site.

If you’re trying to customize functionality, it’s better to use plugins, hooks, or custom code snippets with a tool like WPCode. That way, your changes are safe, even when WordPress is updated.

Frequently Asked Questions About WordPress File and Directory Structure

Is it safe to delete core WordPress files?
No. You should never delete core WordPress files like those in the wp-admin or wp-includes folders. Deleting them will break your website. If you suspect a file is corrupted, you should replace it with a fresh copy from an official WordPress download.

Can I edit my theme’s functions.php file directly?
While you can, it’s not recommended. Any mistake can cause the “white screen of death,” and your changes will be lost when you update your theme. It is much safer to use a child theme or a code snippets plugin like WPCode.

What are file permissions, and why do they matter?
File permissions control who can read, write, and execute files on your server. Incorrect file permissions can be a security risk. In general, directories should be 755 and files should be 644.

Additional Resources

We hope this article helped you understand the WordPress file and directory structure. You may also want to check out these related guides:

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

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

59 CommentsLeave a Reply

  1. This is a well-written topic because many people start and stop with just the wp-config.php file. However, WordPress has many other, equally interesting files that hold various other secrets of working with this system. I appreciate that, unlike other websites, you approach the topic in a way that’s truly accessible for people without experience. After all, you have “beginners” in your name, and you’re doing a great job.

  2. Good insight & a beginner friendly article!

    So does that mean that WordPress doesn’t have a single index.html file which is responsible for the starting point of the website? Instead, it has index.php, is it similar to index.html?

  3. I have always fantasized about what goes behind the scene to run such a good wordpres front end and backend interface.
    This guide has cleared all those behind the scene aspect of wordpress working.
    Having a knowledge of these files and directories structure gives us command over tweaks that we can make.
    Thanks wpbeginner for this guide on wordpress file structure.

    • It is almost the same, a multisite install would have folders for each of the subsites.

      Admin

  4. Thanks for sharing this information. This will help a lot during troubleshooting and website backup n restore.

  5. Please help me on how can I create a folder inside my blog hoste on wordpress on my site. I want to create more subfolder under that like news, life etc to make sure my users get the content more organized?

  6. Getting this error: Fatal error: Call to undefined function wp() in XXXX\html\wp-blog-header.php on line 12. Tried several troubleshooting, but wont solve the issue. Stoped Theme, and pluggins.

  7. Hi
    Im getting the error message about a missing ads.txt file, i know where to find it, but im not sure where i have to insert it.

    Best regards
    Bruno
    Denmark

  8. Am trying to upload an unzipped file to this location:

    wp-content/uploads/GeoLite2-Country.mmdb

    Question : How do I find the location and how do i upload the unzipped file to this location.

    • The closest to what it sounds like you’re wanting is under wp-content>Uploads

      Admin

  9. Hi
    My website was hacked. it keeps redirecting me to a spammy site. I can’t log in via the backend (cos it keeps redirecting me to a spammy site) and I don’t have a backup of the site but I can still access my Cpanel but dont know what to do there, please any help will be appreciated.
    hemjaypost.com is the site

  10. Crazy question.
    After importing demo site content on an Avada themed site – there are so many pages I have NO IDEA how to get back to identify and edit my home page in the PAGES link? I now have 8 pages of “pages”. How can I find my Home page? BTW – In READINGS > SETTINGS – I’ve checked blog assigned to home page NOT to a STATIC Page. Many thanks!
    I have googled several ways – but can’t figure out this thing!

    • Hi Karen,

      When you go to Pages » All Pages you should be able to see — Homepage label next to the page used as your homepage. You can also try reaching out to the theme developer for support.

      Admin

  11. I, too, want to find where my old .htm files that are now encased in Wordpress with different urls! I need to delete a bad xml file and I have to idea how to go to server and remove. I removed it permanently inside the page list, but I am afraid Bing is still thinking that is what I want submitted. It keeps saying it is not valid and I want to clear it out!
    Thank you!

  12. hi
    i developed an custom post in woocommerce website. But after that i want to use an dynamic photo slider in this custom post, i tried a lot but failed to make it dynamic.please guide me about the use of page template and how to make slider dynamic.

  13. Helpfull but i want edit a page outside without WordPress , by another html editer ,becouse i try to remove theme on some specific pages ,but not entier website

  14. thank you, that was very helpful… but i want to know if it is safe to replace all the wordpress core files by a new files?

  15. Hi there, I recently downloaded my old Wordpress site onto my computer, and installed a new site on my domain. I am now trying to dig around and find all my blog posts from the old site so I can add them to the new site, any idea if thats possible and where I would find those? Thanks so much for your help.

  16. what is the file name for the users in the wordpress? I have a complete backup for my site, moved it to another server, the number of the users were about 24K but now I found only 9K and I would like to restore the old one. Thanks in advance for your reply. Hany Danial

  17. Hi,

    Suppose if I want to change the look of the WordPress theme then which files are important or in which file do I need to change the code?

    Since last 2 years I am thinking to change the some little look of my theme but because of not fully understanding I couldn’t do it.

    Thanks,
    Amit

  18. Hi, thank you for this post I agree with you that An easier alternative to FTP is File Manager. It is a web-based application that comes built into cPanel dashboard of your WordPress hosting account. very useful information

  19. how to i change upload the pictures for the web site or upload the new coupon for the website that use Wordpress or edit the content of the website?

    when I login to the FTP site, i see these 3 folders
    wp-admin
    wp-content
    wp-includes

    thanks
    john

      • thanks. the company who wrote the website did not transition to me. How do I request to reset the password to login to the admin page?

        also, i need to update just the coupons by update the new images of the coupons.

        also, how to i transfer the page_id=369 to the coupons page

        thanks again,
        John

  20. great article. But I have a question though. I am a beginner and trying to design a website via wordpress. i have finished the design to an extent. but my problem is that when i try to upload my wordpress file via ftp (file zilla), i cant seem to find the file on my C:/. how to i locate my wordpress file? thank you as i await your response

  21. It is really helpful for me as I am just starting out with my blog and I have very little knowledge about these technical issues. Great content, thanks.

  22. Great article! I do have a question though: Where do we actually find the articles that we wrote on the site? Let say I write an article on my site. This article is normally stored in wordpress files. where can I find it?
    Thanks

    • Your article itself will not be stored in files, it will be stored in the database. Only your files will be stored inside the wp-content/uploads.

      Ok? :)

  23. please i need your help urgently, i want to restart my afresh. But i just need my articles and its images. i do not need anything else.The reason for this is that my hosting is saying someone is using my site to spam people using a business address i did not even add to my webmail. if i delete it they create another one. but now another issue is thta malware are been detected on the site. but i am using the newspaper theme so i do not know why all this issues. I can do all the installing of new wordpress and every other thing but i need to just put the contents i have on the new site i am going to create. i still have my old site on now and i have the backup in my file manager home directory.

  24. Thanks for the article….what about finding “pages” on the directory? i cant seem to find them…will they be accessible via cpanel or just in the wp interface? i see all the image files i uploaded on the [dir]uploads page, organized by month/year as you mentioned on the cpanel directory, but was wondering where i can find the actual Pages file/word content pages? thank you…

      • So, there’s no way to get the contents of the page themselves through the FTP? Like, if I wanted to pull my about page from the FTP, I wouldn’t be able to do that?

        • Or… is this databased stored elsewhere on the site outside of the wordpress folder, and having only backed up the wordpress folder when my site was deleted, I’ve lost all of my content?

        • No, you will not be able to do that.

          WordPress does not create and store static pages. Instead, it stores your content in a database and then generates HTML pages on the fly.

        • “No, you will not be able to do that.

          WordPress does not create and store static pages. Instead,
          it stores your content in a database and then generates
          HTML pages on the fly.”

          After a WSOD and several hours of trying to get back to the dashboard, I deleted all WP files from my file mgr. Before I did that I backed up and stored all of those files in a temp file in file manager.

          Is there a way I can get my input (static pages) generated in html, so I may copy them?

          I am about ready to install another WP theme, but before I do so I hold a slim hope that these pages are still stored somewhere, like in an etheral world of some database.

        • Robert, I second your motion. The answer has been rather expertly skirted around here. Is there some kind of membership fee we need to pay for these kind of seemingly simple answers? All I can find is the import/export tool for the pages, then edit the CSS or delete the unnecessary pages as desired.

  25. Nice article. For development team working with enterprise content management services like WordPress (or in that matter any other CMS like Sitefinity, Drupal, etc.) must understand the basic file structure. This will not only help them find the files but with this they will also be able to organize the files in proper way.
    Using a nested approach to save your content and system files is a the best way to design a file structure.

  26. Thank You so much. It was Really Helpful for me. I work in my University Webteam and have made a website for them :)

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.