WordPress FAQ: What is the best way to upgrade a WordPress 1.5 blog to WordPress 2.1?

Okay… my personal Blog (the one the leaf has been removed from) is an older version of WP (waaaaaay back to 1.5 something) and has been seriously re-designed by Khaled Abou Alfa from 9rules (a dam* good man btw).

I would love to upgrade it to a current version but there is where I lose all touch ‘cuz I ain’t a tecchie like you

I have not the first idea where to begin and honestly am scared silly about screwin’ up the re-design.

This question comes from reader Mark Wade.

Setup a local Version of your Blog

Mark, I’m not sure of what your template uses but chances are, it is already WordPress 2.1 compliant. What I’d suggest doing is setting up a local version of your blog. If you’re using Mac, then you have an out-of-the-box web server already configured with PHP and MySQL. You would just have to setup a database and import your posts/comments/categories to give you actual content using the methods I described in a previous series entry. If you’re on Windows, you might have to employ Kevin Yank’s instructions on setting up Apache, MySQL and PHP locally. It’s not too complex and I generally advise people who do their own mucking around to do this anyway for testing before rolling something to a live blog.

However, you can risk it and try the upgrade first anyway. The problem is, you can’t roll back if you mess something up.

Upgrade Incrementally

Having followed this procedure on your test blog (you did take my advice right? ;-) ), I recommend an upgrade from such an earlier version be done incrementally. That is version 1.5 to 2.0, then version 2.0 to 2.1. In theory, the upgrade can be done directly, but I know of at least one upgrade that got completely borked by making the Big Jump™.

You can download a release version of WP 2.0.x from the build archive. Choose whichever non-RC version you want.

Having done that, the recommended process is to delete everything except wp-config.php (which contains your database connection info and hasn’t changed in several versions) and the wp-content folder which includes your theme and plugins. Upload all the files in the extracted wordpress folder to your blog root. Also upload the wp-admin and wp-includes folder.

Now run the upgrade script to make the modifications to your database. The upgrade script is at wp-admin/upgrade.php. Alternatively, you can attempt to login to your wordpress admin and it will provide a link to upgrade your blog.

Now that you’re upgraded to 2.0, go through and check the functionality of all of your plugins. If anything is broke, go find an upgrade. In fact, I’d check for upgrades anyways in case there have been security fixes. A lot of plugins broke between WP 1.5 and 2.0 and plugin authors have usually provided 2.0 compatible plugins.

If everything checks out, repeat the procedure to bring your blog up to WordPress 2.1.x. The latest is 2.1.3. Again, check your plugins.

In theory, unless your template is relying on deprecated template tags available in previous versions of WP, your theme should remain intact. In general, WP development attempts to preserve backwards compatibility but some functions get removed after being deprecated for several releases. Again, just check. And if you didn’t take my advice about a local version of your blog, shame on you. ;)

A final option you have is to hire me and I’ll take care of the upgrade for you.

As usual, reader questions are being solicited. Drop me an email about any WP question you have at all! :-)

WordPress FAQ: User Roles Confusion

I’ve seen the roles list in the User page. But what’s the difference between an Author and a Contributor?

There are five built in roles in WP2.0+. These roles, Administrator, Editor, Author, Contributor and Subscriber compartmentalize most of the groups of functionality in WordPress.

Naturally, Administrators can do everything. If you own a multi-author blog, chances are you want to be the admin and assign everyone else lower permissions. Administrators have appropriate permissions to change themes, activate/disactivate plugins, set global blog options, etc.

Editors, assume post-level management. As in a newsroom, editors don’t worry about the lights and the cameras. They are worried about the copy. To that end, editors have the right to manage post-related stuff. They can add their own, edit their own or delete their own – but more than that, they can edit or delete other peoples posts.

For authors, the assumption is that they are staff writers and are allowed to write whatever they want, whenever they want. Not only can they write stories, but they have the authority to publish them without review as well.

