Upgrading to WordPress 2.2.1


I have just upgraded our blog engine from WordPress 2.1.something to the latest 2.2.1 version. It was very straightforward.

First of all I backed up everything by:

  • Creating a tarball of the current site: tar zcf wordpress_dir_backup.tar.gz /.../blog_directory
  • Backing up the WordPress database: mysqldump -u dbuser -p dbname > wordpress_db_backup.dump.sql

After I verifying the backup was O.K. I then extracted the wordpress.2.2.1.zip archive straight over the top of the current installation. This retained our configuration files and custom theme. I also did a quick chown -R web_user:web_group blog_directory to ensure all the files were owned by the webserver. Then you point your browser at (in our case) http://www.theopensourcerer.com/wp-admin/upgrade.php to upgrade the database.

That was it. A quick check over and everything seemed to be fine.

Now, the main reason for wanting to upgrade was to be able to use “widgets“. But unfortunately our theme (a slightly modified version of the lovely blueflower-0.5) was not widget aware. However, after reading this for a few minutes, it was a very trivial task to make it so…

It turned out that simply by adding the following line of php to the functions.php file made our sidebar widgetised. (To actually edit the file use the “Presentation > Theme Editor” menu and select the functions.php file from the list on the right hand side. If your theme doesn’t have a functions.php file refer back to this page for details of how to make one.)

if ( function_exists('register_sidebar') )

I added this line after the initial comments but before the rest of the existing php code in the file. Now all the information in the left sidebar can be generated by the widget library. You configure the sidebar in the “Presentation > Widgets” screen of the admininstration system.

Hopefully this information will help someone else too.



  • Karl says:

    I like your theme a lot. I noticed that you are using a modified version of blueflower. I am using blueflower on my site http://www.gloriameredith.com/wordpress and have found it to look terrible on IE6. I checked your site on IE6, and it appears to have the same problem. The dark blue text background gets changed to a funky light grey that makes it hard to read the words. I normally use Firefox, so I didn’t notice the problem until today. By the way, your site looks really good in Firefox. Any thoughts on the IE6 issue?

  • Alan Lord says:

    Thanks for the reminder. I noticed this too, some time ago and then forgot about it.

    Being an Open Source proponent I wasn’t too bothered but if anyone has any suggestions as to how to fix the Blue Flower theme to work with IE6 then let me know!


  • Russ says:

    Just wanted to say thank you for the bit of code there – now I can keep the theme I want and just work at modifying it a bit more đŸ˜€

Leave a Reply

XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>