January 5, 2006

WordPress 2.0 is better than ever

Author: Joe 'Zonker' Brockmeier

WordPress 2.0 is out, and it brings a slew of improvements and new features, including WYSIWYG editing, user roles, easy database backups, and more. The WordPress home page describes the software as "state-of-the-art semantic personal publishing platform," but when you boil it down, WordPress is just damn good blogging software. WordPress is written in PHP, requires a MySQL database, and is available under the GPL. It's easy to use and fairly powerful.

Installation and upgrades are very easy. The install hasn't changed significantly with WordPress 2.0, so if you're familiar with the install process, you won't have any problems with the new version. Installation basically consists of getting the package, creating a MySQL database, creating the config file, and running the install script.

Upgrades are even easier. Be sure to back up your existing install, uncompress the 2.0 package, copy over your old wp-config.php file, and run the upgrade.php script. You'll also want to copy over existing themes and other content from the wp-content directory. That's all there is to it. I've upgraded two blogs, both with more than two years' worth of posts and comments, and I haven't run into any glitches.

Better editing and administration

Posting features are the heart and soul of a blogging tool. If it's not easy to post to your blog, you probably won't want to use the software, and you'll end up neglecting your blog and negating the whole point of having one in the first place. I've been happy with WordPress in the past, but the 2.0 release includes a number of improvements that make it even easier to keep a blog updated and make management a little more fun.

The WordPress developers have been bitten by the AJAX bug, and that means that a lot of administrative operations no longer require a page refresh to take effect. For example, if you delete a category, you don't have to wait for the page to redraw itself. You can rearrange some administrative page elements by dragging and dropping them to create a layout that better suits your needs.

TinyMCE editor in WordPress - click to enlarge

There are a few things that aren't quite perfect, though. For example, the links management page allows you to perform some operations on multiple links, such as assigning their ownership to a specific user, or toggling the visibility of those links, but it doesn't allow you to delete more than one link at a time. When I installed 2.0, I decided to clean out some of the blogroll on my Dissociated Press site, to get rid of pages I no longer visit regularly or that have succumbed to link rot. This turned out to be a bit of a hassle, because I was only able to delete one link at a time.

Editing and posting has improved greatly in this release. WordPress 2.0 integrates the TinyMCE JavaScript editor, which brings WYSIWYG editing to WordPress.

The TinyMCE editor includes a fairly sparse toolbar with the basics -- bold, italics, strikethrough, indent/blockquote, undo/redo, and so forth. My favorite feature, hands down, is the ability to resize the text area on the fly. If you've ever written a really long post using a standard text area window inside a browser, you know what a pain that can be, so the ability to resize the text area is really welcome.

Note that you can still edit the HTML directly if you want to. The TinyMCE editor includes a source code editor, which may come in handy if you want to use elements that aren't part of the default toolbar, or if you just feel like massaging the code directly.

The TinyMCE editor is not completely supported in all browsers. The WordPress team notes that Safari and some versions of Opera, for example, don't support all of the necessary features for WYSIWYG editing. Firefox users should be fine, but TinyMCE didn't work with Konqueror or the latest version of Opera in my tests. If your browser of choice doesn't support the TinyMCE editor, WordPress will default to the standard editor. It's also possible to turn off TinyMCE under your user profile, if you just happen to prefer doing your own HTML.

TinyMCE also prevents you from accidentally discarding a post. If you try to navigate away from the editing page by clicking one of the administration links in the WordPress page, or by hitting Back or closing the current browser window, TinyMCE prompts you to be sure you really meant to leave a post unsaved.

The only thing I don't like about TinyMCE, so far, is that it's weird about the way it handles adding links to posts, which is a bit of a pain since every post that I write tends to include at least two or three links. Instead of being able to click the link button and add the information for the link, you have to highlight some text and then add the information, and then click the end link button. Yet when all is said and done, it's still more effort than just typing out the HTML.

WordPress now makes it much easier to add images or files to posts. In the past, you'd have to upload images through one interface, and then copy the URL to your post in another page. This was a bit of a pain if you wanted to add three or four images to a post. It's a lot easier to add images now.

WordPress post preview - click to enlarge

WordPress automagically generates thumbnails that are linked to an image when you upload it, which is pretty handy, and it takes just one click of a button to add an image to a post. Once you've added images, you can drag and drop them anywhere in the post when using TinyMCE.

In addition to the WYSIWYG editor, WordPress now offers a Post Preview feature that displays exactly what the post will look like on your blog -- complete with the blog's theme. Each time you save the draft, the preview is updated.

User roles

This release revamps the user system, and that's a Good Thing. In the past, WordPress allows you to assign a user level from 0 to 10 to define a user's capabilities. This wasn't particularly intuitive. WordPress 2 comes with five different roles available to users, from a basic read-only role (subscriber) to the administrator role.

The contributor role allows users to contribute to the blog, but doesn't actually allow them to publish the post, so their contributions can be reviewed prior to publishing. The author role allows a user to post and publish content, but they can't edit or manage posts for anyone else. Above that is the editor role, which is restricted from administrative functions (such as managing users) but can post, publish, and manage others' posts.

Overall, the roles are useful for anyone publishing a site with multiple users.

Performance tweaks

The WordPress developers have also done significant work on the back end to speed up WordPress. While I was testing WordPress 2.0, I moved one of my blogs to 2.0, and left the other blog running on the 1.5.2 release of WordPress -- both running on the same server. I found a clear difference in speed between WordPress 2.0 and the older WordPress release. The administrative interface is clearly faster than previous releases. The new release also includes some caching and performance tweaks that make WordPress faster for readers as well.

