{"id":18553,"date":"2021-01-09T17:00:17","date_gmt":"2021-01-09T16:00:17","guid":{"rendered":"https:\/\/qodeinteractive.com\/magazine\/?p=18553"},"modified":"2021-06-29T13:34:57","modified_gmt":"2021-06-29T11:34:57","slug":"wordpress-file-structure","status":"publish","type":"post","link":"https:\/\/qodeinteractive.com\/magazine\/wordpress-file-structure\/","title":{"rendered":"Understanding the WordPress File and Directory Structure"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column][vc_column_text]WordPress is a very user-friendly platform that allows all-comers with little to no coding knowledge to create and manage their websites. While you might not need to know to code, you still need to invest some effort and dedication to manage a WordPress site. A part of that is getting to understand the WordPress file and folder structure. Having this knowledge makes some of the common tasks much easier and less stressful. Furthermore, it is a stepping stone for users who want to customize their websites further or learn more about WordPress development. We created this article to help you understand the WordPress file structure and its importance, as well as to clarify the makeup of the following directories:[\/vc_column_text][vc_empty_space height=&#8221;22px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#the-wp-admin-folder\">The wp-admin folder<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#the-wp-content-folder\">The wp-content folder<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;5px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><a href=\"#the-wp-includes-folder\">The wp-includes folder<\/a><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">Benefits of knowing more about the WordPress file and directory structure<\/h2>\n<p>[\/vc_column_text][vc_column_text]Even though most aspects of running a website don\u2019t require you to have an in-depth knowledge of the WordPress file structure, understanding it could help you troubleshoot some problems. After reading this article, you will know which are the core WordPress files and folders and where they are located. This knowledge will be helpful if you ever need to manually update WordPress via FTP or work on your server control panel.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]This article will also cover where the website configuration files are stored. This will help you perform various tasks\u2014debugging errors, <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-create-301-redirects-in-wordpress\/\">adding redirections<\/a>, blocking some IPs, <a href=\"https:\/\/qodeinteractive.com\/magazine\/error-establishing-a-database-connection-in-wordpress\/\">solving database issues<\/a>, etc. It will also help you understand where and how your uploaded media files are stored.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Additionally, you will come to know where your themes and plugins are stored, as well as the purpose of some of the additional folders within the wp-content directory. Most importantly, you will get to know how to <a href=\"https:\/\/qodeinteractive.com\/magazine\/disable-plugins-wordpress\/\">disable a plugin<\/a> or a theme via FTP. Knowing this is quite helpful in troubleshooting many common WordPress errors, especially the ones that leave you locked out from your dashboard or prove fatal to your website.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Finally, by getting a thorough grasp on the WordPress file structure, you will be able to judge when to <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-backup-wordpress-files\/\">make a backup of your WordPress files<\/a> (or a single specific file only) and when to <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-manually-backup-wordpress-website\/\">make a backup of your whole WordPress website<\/a>.[\/vc_column_text][vc_empty_space height=&#8221;80px&#8221;][vc_widget_sidebar sidebar_id=&#8221;new-top-picks-banner&#8221;][vc_empty_space height=&#8221;81px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">Understanding the WordPress file and directory structure<\/h2>\n<p>[\/vc_column_text][vc_column_text]Now that you\u2019ve seen some of the ways knowing the WordPress file and folder structure can benefit you, we can proceed to explore it from top to bottom. To view the WordPress file and directory structure of your website you will need to <strong>connect to your server<\/strong> using FTP first. This can be accomplished in one of three ways\u2014by <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-use-ftp\/\">using an FTP client<\/a>, through the File Manager option within cPanel, or via a file manager plugin within your admin dashboard. Once you\u2019ve connected to your server, <strong>position yourself within the root WordPress directory<\/strong> (often called <em>public_html<\/em>) from which we start our explanation.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Within the public_html file, you will find various folders and files, but we will focus on the most standard configuration as shown below.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"663\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/FTP-Image.jpg\" class=\"attachment-full size-full\" alt=\"FTP Image\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/FTP-Image.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/FTP-Image-300x205.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/FTP-Image-768x525.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/FTP-Image-620x424.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Depending on the website, additional folders and files might be present within your root WordPress directory. For example, you might have a .well-known folder, which is used for demonstrating ownership over a domain when adding an SSL certificate. Also, if you have decided to <a href=\"https:\/\/qodeinteractive.com\/magazine\/install-wordpress-in-subdirectory\/\">create a subdirectory<\/a>, its folder would be located in the root WordPress directory. Among other possible additional files, you could see the php.ini file, used for configuring your PHP settings, or robots.txt, used for giving directives to web crawlers on which parts of your website should or should not be crawled.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Going back to the standard WordPress structure, you will notice three folders\u2014<strong>wp-admin<\/strong>, <strong>wp-content<\/strong>, and <strong>wp-includes<\/strong>, all of which we will discuss in this article. As for the files, we will cover the three most important ones<strong>\u2014wp-config.php, .htaccess<\/strong>, and the<strong> index.php<\/strong> file.[\/vc_column_text][vc_empty_space height=&#8221;22px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\">The <strong>wp-config.php<\/strong> file is an important core WordPress file. It contains information for communicating with your database such as your MySQL settings, <a href=\"https:\/\/qodeinteractive.com\/magazine\/change-wordpress-salt-keys\/\">SALT keys<\/a>, and <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-change-wordpress-database-prefix\/\">database prefix<\/a>. By <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-edit-wp-config-file\/\">editing the wp-config.php file<\/a>, you can achieve additional advanced WordPress functionalities like debugging errors. Interestingly enough, the wp-config.php file isn\u2019t included in the WordPress package by default. It is created during <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-install-wordpress\/\">the WordPress installation process<\/a>, using the wp-config-sample.php file as a blueprint.<\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"700\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Config-Sample.php_.jpg\" class=\"attachment-full size-full\" alt=\"WP Config Sample.php\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Config-Sample.php_.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Config-Sample.php_-300x217.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Config-Sample.php_-768x555.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Config-Sample.php_-620x448.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\">The <strong>.htaccess<\/strong> file, standing for \u201chypertext access\u201d, is an Apache server configuration file that operates on a directory level. So, if you create subdirectories, each could have a separate .htaccess file that operates independently from the .htaccess file found in the root WordPress directory. Among other things, the .htaccess file is used to enable URL redirection, restrict access to certain IPs, or enable password protection.<\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;28px&#8221;][vc_column_text css=&#8221;.vc_custom_1609849968592{padding-left: 25px !important;}&#8221;]As this is, by default, a hidden file, you will need to <a href=\"https:\/\/qodeinteractive.com\/magazine\/find-htaccess-file-on-wordpress-site\/\">enable the options for showing hidden files<\/a> to see it. This file is also not a part of a default WordPress package, but it is often <strong>created automatically<\/strong> later and placed within the root WordPress directory. <strong>If it isn\u2019t, you can simply create it manually and upload it via FTP.<\/strong> We have included the code that is present in a default .htaccess file below, in case you need it.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text css=&#8221;.vc_custom_1609850039042{padding-left: 25px !important;}&#8221;]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># BEGIN WordPress\r\n&lt;IfModule mod_rewrite.c&gt;\r\nRewriteEngine On\r\nRewriteBase \/\r\nRewriteRule ^index\\.php$ - [L]\r\nRewriteCond %{REQUEST_FILENAME} !-f\r\nRewriteCond %{REQUEST_FILENAME} !-d\r\nRewriteRule . \/index.php [L]\r\n&lt;\/IfModule&gt;\r\n# END WordPress<\/pre>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;22px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\">The <strong>index.php<\/strong> file helps load and initialize your WordPress files when a user requests them. You need to have an index.php file in your root WordPress directory for your website to show properly in the browser. If you don\u2019t have an index.php file, instead of your website, you will see the file and folder structure of your root WordPress directory in your browser window. Furthermore, you would be able to view and\/or download files directly from the server via the browser. However, so could anyone else, which poses a security risk. As such, having an index.php in the root WordPress directory is a must.<\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;28px&#8221;][vc_column_text css=&#8221;.vc_custom_1609850048878{padding-left: 25px !important;}&#8221;]Similarly, you can often find index.php files in subfolders, serving the same purpose. These files are empty, as opposed to the index.php file in the root WordPress directory. More precisely, they often come with an opening PHP tag and a single comment only \u2013 none of which will be shown when the file is executed.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text css=&#8221;.vc_custom_1609850130629{padding-left: 25px !important;}&#8221;]Example:[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text css=&#8221;.vc_custom_1609850057771{padding-left: 25px !important;}&#8221;]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?php\r\n\/\/ Silence is golden.<\/pre>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text css=&#8221;.vc_custom_1609850071149{padding-left: 25px !important;}&#8221;]As such, if a user tries to access the subfolder directly in the browser, he will only see a blank screen, as the index.php within will be executed.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]With that being said, <strong>of the files within a standard configuration, you should only consider editing the wp-config.php and the .htaccess file, as all remaining files are core WordPress files.<\/strong> Furthermore, we suggest <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-backup-wordpress-files\/\">making a backup of your WordPress files<\/a> before making any changes to the wp-config.php or .htaccess file. Otherwise, you might not be able to access your website after making an error within those files.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Having clarified the general structure within the public_html directory and covered the three most important files within, let us examine the three folders that we mentioned, one at a time.[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\"><a id=\"the-wp-admin-folder\"><\/a>The wp-admin folder<\/h3>\n<p>[\/vc_column_text][vc_column_text]The <strong>wp-admin<\/strong> folder contains all the files and folders required for the WordPress dashboard to properly function.<strong> It is one of the two core WordPress folders<\/strong>, alongside the wp-includes folder. Currently, there are seven subfolders within the wp-admin folder: css, images, includes, js, maint, network, and user, as well as many files.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"700\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Admin-Image.jpg\" class=\"attachment-full size-full\" alt=\"WP Admin Image\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Admin-Image.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Admin-Image-300x217.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Admin-Image-768x555.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Admin-Image-620x448.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]The files and folders are based around the most important file within this folder\u2014admin.php. This file performs many functionalities: displays the WordPress dashboard and plugin admin pages, determines if a user is an admin or not, schedules transient and trash cleanup, loads many other core files from within the wp-admin folder as well as within the root WordPress directory, and so on. One of the core files that admin.php loads is the wp-load.php file, which then loads the wp-config.php file.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"700\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Admin-php.jpg\" class=\"attachment-full size-full\" alt=\"WP-Admin-php\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Admin-php.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Admin-php-300x217.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Admin-php-768x555.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Admin-php-620x448.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Additionally, if you take a look at some file names within the wp-admin folder, you will notice from their names that they serve to enable common administration tasks. For example, install.php enables WordPress installation, while theme-install.php and plugin-install.php provide the administration panels for theme and plugin installation, respectively. Furthermore, widgets.php provides the Widgets panel, while the nav-menus.php provides the Menus panel, both of which are located in the Appearance section.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\"><a id=\"the-wp-content-folder\"><\/a>The wp-content folder<\/h3>\n<p>[\/vc_column_text][vc_column_text]If you\u2019ve ever tinkered with your WordPress installation, chances are that you are very familiar with the contents of this folder. You can find various folders within, but there are two that will always be present\u2014the plugins and themes folders. Besides them, you will see an index.php file, the importance of which we discussed previously.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Content.jpg\" class=\"attachment-full size-full\" alt=\"WP Content\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Content.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Content-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Content-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/WP-Content-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]We will explain more about these two subfolders below. Apart from that, we will briefly cover some of the other folders you can encounter.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;22px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><strong>Plugins<\/strong><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Every plugin that you install on your WordPress website will get an appropriately named subfolder within the plugins folder. The content of those subfolders varies from plugin to plugin. Simpler plugins might have only a couple of files, while more complicated ones could have an extensive hierarchical structure of files and folders within them.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Plugins.jpg\" class=\"attachment-full size-full\" alt=\"Plugins\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Plugins.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Plugins-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Plugins-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Plugins-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]What is important to know is that by renaming the plugins folder via FTP, you will disable all the plugins you have installed. Similarly, renaming a single plugin subfolder via FTP will disable that plugin. This trick may come in handy when you are troubleshooting a WordPress error that has left you locked out of your admin dashboard. When renaming folders, we suggest you add a suffix to the original folder name (e.g. plugins-disabled or akismet.old) so that you can easily keep track of the folders you changed.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;22px&#8221;]<ul class=\"qodef-unordered-list-item qodef-toc\">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\"><strong>Themes<\/strong><\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Similar to the plugins folder, every theme you install will get an appropriately named subfolder within the themes folder.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Themes.jpg\" class=\"attachment-full size-full\" alt=\"Themes\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Themes.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Themes-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Themes-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Themes-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]The content of a theme folder can differ a lot based on its authors, but some files and folders are present in any theme. Those include functions.php and style.css, as well as index.php, header.php, footer.php, and <a href=\"https:\/\/qodeinteractive.com\/magazine\/wordpress-template-hierarchy\/\">other template files<\/a>. Additionally, themes will have separate folders for css, js, images, and fonts. Most often, they will all be stored within a subfolder called assets, contained within the folder of your theme.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"710\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Themes-2.jpg\" class=\"attachment-full size-full\" alt=\"Themes\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Themes-2.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Themes-2-300x220.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Themes-2-768x563.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Themes-2-620x454.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]If you plan to make extensive modifications to your website, you should <a href=\"https:\/\/qodeinteractive.com\/magazine\/wordpress-create-child-theme\/\">make a child theme<\/a> and place your custom code inside the functions.php file of the child theme. If you do this with the functions.php file of the main (parent) theme, then the code you add will get overwritten when the theme gets updated. Another possible way to safely modify your site is to create a <a href=\"https:\/\/qodeinteractive.com\/magazine\/wordpress-site-specific-plugin\/\">site-specific plugin<\/a> and add the code within it.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Apart from that, the advice about renaming folders that we mentioned when talking about the plugins holds here as well. If you rename the folder of your currently active theme via FTP, you will deactivate it. In its place, a default WordPress theme will be activated, provided you have one present on your server. If you haven\u2019t installed a default WordPress theme, you would need to do so first, before deactivating your theme via FTP.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Before we move on to exploring the content of the wp-includes folder, we will cover the additional subfolders that could be within the wp-content folder. Depending on your website, the wp-content folder could contain a lot more subfolders besides the default plugins and themes that we discussed previously. Those include uploads, upgrade, languages, mu-plugins, cache, and many more. The upgrade folder temporarily stores WordPress files every time you update WordPress on your website and is created during the first WordPress update on your website. The uploads folder is created when you first upload a media file to your Media Library and it contains all the media files. Those files are usually stored in a subfolder structure that is labeled by year and month. What is more, after changing the website language in Settings &gt; General &gt; Site Language for the first time, the languages folder is created. The languages folder will then contain the language files necessary for translating your website into a language other than English.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"700\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Languages.jpg\" class=\"attachment-full size-full\" alt=\"Languages\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Languages.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Languages-300x217.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Languages-768x555.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Languages-620x448.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Similarly, the folders of individual plugins and themes could include a subfolder named languages. Within it, you\u2019d get corresponding .pot files used in the process of translating plugin-related or theme-related labels.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Depending on the WordPress website, within the wp-content folder, you could also find a mu-plugins folder that stores <a href=\"https:\/\/wordpress.org\/support\/article\/must-use-plugins\/\" target=\"_blank\" rel=\"noopener\">must-use plugins<\/a> for your website. Needless to say, these plugins are automatically activated and can\u2019t be deactivated. The only way they can be disabled is if you remove them from the mu-plugins folder via FTP.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Some caching folders can also create a cache subfolder within the wp-content folder and use it to store cached files. It is worth noting that other plugins you have installed might also create additional subfolders within the wp-content folder to store their data. As such, you shouldn\u2019t be surprised if you see additional subfolders we failed to mention. Having said that, we can proceed to explain the content of the wp-includes folder.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\"><a id=\"the-wp-includes-folder\"><\/a>The wp-includes folder<\/h3>\n<p>[\/vc_column_text][vc_column_text]The <strong>wp-includes<\/strong> folder is the second core WordPress folder. While the wp-admin folder contains the files and folders related to the WordPress dashboard panel, wp-content contains your plugins and themes, the wp-includes folder contains all the remaining files and folders required for your website to function properly. Therefore, it is important to mention that <strong>you shouldn\u2019t edit any of the core WordPress files, especially the ones in the wp-includes folder.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]The wp-includes folder is very big, as it currently contains 22 subfolders and 1180 files in total.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"700\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Wp-Includes.jpg\" class=\"attachment-full size-full\" alt=\"Wp Includes\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Wp-Includes.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Wp-Includes-300x217.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Wp-Includes-768x555.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/01\/Wp-Includes-620x448.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;28px&#8221;][vc_column_text]The most important file within this folder is the functions.php file, which is considered the main WordPress API. It contains a great number of support functions that enable WordPress to work. Some of the other files you might find interesting are:<br \/>\nversion.php \u2013 sets the WordPress version you currently use,<br \/>\nwp-db.php \u2013 contains functions for connecting to the MySQL database,<br \/>\nwidgets.php \u2013 core Widgets API, and<br \/>\nsitemaps.php \u2013 added in WordPress 5.5 update, provides a list of functions you can use to interact with the XML Sitemaps API.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]This concludes our overview of the WordPress file structure. In case you want to delve even deeper into the files and folders and how they are structured, we suggest reviewing the <a href=\"https:\/\/codex.wordpress.org\/Main_Page\" target=\"_blank\" rel=\"noopener\">Codex<\/a> and <a href=\"https:\/\/developer.wordpress.org\/\" target=\"_blank\" rel=\"noopener\">Developer Resources<\/a> for more information.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">Final Thoughts<\/h2>\n<p>[\/vc_column_text][vc_column_text]Even though understanding WordPress file structure might seem daunting to some and tedious to others, it can often come in handy when troubleshooting errors or customizing your website. In this article, we have given a general overview of the files and folders within a WordPress installation, with special attention given to the more important files or folders. Therefore, we hope this article will prove insightful to a wide range of WordPress users and help to brush up on existing WordPress knowledge for those already familiar with the topic.<br \/>\n[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Get a better understanding of how your site functions and which files to use for troubleshooting by getting to know the WordPress file structure.<\/p>\n","protected":false},"author":11229,"featured_media":18645,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[14,4,13],"class_list":["post-18553","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-resources","tag-core","tag-tips","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/18553","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/users\/11229"}],"replies":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/comments?post=18553"}],"version-history":[{"count":0,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/18553\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media\/18645"}],"wp:attachment":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media?parent=18553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/categories?post=18553"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/tags?post=18553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}