{"id":1182,"date":"2013-03-02T10:11:36","date_gmt":"2013-03-02T10:11:36","guid":{"rendered":"http:\/\/www.wordpressintegration.com\/blog\/?p=1182"},"modified":"2023-09-19T13:23:01","modified_gmt":"2023-09-19T13:23:01","slug":"whats-inside-wordpress-a-look-into-its-folder-structure","status":"publish","type":"post","link":"https:\/\/www.wordpressintegration.com\/blog\/whats-inside-wordpress-a-look-into-its-folder-structure\/","title":{"rendered":"Whats inside WordPress: A look into its folder structure"},"content":{"rendered":"<p align=\"justify\">WordPress is renowned throughout the world for being highly user friendly and easy to learn. It has a feature rich dashboard from where you can configure and control most of the aspects of your WordPress website. The backend of the WordPress software is just as organized and user friendly. The only problem is that it requires good knowledge of WordPress and its architecture to properly manipulate it from the backend. But if you are serious about WordPress programming or like to experiment in your WordPress site, it\u2019s important to know what goes where. Because no matter how careful you remain you are bound to break your WordPress site once or twice and the best way to rectify it would be from the back-end.<!--more--><\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.wordpressintegration.com\/blog\/wp-content\/uploads\/2013\/03\/wordpress-folder-structure.gif\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-1198 aligncenter\" title=\"wordpress-folder-structure\" alt=\"wordpress-folder-structure\" src=\"https:\/\/www.wordpressintegration.com\/blog\/wp-content\/uploads\/2013\/03\/wordpress-folder-structure.gif\" width=\"580\" height=\"500\" \/><\/a><\/p>\n<p>Image Credit @ Mikhail Nishchenko<\/p>\n<h2>Experiment all you want but in localhost<\/h2>\n<p align=\"justify\">It\u2019s alright to experiment with your WordPress website. But it\u2019s best to experiment on a localhost virtual server installation of your website so you don\u2019t decrease the uptime of your live site. Also localhost installation can be taken down without any problem and once you are satisfied with the results, it can be easily updated on the live domain. Also it\u2019s better to take a backup of your WordPress folder and database on a safe and secure location before any new change.<\/p>\n<h2>WordPress folder and its structure<\/h2>\n<p style=\"text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-1197 aligncenter\" title=\"wordpress-mainfolder\" alt=\"wordpress-mainfolder\" src=\"https:\/\/www.wordpressintegration.com\/blog\/wp-content\/uploads\/2013\/03\/wordpress-mainfolder.jpg\" width=\"580\" height=\"300\" \/><\/p>\n<p align=\"justify\">To understand WordPress you have to first download the WordPress software. It\u2019s a zip file so extract it in the right folder according to your needs, for example, if you want to install it on XAMPP local host extract it in xammp\/htdoc\/ folder, or if you just wish to check the contents extract anywhere you like.<\/p>\n<p align=\"justify\">WordPress or WordPress 3.5.1 to be more exact, contains three additional folders inside the main WordPress folder, along with some PHP files. These folders are named <strong>wp-include<\/strong>, <strong>wp-admin<\/strong>, and <strong>wp-content<\/strong>. All three folders are equally important and are helpful in their own way. Here we discuss in brief about what each folder contains and what they are used for.<\/p>\n<h2>WP-CONTENT<\/h2>\n<p style=\"text-align: center;\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-1200 aligncenter\" title=\"wordpress wp-content\" alt=\"wordpress wp-content\" src=\"https:\/\/www.wordpressintegration.com\/blog\/wp-content\/uploads\/2013\/03\/wordpress-wp-content1.jpg\" width=\"580\" height=\"300\" \/><\/p>\n<p align=\"justify\">Wp-content as the name suggest is where your content goes. The main folders inside wp-content are <strong>Theme, Plugins, and Uploads<\/strong>, and they also contain exactly what they are named, i.e., Theme contains all the themes you have created or downloaded for use in your WordPress site. All the themes are also neatly arranged in folders whose names match exactly with the theme name. For example all the content of the twenty twelve theme would be placed in folder named <strong>Twentytwelve<\/strong> . So the correct path of the theme becomes WordPress\/wp-content\/twnetytwelve\/. Same is the case with plugins. So, if you install a plugin that completely breaks your WordPress dashboard or install a theme that is not allowing you to open the dashboard, just go to wp-content\/theme or wp-content\/plugin folder and delete the folder that is named according to the malfunctioning theme or plugin. In 95% of the cases this fixes the problem. If it still doesn&#8217;t solve the issue, use the backup (so you see backups are important).<\/p>\n<p align=\"justify\">Uploads folder contains all the images and videos that you have uploaded on your WordPress site. They are arranged in folders named according to the year and then into subfolders according to the month\u2019s number. So, if you wish to migrate your whole image gallery from one site to another, or wish to take a backup of your images, this is the folder to work with.<\/p>\n<h2>WP-ADMIN<\/h2>\n<p align=\"justify\">Wp-admin is the folder that is best left untouched. It contains the CSS, JavaScript, and PHP files that controls and renders your admin dashboard. And as a matter of security it is best to password protect this folder at the domain level. Nearly all domain hosts allow users to password protect a folder from the cpanel itself but if yours does not have that service or you are hosting on your own server create .htaccess file and whitelist only your selected IP address to allow access to your WordPress site. Simply copy the following code and paste it in a file named .htaccess that is placed in wp-admin folder. Replace the IP addresses with your desired IP addresses<\/p>\n<p style=\"background: #C0C0C0; padding: 15px; margin: 0; line-height: 15px; font-size: 14px;\">AuthUserFile \/dev\/null<\/p>\n<p style=\"background: #C0C0C0; padding: 15px; margin: 0; line-height: 15px; font-size: 14px;\">AuthGroupFile \/dev\/null<\/p>\n<p style=\"background: #C0C0C0; padding: 15px; margin: 0; line-height: 15px; font-size: 14px;\">AuthName \u201cAccess Control\u201d<\/p>\n<p style=\"background: #C0C0C0; padding: 15px; margin: 0; line-height: 15px; font-size: 14px;\">AuthType Basic<\/p>\n<p style=\"background: #C0C0C0; padding: 15px; margin: 0; line-height: 15px; font-size: 14px;\">order deny,allow<\/p>\n<p style=\"background: #C0C0C0; padding: 15px; margin: 0; line-height: 15px; font-size: 14px;\">deny from all<\/p>\n<p style=\"background: #C0C0C0; padding: 15px; margin: 0; line-height: 15px; font-size: 14px;\"># whitelist first IP address<\/p>\n<p style=\"background: #C0C0C0; padding: 15px; margin: 0; line-height: 15px; font-size: 14px;\">allow from 192.168.1.1<\/p>\n<p style=\"background: #C0C0C0; padding: 15px; margin: 0; line-height: 15px; font-size: 14px;\"># whitelist second IP address<\/p>\n<p style=\"background: #C0C0C0; padding: 15px; margin: 0; line-height: 15px; font-size: 14px;\">allow from 192.168.1.2<\/p>\n<p style=\"background: #C0C0C0; padding: 15px; margin: 0; line-height: 15px; font-size: 14px;\">allow from 192.168.1.3<\/p>\n<p><\/p>\n<h2>WP-INCLUDES<\/h2>\n<p align=\"justify\">Wp-includes is another folder that is best left untouched unless you are an expert programmer and WordPress developer. It contains the main PHP, CSS, JavaScript, and image files of WordPress that turns all the cogwheels of your WordPress site. It contains all the hierarchies, rules, actions, etc., that dictates the basic function of WordPress software and your WordPress site.<\/p>\n<h2>Conclusion<\/h2>\n<p align=\"justify\">WordPress is a very versatile tool but to understand the true magic of WordPress it is necessary to understand how it works and what goes where. Knowledge about WordPress folder structure is also important in creating custom themes and custom plugins for your WordPress site.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress is renowned throughout the world for being highly user friendly and easy to learn. It has a feature rich dashboard from where&#8230;<\/p>\n","protected":false},"author":14,"featured_media":4478,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[393,392,389,395,394],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.wordpressintegration.com\/blog\/wp-json\/wp\/v2\/posts\/1182"}],"collection":[{"href":"https:\/\/www.wordpressintegration.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wordpressintegration.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wordpressintegration.com\/blog\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wordpressintegration.com\/blog\/wp-json\/wp\/v2\/comments?post=1182"}],"version-history":[{"count":1,"href":"https:\/\/www.wordpressintegration.com\/blog\/wp-json\/wp\/v2\/posts\/1182\/revisions"}],"predecessor-version":[{"id":5810,"href":"https:\/\/www.wordpressintegration.com\/blog\/wp-json\/wp\/v2\/posts\/1182\/revisions\/5810"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wordpressintegration.com\/blog\/wp-json\/wp\/v2\/media\/4478"}],"wp:attachment":[{"href":"https:\/\/www.wordpressintegration.com\/blog\/wp-json\/wp\/v2\/media?parent=1182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wordpressintegration.com\/blog\/wp-json\/wp\/v2\/categories?post=1182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wordpressintegration.com\/blog\/wp-json\/wp\/v2\/tags?post=1182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}