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.