Business

Beginner’s Guide to WordPress File and Directory Structure

Do you want to learn more about WordPress files and directories?

Your website hosting server stores all core WordPress files, themes, plugins, and user submissions.

We’ll go through the WordPress file and directory structure in this beginner’s guide.

Why You Should Learn About WordPress File and Directory Structure?

Most WordPress users may manage their websites without ever understanding about WordPress files or folders. Understanding how WordPress saves files and folders, on the other hand, may help you fix many common WordPress problems on your own.

This tutorial will assist you in the following ways:

  • 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.
  • Where configuration files are stored on your WordPress install.

This article also teaches you how WordPress functions behind the scenes and which WordPress files you should back up.

After that, let’s look at the WordPress file and directory structure.

Accessing WordPress Files and Directories

Your WordPress files and folders are kept on the server where you host your website. These files can be accessed using an FTP client. For more information, see our article on how to utilize FTP to upload WordPress files.

The File Manager program, which is included into most WordPress hosting control panels, provides a simpler alternative to FTP.

wordpress,wordpress tutorial for beginners,wordpress file and directory structure,wordpress file structure,wordpress for beginners,wordpress tutorial,wordpress file structure explained,wordpress folder structure,wordpress directory structure explained,exploring wordpress directory structure,how to make a wordpress plugin,file structure,understanding wordpress file structure,wordpress file structure tutorial,wordpress website,learn wordpress folder structure

When you connect to your WordPress site through FTP or File Manager, you will see the following file and directory structure:

wordpress,wordpress tutorial for beginners,wordpress file and directory structure,wordpress file structure,wordpress for beginners,wordpress tutorial,wordpress file structure explained,wordpress folder structure,wordpress directory structure explained,exploring wordpress directory structure,how to make a wordpress plugin,file structure,understanding wordpress file structure,wordpress file structure tutorial,wordpress website,learn wordpress folder structure

The fundamental WordPress files and directories are located in the root folder. These are the files and directories that allow your WordPress site to function.

Apart from .htaccess and wp-config.php files, you are not supposed to edit other files on your own.

Here is a list of fundamental WordPress files and folders that may be found in the root directory of your WordPress site.

  • 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 above list is missing .htaccess and wp-config.php files. This is due to the fact that those two files are produced following the installation of WordPress.

WordPress Configuration Files

Some specific configuration files can be found in the WordPress root directory. These files include critical WordPress-specific options.

wordpress,wordpress tutorial for beginners,wordpress file and directory structure,wordpress file structure,wordpress for beginners,wordpress tutorial,wordpress file structure explained,wordpress folder structure,wordpress directory structure explained,exploring wordpress directory structure,how to make a wordpress plugin,file structure,understanding wordpress file structure,wordpress file structure tutorial,wordpress website,learn wordpress folder structure

  • WordPress uses.htaccess as a server configuration file to control permalinks and redirects.
  • wp-config.php – This file tells WordPress how to connect to your database. It also configures several global WordPress site settings.
  • index.php – When a user requests a page, the index file loads and initializes all of your WordPress files.

You may need to edit wp-config.php or .htaccess file sometimes. When modifying these two files, exercise extreme caution. A little error might render your website unavailable. Before making any modifications to these two files, always make a backup copy on your computer.

If you can’t locate the.htaccess file in your WordPress root directory, read our article on why you can’t find the.htaccess file in your WordPress root directory.

You may or may not have the following files in your root directory, depending on how your WordPress site is configured.

  • robots.txt – This file includes instructions for search engine crawlers.
  • Favicon.ico – WordPress hosting will occasionally produce a favicon file.

Inside The wp-content Folder

All uploads, plugins, and themes are saved under the wp-content folder by WordPress.

wordpress,wordpress tutorial for beginners,wordpress file and directory structure,wordpress file structure,wordpress for beginners,wordpress tutorial,wordpress file structure explained,wordpress folder structure,wordpress directory structure explained,exploring wordpress directory structure,how to make a wordpress plugin,file structure,understanding wordpress file structure,wordpress file structure tutorial,wordpress website,learn wordpress folder structure

It is commonly considered that you may alter files and directories contained within the wp-content folder. This is not totally correct.

Let’s check inside the wp-content folder to see how it works and what you can do.

wordpress,wordpress tutorial for beginners,wordpress file and directory structure,wordpress file structure,wordpress for beginners,wordpress tutorial,wordpress file structure explained,wordpress folder structure,wordpress directory structure explained,exploring wordpress directory structure,how to make a wordpress plugin,file structure,understanding wordpress file structure,wordpress file structure tutorial,wordpress website,learn wordpress folder structure

The contents of the wp-content folder may vary from one WordPress site to the next. However, all WordPress sites often include the following:

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

WordPress saves your theme files under the /wp-content/themes/ directory. It is possible to alter a theme file, however it is typically not encouraged. Your modifications will be overwritten as soon as you upgrade your theme to a newer version.

This is why creating a child theme for WordPress theme modification is advised.

Read More: How Much Does a Custom WordPress Theme Cost?

WordPress plugins that you download and install on your site are saved in the /wp-content/plugins/ subdirectory. Unless you built a site-specific WordPress plugin for your personal use, you should not alter plugin files directly.

Many WordPress tutorials provide code snippets that you may paste into your WordPress site.

Custom code should be added to your WordPress site via the functions.php file of your child theme or by building a site-specific plugin. You may also use the custom code snippets plugin to add custom code.

All of your picture and media uploads are saved in the /wp-content/uploads/ folder by WordPress. Uploads are often categorized in /year/month/ directories. You should always include the uploads folder in your WordPress backups.

You can get new copies of WordPress core, your theme, and installed plugins from their respective sources. However, if you lose your uploads folder, it would be extremely difficult to recover it without a backup.

Other default directories that you could see in your wp-content directory.

  • languages – In this folder, WordPress stores language files for non-English WordPress sites.
  • upgrade – This is a temporary folder produced by WordPress after a version update.

Many WordPress plugins may also establish their own directories to store files within your wp-content area.

To save user uploads, certain WordPress plugins may create directories within the /wp-content/uploads/ folder. For example, the Smash BalloonWooCommerce, SeedProd, and WPForms plugins all generated folders on this demo website.

wordpress,wordpress tutorial for beginners,wordpress file and directory structure,wordpress file structure,wordpress for beginners,wordpress tutorial,wordpress file structure explained,wordpress folder structure,wordpress directory structure explained,exploring wordpress directory structure,how to make a wordpress plugin,file structure,understanding wordpress file structure,wordpress file structure tutorial,wordpress website,learn wordpress folder structure

Some of these folders may contain vital information. As a precaution, we recommend backing up all such directories.

Other directories may contain files that you may remove securely. Cache plugins, such as WP Rocket, may, for example, create folders to preserve caching data.

That’s all there is to it; we hope this post has helped you better grasp the WordPress file and directory structure. You might also be interested in our phpMyAdmin beginner’s guide to WordPress database management and our article on how to design a custom WordPress theme without any coding skills.

Related Articles

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top button