Upgrade 1.2 to 1.5
This article, written to accord with WordPress 1.5, is now obsolete. Please take caution when following its contents, as many things may have changed.
WordPress v1.5 has been available since April. If you are upgrading from a previous version, these simple steps will help you upgrade to the newer version in no time.
Reasons for Upgrading
There are many reasons for upgrading any software. Generally, they are the fact that the software has been improved and security issues have been addressed. Here are some specific reasons for WordPress users:
- Improved Features
- The WordPress interface and functions have not only been improved, they've been expanded. There is a list of new WordPress Features, and in summary, the program is faster, cleaner, easier to use, and more powerful.
- Template Driven Design
- WordPress uses templates to generate the pages dynamically. You can control the presentation of content by editing the templates using the Template Editor tool and the Template Tags.
- Quick Design and Layout Changes
- There are hundreds of WordPress Themes to choose from and changing the look of your site is easier and faster than ever before.
- Comment Spam Filters and Protection
- Comment spam filtering comes built in, catching most of the comment spammers before you see their posts in your comments.
- Extensive Plugins
- There are hundreds of new and improved Plugins which will easily extend the functionality and power of your website. Creating plugins is easier than ever, too.
Before You Start
Before proceeding, backup your database, WordPress files, and your entire site.
- Begin by backing up your entire site and WordPress files and your database.
- Store your backups off-site, like on your hard drive.
- Disable all active plugins. In the Administration > Plugins panel, click Deactivate on each plugin. You can re-enable them after you're done upgrading.
Begin the Upgrade
- Download the new version of WordPress to your hard drive and unzip it to a new folder. (nb: version 1.5 can be found here in the archive).
- Delete the old WordPress files from your web host, except wp-config.php.
- Upload the new WordPress files.
- Replace your old index.php with the new index.php icluded in the download. (You can turn your old index into a theme following instructions below, so don't delete it entirely.) **Remember to adjust the path for wp-blog-header.php if your index page lives in a different directory than your wordpress installation.
- From your browser, type http://example.com/wp-admin/upgrade.php, using the file path to your WordPress wp-admin directory, to bring your database up to date.
- Immediately login to wp-admin. Select "options" then "Permalinks" from the menu. Click the "Update Permalink Structure" button, you shouldn't have to do anything else.
You should have a new WordPress 1.5 installation with the default template applied to your website. Don't worry, you can change this in a minute. First, reward yourself with a cold soda and some candy. If you want to adapt your old template to our new space-age system, continue on...
Check The New WordPress
Before you begin to fiddle with your new WordPress upgrade, take few minutes to test drive it. There have been some changes. For a simple test drive, the article First Steps With WordPress points out many of the new changes to the Administration Panels and the way your site works.
WordPress Presentation Panel
Begin by poking around the Administration Panels
. You are now greeted with a Dashboard
which lists your latest activity and news from around the WordPress Community
. Keep exploring and you will find Write Page
and Manage Page
panels that handle the new WordPress Pages
, allowing you to add content that is outside of The Loop
like "Contact", "Sign up", "About", and "Resume".
On the Presentation panel, you will now see a list of Themes. There should be two. Click View Site and you will see the new look of your site. Click the back button and then select the other Theme. Click View Site again and you will see that the look of your site has completely changed.
Default Theme Single Post View
Change it back to the Default Theme, then click View Site
and take a wander around your new site. Click the various links and see how the look and information changes the way it is displayed. With the Default Theme, there are two main looks. One for the non-single post pages like the front page, categories, archives, and searches, and other one for the single-post pages. The sidebar is gone. The new modular Themes allow you to customize the look of a variety of pages within your site.
When you are ready to really change the look of your site, or convert it to match your previous look, proceed on.
New Template System
A few things have changed in the way templates work in 1.5, most notably the addition of themes which make developing your site templates infinitely easier.
The first thing you will notice is the template files don't live in the root directory any more, they're in wp-content/themes so go there now.
You should see at least two folders there, default and classic. Each folder now holds a complete WordPress Theme. Classic is the old WordPress style converted into a theme. Default is an adaptation of Kubrick. Poking around these themes, especially "classic" if you were familiar with our old template, will be the best way to learn how themes work.
Upgrading Old Templates - Easy
To turn your old template into a theme :
- Create a directory for your Theme in wp-content/themes such as wp-content/themes/mytheme/, all lowercase and one word.
- Put your old index.php in the theme directory you just created
- Using a text editor, open it up to edit
- Delete the wp-blog-header.php line at the top that says not to delete :)
- Replace the following line: (or a similar CSS link)
<?php echo get_settings('siteurl'); ?>/wp-layout.css
<?php bloginfo('stylesheet_url'); ?>
- Replace this:
<?php include(ABSPATH . 'wp-comments.php'); ?>
<?php comments_template(); ?>
- Copy your old stylesheet to your theme directory and name it style.css
- Open style.css and add the following header (copy and paste this and then customize it):
Theme Name: My Hawt Blog
Theme URI: http://example.com/
Description: Best theme EVAR
Author URI: http://example.com/
- Go to the Presentation tab of the admin interface
- If you see your Theme on the list, activate it. If you don't review these instructions to make sure you did them all right.
Upgrading Old Templates - Advanced
Depending upon how customized your old WordPress site was, the process of modifying your old WordPress layout and design may be simple or complex. There are basically three methods: Working from your old site files, designing from scratch or redesigning an existing WordPress Theme.
We recommend the latter if you are not very experienced with CSS and HTML/XHTML. To design your Theme from scratch, you will find more indepth information on how to modify the layout elements in Themes and customize your Theme at Theme Development. If you are determined to use your old site files, here are the instructions.
To modify an existing Theme, follow these step-by-step instructions.
Open your index.php in your text editor.
Comment out the wp-blog-header require line at the top of index.php. Do this by putting // at the start of each line.
- Copy the following files from the Classic or Default WordPress Theme into a new folder:
//* Don't remove this line. */
Update the stylesheet import line in index.php. Replace this:
@import url( <?php echo get_settings('siteurl'); ?>/wp-layout.css );
@import url( <?php bloginfo('stylesheet_url'); ?> );
If you use the Default Theme, you will have a line like this:
<link rel="stylesheet" href="<?php echo get_settings('siteurl'); ?>/wp-layout.css" type="text/css" media="screen" />
You must change that to this:
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
Update the wp-comments include line in index.php. Replace this:
<?php include(ABSPATH . 'wp-comments.php'); ?>
<?php comments_template(); ?>
Now save index.php
Rename wp-comments.php to comments.php
Open wp-comments-popup.php. Find this line at the top :
You must comment out that line like this:
// require ('wp-blog-header.php');
The top of your wp-comments-popup.php must look like this:
/* Don't remove these lines. */
$blog = 1;
Save the file.
Rename wp-comments-popup.php as comments-popup.php.
Add a theme header to wp-layout.css that looks something like this (you can just copy and paste this for now):
Theme Name: My Original Layout
Theme URI: http://myblog.com/
Description: Your theme
Author URI: http://myblog.com/
Now rename wp-layout.css to style.css.
You should now have 4 or 5 files:
Now create a folder with the name of the theme (for example, carrots) and put the first four files there into that folder (and searchform.php if you use the Default Theme).
FTP this carrots folder into the wp-content/themes/ folder. You should already have a classic folder and a default folder inside there.
Set the active theme to this theme you have created by selecting it in the Presentation Panel.
- IF you use the Default Theme, you will have 5 files - searchform.php