alex sysoef
Get weekly Blogging eZine plus Free, INSTANT access to "Profitable Blogging For Newbies" ($17 Value)

11284Blog Subscribers
15624Twitter Followers
expert wordpress

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

wp-files1.gif

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)

  1. 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.
  2. 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:

wordpress-guide-wp-content.gif

  • 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 Cool

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.

Series NavigationWordPress Guide – Dissection Of WordPress Theme»

Like This Post? Share It!

  • StumbleUpon
  • Digg
  • Google Bookmarks
  • del.icio.us
  • Mixx
  • MisterWong
  • Reddit
  • Sphinn
  • Propeller
  • Technorati
  • Facebook
  • E-mail this story to a friend!
Tags: , , , , , , , ,
Technorati: bloggers, guide posts, howto, howto-guides, installation path, root folder, tutorial, wordpress, wordpress guide,

27 Responses to “WordPress Guide – Dissection Of File Structure”

  1. Clara (1 comments.) says:

    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

  2. Albert Grande (2 comments.) says:

    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

  3. Ronak Shah (1 comments.) says:

    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.

  4. Leon says:

    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.

    • TheSpot-er (971 comments.) says:

      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

  5. Jeff says:

    Hi Alex,

    Thank you so much for this post. It was very helpful to me as I am new to Wordpress and using 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?)

  6. Jason Pearson (6 comments.) says:

    Thanks for posting this tutorial. You really are good at explaining this technical stuff. I really appreciate the help you offer in this blog.

  7. Talker (1 comments.) says:

    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

    • TheSpot-er (971 comments.) says:

      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

  8. Stefano (1 comments.) says:

    Thanks so much for this useful tutorial, it is clear and easy to understand…. !!! It was very helpful to me as I am new to Wordpress…
    I also subscribe to your RSS Feed because I really appreciate the help you offer in this blog….

    Stefano

  9. Talker (1 comments.) says:

    Hi Alex,

    You stated:
    “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”

    How true the message. WordPress is a neat program. I am finally getting to know “HOW”, to get along with it. The learning curve involved, is steep, if one does more than simple blogging. That tweaking that one wants to apply, but has no idea of how to do it. This is where I am with WordPress. Was ready to just go back to Blogger. You are a valuable source of WP know how. Thank you. As I “find” the missing (to me) know how, I get back to my site and apply the new information. Sweet taste of success, step by step. My WP blog, is still very crude, and in need of finer tweaks, and am looking forward to reading and applying what you have so clearly said and posted here. It is frustrating to be on that learning curve getting WP tuned up, when all I want is to do, is actual posting, not spending hour after hour of “trying this and that” to get what is desired as the final “look” to the site.
    Thank You
    Be Well
    Talker
    http://www.thetalker.org/

    Talkers last blog post..#127 Talkers Thoughts on St.John’s Wort Study on ADHD

  10. MOin (15 comments.) says:

    Very brief and understandable article i really enjoyed reading even i had idea how WP file structure works. You also covered the importance of wp-content i thought you’ll also share some .htaccess command to protect it from snoring and phreaking. perhaps some other time you’ll do it :)

  11. Steve (1 comments.) says:

    Thanks great information.

    Steve

    Steves last blog post..Entrecard is for sale!! Check this out!!

  12. Ryan Martin (1 comments.) says:

    This post has been a great resource for me. I can honestly say that upgrading my Wordpress blogs is one of my least favorite activities. Seriously, I would rather clean someone’s bathroom than upgrade. I am always afraid that I will lose my content.

  13. Sunil Pathak (5 comments.) says:

    An excellent resources for wordpress publisher, you have covered every bit of wordpress in this one post with brilliance. kudos to you mate. if there is batter way to explain this i cant image how.

    Sunil Pathaks last blog post..Are you Slow Poisoning Your Blog?

  14. Ashish bobade (1 comments.) says:

    Hi,
    I am facing one issue regarding saving posting and publishing new post.I have changed some files and folder permissions..Due to which I am not able to post new articles..
    Any Idea in which folder post are saved and which permissions to modify?

    • TheSpotter (393 comments.) says:

      Posts and Pages are stored within database and the only way you could impact your posting ability is by modifying permissions to core files which you shouldn’t have touched. I can’t help you here – sorry. I can only recommend restoring your previous permissions.

  15. paolo says:

    can i ask you something?i have a very good blogger blog with a lot of posts.i would like to pass it on Wordpress.How can i do to do not be penalized for duplicate content and import the blog in wordpress to keep ahead with that?
    Thx
    Paul

    • TheSpotter (393 comments.) says:

      Paolo,

      I’m no expert on that part as I don’t deal with blogger enough. There are tons of tutorials on topic, just Google it. Sorry, don’t want to mislead you

Trackbacks/Pingbacks

  1. WordPress Guide – Dissection Of File Structure…

    WordPress Guide – Dissection Of File Structure is a first in a Series requested by many of my customers and subscribers and dedicated to teaching the basics of the WordPress in visual and down to earth format.

    There will be no geek speak here just t…

  2. [...] has written a  great article where he dissects wordpress file structure. A must read if you like to see what’s behind the wordpress [...]

Leave a Reply

Comment Guidelines: After 3 approved comments - all your links become DoFollow links (controlled by LuciaLinkyLove). No Keywords In Name. No inappropriate or offensive comments. No links to inappropriate or offensive sites. Comments must contribute to the discussion. ALL SPAM DELETED!

Comments Manually Approved prior to appearing!

CommentLuv Enabled