Hello friend, this the second post in WordPress development series. In the first article, we learn basic about WordPress, how to install WordPress and what you should know to dive into WordPress development. Now in this article, we give an eye on the folder structure of the WordPress.
WordPress Folder Structure
So let’s get started. When you open your project directory, it looks like as below image.
Being a developer, WordPress does not allow you to touch any other file and folder other than wp-content. Sometimes you can edit wp-config.php file to some level, but not recommended for beginners. The wp-admin folder is for admin dashboard. You know, in WordPress admin panel is open with site_url/wp-admin.
wp-content folder structure
Now you get your area of work. Now let’s have a look at the wp-content folder.
Now have a little introduction to these folders:
- plugins: If you are working on the plugin, then this folder will be your workspace.
- themes: If you are dealing with themes, then this folder will be your workspace.
- uploads: This folder contains all the media files that you upload to your site. No need to touch, but you can explore it.
Other files and folders are not you. So leave them.
wp-content > plugins folder
When you open it, you will find some folders and files. Each of them is a plugin. Have a look at the below image.
As you see there is 2 folder and 2 files. Now have a look at the plugin list in the admin dashboard.
You can see that there are 3 plugins installed. Any plugin installed on WordPress has its home at wp-content>plugins directory.
Recommended Post: How to install a WordPress plugin
wp-content > themes folder
Same as the plugin, it’s home for all theme installed on WordPress. When you access wp-content > themes folder, you find folders, which are themes.
These are the themes that are installed on WordPress. You can check it on WordPress dashboard.
It’s all about basic WordPress folder structure. Themes and plugins have their own structures. Which will be covered in the next article.
Recommended Post: How to Install a WordPress Theme
Why is index.php everywhere?
Did you notice, that index.php file is present almost in all folders. Can you guess why it is at all folders?
It’s for security purpose.
You know WordPress has its own folder structure, which is same for all WordPress sites. Now anyone can see files present in the particular folder. In the case when someone tries to open these folders via URL, index.php file not allow to see files or folder present in the folder. As any folder opens on the server, it automatically renders the index.php file. So you secure your website.
In this article, we look into the basic folder structure of the WordPress an find which folder is for you to work. This article belongs WordPress Theme development series. If you want to dive into WordPress development, you can subscribe my blog to get tutorial direct to your Inbox. If you have any query regarding this post, you can ask me in the comment.
How useful was this post?
Click on a star to rate it!
Average rating / 5. Vote count:
No votes so far! Be the first to rate this post.
We are sorry that this post was not useful for you!
Let us improve this post!
Thanks for your feedback!