How to Install and Activate a WordPress Theme
[This tutorial applies to WordPress blogs running in a self-hosted environment, meaning that you’ve installed WordPress on a web host of your own. It doesn’t apply to blogs hosted on free WordPress.com accounts.]
Installing a WordPress theme is very straightforward. WordPress themes available for download from various places on the Internet are typically packaged in .zip files (i.e. theme-name.zip). Installing a WordPress theme involves nothing more than unzipping the .zip file into the appropriate directory of your WordPress installation, and activating the theme from your WordPress administration console.
Structure of a WordPress Theme
In order for you to install your new WordPress theme correctly, you need to understand the basics of how the WordPress system interacts with themes. A WordPress theme needs three essential files in order to work correctly with the WordPress administration:
o An index.php file: This file is the controller of a WordPress blog. Most WordPress themes also have other PHP files that represent various sections of a WordPress page, but index.php is the only truly necessary PHP file.
o A style.css file: This file controls the look and layout of the WordPress-based website using style definitions. It also contains the information that is used in the Manage Themes section of WordPress to display the theme name, version, author, and description
o A “”screenshot”” image: This image is used to create preview of the corresponding theme in the Manage Themes section of the WordPress administration. It can be any of the common web graphics files (png, jpg, gif), but it needs to be named screenshot. For instance, screenshot.png, screenshot.jpg, or screenshot.gif.
If you’ve gotten your theme from a designer who knows what he’s doing, you don’t really need to worry about making sure the theme is set up correctly. If you’re not sure, you might just want to double-check that you’ve got the basic files needed to install your theme.
WordPress Directory Structure
The WordPress directory structure contains three folders in the root directory:
o wp-admino wp-contento wp-includes
Under the wp-content folder there is a folder called themes. Inside this folder is where you need to deposit the folder that contains your theme. Here’s an example. Say I’m installing a theme for a recipe blog. The theme is called Recipe, and its folder structure looks like this:
This theme would normally be packaged in a .zip file. To use the theme, I would need to unpackage the file, then upload it (probably using FTP) into my WordPress themes folder. If I have WordPress installed on my web server under a directory called blog, my directory structure would look like this:
Activating a WordPress Theme
After I upload the theme to the correct directory, I can now go to my WordPress administration to activate it. After logging in to the WordPress admin section, I go to Appearances->Themes. I can see that my new theme is installed correctly and ready to be activated, because I can see it in under Available Themes on the Manage Themes page.
At this point, all I have to do is click on the Activate link associated with my new theme. My new theme is now active on my WordPress blog.