Upgrading WordPress in One Minute from 1.5.2 to 2.2

I was on WordPress 1.5.2 for a long time, but Matt recommended moving to the latest 2.x, so today was upgrade day.

The official WordPress upgrade notes are both verbose and unclear, so I’ll relate my upgrade experience and provide some commands to do it.

Step 1: I use MySQL replication, so data backup for me was just a stop slave; on the slave.

Step 2: Login to WordPress and disable any plugins.

I use Apache with PHP4 and APC cache, so I had to stop apache to avoid a stale cache when updating files.

Step 3: I use a customized default theme, so then just ran a few linux commands as root to install:

wget http://wordpress.org/latest.tar.gz

mv wordpress wordpress-old

chmod 700 wordpress-old

tar zxvf latest.tar.gz

cp -p wordpress/wp-config.php wordpress/wp-config.bak.php

cp -p wordpress-old/wp-config.php wordpress

cp -p wordpress/wp-content/themes/default/sidebar.php wordpress/wp-content/themes/default/sidebar.bak.php

cp -p wordpress/wp-content/themes/default/footer.php wordpress/wp-content/themes/default/footer.bak.php

cp -p wordpress-old/wp-content/themes/default/sidebar.php wordpress/wp-content/themes/default/sidebar.php

cp -p wordpress-old/wp-content/themes/default/footer.php wordpress/wp-content/themes/default/footer.php

Inspect your wordpress-old/wp-content and wordpress-old/images directories for any files you may still need to copy over.

Then start apache and try to load your blog.

Step 4: If your blog looks mostly ok, run the upgrade.php script on your server, something like:
http://yourdomain.com/wordpress/wp-admin/upgrade.php

If you get errors when running upgrade.php about language_attributes(), add this at line 8:
require_once(ABSPATH . ‘/wp-includes/general-template.php’);
and stop and restart apache if you use a PHP cache.

Step 5: Login to WordPress and activate any plug-ins.

When everything looked normal, I resumed replication on the MySQL slave: start slave;

WordPress 2.2 seems kind of ajaxy – autosave while editing posts, etc.

Please send me your feedback.

Update 2007-06-08: Definitely enable the akismet spam filter included with 2.2. I’m getting 1,000 comment spams per day now, and akismet rarely lets one through.

Daily Pundit: Speaking of (Comment Spam) Zombies…

This entry was posted in Open Source, Tech. Bookmark the permalink.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>