WordPress Guide – Dissection Of File Structure
First in a series of WordPress Guide posts this one is dedicated to an overview of what it is we work with on daily bases. How is our system built and most importantly what you, as WordPress blogger, need to know about it to perform maintenance, such as backup, upgrade, etc.
I have wrote on several occasions that we need to know how our blog works in order to be most efficient bloggers but haven’t done enough to help you. Dissection of File Structure will be a direct step toward creating a new bread of WordPress Guides - visual and with descriptions so you could easily bookmark it and reference…
WordPress File Structure
Whatever method you have used to install WordPress (a manual install, Fantastico or any other automated script) - your file structure will still be exactly the same, which makes this tutorial a bit simpler.
Below I provide a screenshot of an FTP client right before performing an Upgrade of WordPress, click to open it in new window for full view and I provide the explanation of each point I made in it right under the screenshot
1. WordPress Installation Path
Point one on the image above it is simply a location of ALL your WordPress blog files on your host. There are two types of installations that are generally done on shared hosting and I will explain the differences and how it relates to the path of your blog (WordPress Root Folder)
- When WordPress Is The Main Site, i.e accessed via http://www.domain.com. When your blog is installed using this type - your blog Root Folder will be most commonly public_html or www, depends on what your host is using.
- When WordPress Is Sub-domain or A Folder Within Main Site. This is the case shown in picture above and while the url to your blog will be different depending on which method you used, i.e accessed as http://blogname.domain.com or http://www.domain.com/blogname/ all files will still be located within the folder INSIDE the public_html, blogname or as in case in the picture /public_html/jvblog/.
The differences outlined above DO Matter as it defines WHERE you will have to upload the new WordPress files to update the core, but we will get to it in Step 3.
2. WordPress Files Unique To Your Blog
I have specifically outlined the files and folder for one Main Reason - those are the files You MUST BACKUP before doing upgrades and on at least a monthly bases. And let me provide some details on what each is and does going from the bottom…
1. wp-config.php
This is your configuration file that contains information your blog needs in order to connect to database. This is where you (or automated script) have defined database name, username and password of the user to access that database. If something happens to that file - you will get error that WordPress is unable to connect to database.
2. .htaccess file
Another very important file to your blog even if you didn’t change it manually. This file is responcible for allowing you create a nice URL structure in your blog via Permalinks and one that is REQUIRED to have proper information in it in order for the Permalinks to work.
- Good indication that something happened to your .htaccess file is if you get 404 Error when trying to click on Post Links.
- This is also true for bloggers who have previously had MS Frontpage extensions enabled on their domain and then decided to go with WordPress blog. Your host writes into that file in order to enable Front Page and WordPress generally fails to overwrite it, if it already exists.
If symptoms described above fit your problems - open .htaccess file for editing and make sure that following code is in it and add if not replacing everything else:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]# END WordPress
3. wp-content
This is perhaps The Most Important folder for Your Blog. All files unique to your blog are stored within that specific folder and backing this one up is what you should do on regular bases. And I’ll go into details on what is most common contents of that folder - it might be slightly different on your blog due to number of themes and plugins installed and images and files uploaded to it through your WordPress Editor:

- plugins - this is the folder where all your plugins are installed to. That includes plugins that come with WordPress by default, such as akismet and Hello Dolly (hello.php) and custom plugin, such as SK2 (Spam Karma 2). Depending on how the plugin was released you have to either install a single file directly into this folder (hello.php) or place a folder INSIDE the plugins folder (SK2). Either way it will work as long as you make sure you place the right files in right location. Usually you will find a README file with plugin you downloaded that explains exactly how you need to install it.
- themes - folder that contains 2 default themes (classic and default) and ANY of the custom themes you have installed. I’m not going to into deep details on this one as I plan to create another tutorial on it but for now I simply want you to know that this is where your theme is located.
- upload - folder that contains ALL your images and files uploaded using a Build In file manager when you write a post or a page. Generally separated by Year/Month. Failure to backup this file will lead to ALL links to images and files on your blog to be broken if you have to restore database without it.
3. WordPress Upgrade
The only reason I provide this explanation is because most of the people (including myself) always assume in their tutorial that everyone KNOWS THIS when in reality people come to using WordPress as publishing platform and don;t always have the same level of technical knowledge.
Looking on first image above you will see under Number 3 two arrows pointing…
- Top arrow displays the path of unzipped 2.3.3 file that will be used for upgrade of the blog. I have also highlighted it in the picture. Most common problem I have seen a few time is that people upload the wordpress folder to the root folder of their blog and upgrade fails because instead of OVERWRITING files needed for upgrade, a new folder simply uploaded.
- Bottom arrow point to the files and folders you HAVE TO UPLOAD to your blog to perform upgrade.
A quick point on this one…
I use Filezilla FTP client and it allows me to upload the entire structure of the the files that need to be upgraded and places them into correct location on my blog. Make sure that whatever FTP client you use does same, read documentation or simply switch to Free Filezilla 
I hope you find this post beneficial and to make sure you don’t miss other posts in the WordPress Guide Series, subscribe to my Full Text RSS Feed.
Article Series:
WordPress Guide
- WordPress Guide – Dissection Of File Structure
- WordPress Guide - Dissection Of WordPress Theme
- WordPress Guide - Customizing WordPress Theme Part 1
- WordPress Guide - Customizing WordPress Theme Part 2
- WordPress Guide - Customizing WordPress Theme Part 3
- WordPress Guide - Enhancing Image System
- WordPress Guide: Howto Force Your Blog Load Fast
- WordPress Guide - Installing Plugins And Themes
| 2.5 |
Related posts
If you like this post subscribe to Full Text RSS feed and read news at your leisure or get daily posts conveniently delivered to your inbox by Subscribing via Email (requires confirmation)
Technorati Tags: bloggers, guide posts, howto, howto-guides, installation path, root folder, tutorial, WordPress, wordpress guide






