Contributors tends to work well on blogs where user generated content is welcome. People can submit their own stories but in the end, they cannot publish without an Editor. Editors or Administrators have the ability to go review the Contributor’s work and decide whether to publish or not.

Subscribers have no blog-level abilities. The benefit to subscribers is that, among other things, they can prepopulate the comment forms on the blog. Some blogs also require registration to comment. Subscribers are readers with a username and password – that’s it. No more. No less.

A word about User Levels

Some older plugins continue to use User Levels to handle permissions. User LEvels is a legacy item from the WordPress <1.5 days. It has been deprecated which means that while it is still in the core, the realism is we are two majore releases beyond 1.5 and User Levels will not be around forever. It is simply maintained for backwards compatibility. Anytime User Levels is mentioned in regards to WP, your warning flags should go up.

Of course, there is a fantastic plugin out there that allows a blog owner to modify existing roles and capabilities or even add other roles and capabilities. If the five solutions out of the box don’t quite work for you, you can change it up.

For more information on Roles and Capabilities, you might want to take a stroll through the Codex page.

WordPress FAQ: How do I Move my blog to a new host?

What is the process for moving my WordPress blog to another host?

As the technology manager at b5media, my team is often asked to migrate a blog to our cluster. Usually, when that happens, I ask a bunch of relevant questions:

  1. Is the blog a WordPress blog? If not, what platform is it?
  2. Are we going to continue to use the same domain or do we want to use a new or existing one?
  3. Are we merging this blog with an existing blog?
  4. Is it important to preserve permalinks?
  5. If this is a WordPress blog, what version of WordPress is being used?
  6. How many authors?

Lots of relevant information is needed to migrate a blog. This question is about moving a WordPress blog so we’ll assume that it’s not a Movable Type, Typepad, Blogger or Expression engine blog. Or any other platform for that matter. WordPress.com counts as a “WordPress” blog though. ;-)

Solution 1: Quick Move

The easiest way to move from one blog to another, particularly if you’re moving the blog to a new domain and both already resolve (talk to your registrar or host to get help with DNS resolution) then you can move your categories, posts and comments using WordPress’ export functionality. This is native in WP 2.1, however, you can achieve nearly the same thing with my WordPress-to-WordPress importer. Having the WXR file, as it is called, in hand you can import into WordPress 2.1 at the new location.

The sacrifice you give up in preservation of options. You’ll have to go in and set your permalink structure, your blog name, description, number of posts to display and any other options. You will have to upload and activate plugins, etc. This is a content migration solution only.

Incidentally, this is the only way to move off of WordPress.com and the only way to merge a blog into another one – say if you were retiring it.

Solution 2: Full Move

If the quick way doesn’t provide satisfactory results, you can do the full way. I always recommend doing whatever you can by SSH, but some hosts won’t allow for that and some folks are simply scared stupid of command line. Is text really that scary? :)

1. First of all, back up your database. You can do this via phpMyAdmin. I would not recommend the formerly-bundled wp-db-backup plugin for a number of reasons that ultimately end in the reason why it is no longer a bundled plugin. If you’re using SSH, you’ll want to use the



mysqldump -uUSER -p DBNAME &gt; dump.sql

2. Now, grab your files. Most people choose FTP for this, but again, if you can use SSH to create an archive file of your data, do it for reliability reasons. Make sure you grab your .htaccess and database dump as well.

tar cvf archive.tar path/to/blog/dir path/to/dump.sql

The compress it:

gzip archive.tar

This will create a file called


that you can grab via SFTP or FTP and transfer to your new server.

3. On the new server, you have to restore everything back in to place. First, make sure you have a database setup for your blog on your new server. If you just used FTP to grab all your stuff, ignore the next bit. If you tarred your archive and database dump, I’d recommend untarring in a temporary location.

tar zxvf archive.tar.gz

Now, whether you used FTP or SSH, you can move your data files into the proper location and run a:

mysql -uUSER -p NEWDBNAME &lt; dump.sql

With any luck, once your DNS is pointed at the new server and begins to resolve, your blog will be perfectly moved.