Upgrading to WordPress 2.5.1 and K2 RC6

Today I became a happier WordPress user because I managed to upgrade to WordPress 2.5.1 with a surprisingly easy process, as well as migrating to the latest K2 release. The short story: install the WordPress Automatic upgrade plugin, run it, correct failed actions, upgrade the K2, migrate footer from the previous K2, et voilà! I am very impressed with the new admin interface of WordPress. It took a few minutes to understand where is what, but WOW! Neat, organized, and pleasant.

When first tried to upgrade my WordPress installation, I wasn’t really sure how I would go about it. According to the WordPress upgrade guide, the process consists of five simple steps:

  1. Backup Current Installation. Sounds pretty simple, but backing up from a hosted server, although not complicated, is not that simple either. You need to backup all your files and you need to backup all the database tables. God forbid you have more than just the WordPress installation using the same database. Trying to go through all the tables and deciding which belong to WP and which belong to other applications is unpleasant at best.
  2. Deactivate Plugins. No complaints here. Fairly simple.
  3. Download Latest WordPress. Granted, there is nothing simpler to do, save for scratching your head.
  4. Replace WordPress Files. I have a few custom plugins, custom themes, and some other modes. How do you replace only what needs to be replaced but not the other files? The naive way is to do it one file at a time. You can try doing it in a batch as in copy-and-pray. Actually that won’t work because you need to be careful not replace your wp-config.php file. Further, you need to copy the contents of the wp-content folder from your previous installation, but not the entire folder. This step is what kept me from upgrading earlier – too many things could go wrong. After replacing all the files, you need to visit the upgrade page so the database schema can be changed to the new one.
  5. Reactivate Plugins. You have to reactivate your plugins one at a time. There are no “plugin profiles” in WordPress, which would’ve allowed you to enable and disable plugins in groups.

In a an article mentioned in a recent Search Engine Guide newsletter, I read about this super useful almost working plugin called WordPress Automatic upgrade. It does what it says. I chose the semi-automatic method where I clicked “next” after every step to make sure all went smoothly. And it did, except for the last step. The plugin failed to re-enable the previously active plugins. A small incovenience compared to all the other things that went right: created backup, disabled plugins, downloaded latest WordPress, replaced all the right files and kept what should be kept.

Unfortunately, the copy of the K2 theme that I had was incompatible with WordPress 2.5. Particularly, the panel manager of K2 didn’t show up in the admin section. After a bit of poking around, I downloaded K2 candidate release 6 which worked like a charm after some minor tweaks. In the process, I learned a bit more about actions, created a new plugin to customize my K2 TAA theme, and made use of K2’s action hooks to add a custom footer. My next K2 upgrade – fingers crossed – will not require changing any of the K2 code.

The code of my K2 TAA Theme plugin is reproduce below. Feel free to use it as a basis for build your own customizations for K2 and other WordPress actions.


/**
* Plugin Name: K2 TAA Theme
* Plugin URI: http://tony.abou-assaleh.net
* Description: Support functions for the K2 TAA Theme
* Author: Tony Abou-Assaleh
* Author URI: http://tony.abou-assaleh.net
* Version: 1.0
*/
function k2_taa_footer () {
?>
<p>
Copyright © 1997-2008 Tony Abou-Assaleh, Halifax, Nova Scotia, Canada.<br />
Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice, and the copyright notice, are preserved.
</p>
<?php
} // k2_taa_footer

// Action calls for all functions
add_action('template_footer','k2_taa_footer');

?>

2 thoughts on “Upgrading to WordPress 2.5.1 and K2 RC6

Leave a Reply

Your email address will not be published. Required fields are marked *