You broke it down so simply even the PHP challenged such as I can understand it. Thanks!
Clara’s last blog post..Super Teas for Natural Skin Care
Sure thing Clara.
Alex
Thanks for the explanation, Alex. You made the inside story of Wordpress clear and easy to understand. I also will pay attention to backing up key components of my blog. It is easy to forget that this simple step could prevent a nightmare to all bloggers.
albert
Albert Grande’s last blog post..Rob Toth and The 2-Tier Traffic Affiliate Program
Hi Alex,
You are doing a great job.
Sometime back I had requested you to talk about installing wordpress and then customizing-editing the templates, using php, css and stuff to make a wordpress blog for Newbies and you did just that.
Your wordpress series is what I wanted and you are doing a great deal by helping us to do just that in a better manner.
People want to know what plugins, widgets, etc would be better to use and what themes would be better to use. What kind of themes they must use for their specific projects is of importance. Thanks
Ronak Shah.
Ronak,
I already have the answer to your last quesyion covered:
http://www.howtospoter.com/wordpress-web-20-guide
Alex
Alex,
another great article and I like the series so far.
One question though.
If I upload the newer version content file while upgrading won’t I overwrite changes and additions in the previous version.
Does it mean that you have to modify the new basic content file with the previous info to bring back the blog to what it was before upgrade?
Iam assuming other files are not affected
Hope I am making sense.
I await your answer.
Leon,
I assume you are talking about upgrading. Your content is stored in 2 locations:
1. All text content, config of plugins etc is in your database and are not affected when overwriting core files
2. Your uploaded images and files are stored in wp-content folder which will not be overwritten with upgrade unless your ftp client blindly overwrites entire folder. That is the reason I recommend Filezila - it works flawlessly.
Alex
Hi Alex,
Thank you so much for this post. It was very helpful to me as I am new to Wordpress and using http://FTP. Quick question: If I wanted to host 2 domains (both using wordpress) under the same hosting account, would I just need to create 2 separate folder structures? (i.e. jvblog and jvblog2, both with the same folder structure within?)
Jeff,
Absolutely! Each domain is in its own folder. Hostgator actually creates those for me when I add “Addon Domains”.
Thanks for posting this tutorial. You really are good at explaining this technical stuff. I really appreciate the help you offer in this blog.
I just don’t follow what I’m supposed to do to get this page inserted into my theme. If I change to another theme my “authors page” listings are gone.
Looking for how and where to insert my “Author Blogs Page” entry, into my theme. Had experienced a severe problem with updating to Ver 2.5, from Ver 2.3.3. After much frustration, finally got back into Ver 2.3.3. In the process of doing so , had lost the original PhoenixBlue/phoenixblue” theme” that showed “Author Blogs Page” when using the Theme Editor. No matter how or where I insert the “Author Blogs Page” file, just not getting it to show up like it used too.
,,,,,,,,,,,,,,,,,,,,,,,
(Theme Editor shows as:)
‘PhoenixBlue/phoenixblueb’ theme files
Stylesheet
Main Index Template
Page Template
Archives
Author Blogs Page ( this is the missing entry now )
Comments
Footer
Header
Search Results
searchform.php
Sidebar
Single Post
,,,,,,,,,,,,,,,,,,,,
Have tried many and various “insertings” into the Themes files shown above, but am unable to get the “Author Blogs Page” to show up the way it used to do. There must be a step by step method to accomplish it. But I’m lost on the “how to”. So how does one do it!
Would really appreciate the assist in learning how to get it done. Did manage to get the my blog listings to show, but want it to be like it was previously.
My blog is http://thetalker.org.
Talker’s last blog post..# 34 Talker on Visualization and Law of Attraction
Sorry, this is not something I will be able to help you with. You need a designer and perhaps a coder, better is one and same. I recommend you hire a pro if this is important to you.
Alex