Next: Themes, plugins, and more

One of the things I like best about WordPress is how easy it is to change the look and feel of the blog using themes, and the ability to add functionality via plugins. The default WordPress theme is a bit dull, but I don't really care to spend hours bit-twiddling trying to come up with a suitable design.

Luckily for me, and other users, WordPress has an active developer community. You can easily find hundreds of attractive themes that are suitable for use as-is, or with a few minor tweaks. Installing a theme or plugin is usually as easy as grabbing the zip file or tarball and uncompressing it in the wp-content directory.

If you're already using WordPress, and have installed plugins or themes, you might check to be sure that the themes and plugins work properly with WordPress 2.0 before you upgrade. I use SemioLogic CMS, which includes a few plugins and themes for WordPress to make it more of a content management system. Denis de Bernardy, its author, noted that WordPress 2.0 didn't play well with some of the existing plugins -- which is to be expected, since it's a major redesign.

My experience with existing themes has been positive -- a lot of the themes designed for WordPress 1.5 have worked flawlessly with WordPress 2.0. The only issue I've found so far with any of the themes I like is that they lack a thumbnail to preview the theme before enabling it -- but the themes themselves work perfectly.

Easy backups

One of the plugins included with WordPress 2.0 is the WordPress Database Backup plugin. Prior to 2.0, users would need to dump the database periodically to have backups. This isn't particularly hard, but it's probably a bit intimidating for a lot of users, and therefore something they're likely to put off, leading to disaster down the road when something bad happens to the database and the user doesn't have a backup.

WordPress backup plugin - click to enlarge

This plugin turns backing up the database into a one-click operation. Once it's enabled, just go to the backup page in the administration interface, click the backup button, and wait for it to finish. Users have the option of downloading the file, saving it on the server, or sending it to the email address of their choice. It's about as easy as it could be.

The backup plugin isn't perfect. First of all, there's no way to restore a backup from the administration interface, so if your WordPress database goes south for some reason, you'll still be typing a few MySQL commands to revive your blog. All things considered, this isn't so bad, since you should be creating backups much more regularly than restoring from backups.

It's also a manual process, so backups still depend on an administrator remembering to create them at regular intervals. It would be great if you could schedule backups to run on a nightly basis rather than having to do it manually. But this plugin makes it far easier to run backups, making it more likely that users will do backups more often, so it's still a great feature even without the ability to schedule backups.

Finally, it's worth noting that the plugin backs up only the database. This means that things like themes, images, and anything else that exists outside the database are not backed up. Make sure to back up the wp-content directory from time to time, or you might lose some valuable data even if you make regular use of the backup plugin.

Killing comment spam

If anything threatens to take the fun out of blogging, it's comment spam. I know a few bloggers who have simply given up the fight and turned off comments on their blogs due to overwhelming amounts of comment spam. I've left comments turned on, but I've had to fuss with installing "completely automated public Turing test to tell computers and humans apart" (CAPTCHA) plugins for WordPress, and the assorted graphics libraries to get them to work on my server.

WordPress 2.0 includes the Akismet anti-spam plugin, which takes care of the comment spam problem nicely. After running it for a few weeks, I've caught more than 150 spam comments. None of the comments tagged as spam turned out to be false positives, and it hasn't missed any comment spam either.

I'm very happy with Akismet, particularly since it has allowed me to get rid of the CAPTCHA test, which is pretty annoying if you are leaving legitimate comments.

The one drawback to Akismet is that you have to have a WordPress.com API Key, which means you have to set up a WordPress.com account -- even if you don't plan to use the service. It's free, but it seems silly to set up an account through WordPress.com if you never use it again. However, getting rid of comment spam is easily worth the two minutes or so it takes to set up an account.

Converting from other blogging tools

If you're moving from earlier versions of WordPress to WordPress 2.0, or if you're just starting your blog, it's easy to get going with WordPress 2.0. On the other hand, if you're using a different publishing platform, then it can be a bit of a hassle to convert to a new tool.

However, WordPress 2.0 does provide a few tools to import entries from other tools. Specifically, WordPress has import tools for Textpattern, Blogger, Movable Type, and RSS feeds. I tested the RSS feed import, and it worked fine -- though it may be a bit difficult to generate an RSS file containing all posts from other blogging tools.

Try it out

There are two easy ways to try out WordPress for yourself. If you have a hosting account, or a server with Apache, MySQL, and PHP, you can simply install WordPress 2 and take it for a spin on your own. If you don't have access to a server, or if you just don't feel like messing with even a simple installation, sign up for a freebie account on WordPress.com. This will give you the API Key needed to use Akismet anyway, so it's worth setting up a test account if you're curious about WordPress.

Overall, WordPress 2.0 is a solid "personal publishing" platform, with plenty of extras and the flexibility to add just about any feature most users would want. I've been using WordPress since the 1.0 days, and it's come a very long way in that time. I'd strongly recommend it to anyone who wants to publish their weblog for business or pleasure.

Purpose Personal publishing platform
Distributor WordPress Project
Requirements: Requirements are PHP 4.2 or greater, and MySQL 3.23.23 or greater.
License Available under the GNU General Public License
Market People who want to run their own weblogs
Price (retail) Free
Product Web site WordPress.org
Click Here!