March 20, 2008

Drupal 6 keeps getting better

Author: Susan Linton

Drupal is a modular content management system. It allows a user or group of users to construct Web sites, blogs, or forums by providing the framework for users with little or no PHP or database experience. It grows more popular with each new release because it becomes easier to use each new release. Drupal 6.0 (and 6.1) were recently released after a year of development. The new features and improvements make for an impressive content management platform.

The beauty of Drupal is how highly customizable it is. The more PHP you know, the more powerful it becomes. But even if you don't know any PHP you can build and run a great-looking site by utilizing Drupal's many built-in and contributed modules as well as the various themes. Some of the sites running Drupal include Warner Brothers Records, Popular Science, and The Onion. If you need help, you can find lots of handy documentation and a friendly user forum on the Drupal Web site.

I've been running Drupal since 3.1 and I always feel nervous at the prospect of a major version upgrade. In the past, there were always issues with upgrading the tables of the database, and sometimes I was left to search the Drupal forum or the Internet for pointers on how to fix these inevitable showstoppers. However, with each new release, the upgrade process has become less difficult, and 6.0 is reputed to be easiest yet. So, I set out to see.

Fresh install

My first course of action was to see how much a fresh install has improved since 3.1. Now, as then, the first step was to download the tarball and extract it into the Apache DocumentRoot folder. Also not changed is having to set up the initial database at the command line (or any graphical administration panel, such as phpMyAdmin). This is a simple process even at the command line. Just log into MySQL (or PostgreSQL 7.4 or higher) and type create database database_name; and then GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON database.database_name TO 'user'@'hostname' IDENTIFIED BY 'password';. In the old days, at this point, it would be time to import the database skeleton, edit the settings.php and .htaccess files, and browse to the new site and create an administration account. With 6.0, it's time to browse to your new site.

129444-1-thumb.jpg

When you bring up your site you will be presented with an install wizard. The first screen allows you install other language files to use for the installation and your site. I clicked on "Install Drupal in English," and the install script verified system requirements. Next, I filled in my database name and user. The following step sets up the administrator account and some site settings such as timezone and whether to use Clean URLs, which are addresses for articles in plain text rather than ones that include code or long strings of numbers and dashes. That is it for basic installation.

At this point you can begin customizing your site's appearance and behavior. The initial screen has a list of steps with links to the corresponding configuration page in the adminstation section of your new site. Available choices include Configure your website, Enable additional functionality (through modules), Customize your website design (themes), and Start posting content. Also provided are links to documentation and help options. All worked really well for me.

The upgrade

The upgrade process isn't quite that easy, but it is much improved in this release. Before you begin, make sure you have recent backups of your database and files. Next, log in as user ID 1 (the administrator), put the site in Off-Line mode, revert to a default theme (Bluemarine or Garland), and disable all third-party modules and custom code. Then you are supposed to remove all existing Drupal files from your Web site's root folder, but I prefer to rename the current apache2 directory to apache2.bak and make a new one, in order to prevent any accidental deletions. At this point you can unpack the new Drupal files into the DocumentRoot folder and restore your files, images, and sites subdirectories and any other extra directories you may have.

129444-2-thumb.jpg

Now you should be able to browser to http://www.yoursite.com/update.php to update the database. Hopefully this will complete without any errors. It took about five minutes to complete for my database and I received two or three insignificant notices, but my site was fully restored and functional. This was much better than having major errors and a broken site as I've encountered in the past. But I wasn't quite finished.

Many of the contributed modules I need for my site haven't been ported to 6.x yet, but I downloaded some that were. For 6.x, contributed themes and modules are now stored in the sites subdirectory. I unpacked my new modules and enabled them. The new built-in Update Status feature reported that I needed to update the database for these modules, so I clicked to allow that. Since my customized theme would no longer work with 6.x, I tested a few others and chose one.

The upgrade process involves a few more steps than a fresh install and includes updating the database tables, but I had no real problems with the Drupal core package. I did encounter some issues with some of the third-party modules, in that they caused problems with the update.php script. I've read that this is due to buggy or incompatible code. Hopefully those will be fixed soon, but I suffered no adverse effects from using the modules as they were. Everything functioned as it should, so I spent a little time getting to know some of the new features.

New features

Besides the new install wizard and upgrade improvements, one of the first smaller changes in 6.0 is the integration of the Update Status module, which was previously contributed by Earl Miles to monitor drupal.org for updates to Drupal core and contributed modules. Now monitoring for core updates and some system stats is included within the core of Drupal. The advantages of this will be cleaner code, oversight by core Drupal developers, and one less package to maintain.

The new language support starts with the installer and includes lots of nice features for sites serving a multi-language audience, such as language assignment based on custom URLs, built-in interface for on-the-fly language choice, and the ability to import translations after adding new languages. These features would be highly valuable to online retailers and news outlets.

One handy new feature is the new drag and drop interface for menu and block administration. Before, blocks (the side column items) and menu items were placed by assigned weight. This worked well if the administrator had the foresight to begin the top items with a low enough weight and leave numbers in between. If not, as in my case, it could become cumbersome to have to rearrange or add new items to the menu or side columns. Now you can just drag and drop the items to their new placement.

Improved performance is always a welcome addition. Drupal achieves optimized performance in 6.x foremost through splitting the functionality of core modules into smaller bits, which allows the system to load just the code needed. In addition, 6.x now includes the side blocks in the caching system. Caching has proven to be an immense help in speeding up Drupal sites by reducing the number of calls to the database server, and adding support for the blocks will have a noticeable effect on sites like mine that have many blocks in use.

Some other interesting changes include built-in OpenID support, password strength checking, and easier theming. Some smaller enhancements include improved poll code, individually themed signatures, and retained details for anonymous commenting.

Conclusion

My primary complaint with Drupal is still not addressed in this release. I believe having advertising capabilities is almost a necessity in any content management solution. Instead, Drupal leaves users to their own skills or to use a contributed module. The lack of native advertising support remains a major drawback.

In the past I didn't always recommend Drupal to people who asked because of the painful upgrading process. It wasn't because of the complex steps involved, but rather the errors received and breakage of the database. Thankfully, developers are improving the software with each release. Upgrading to 5.x was better than upgrading the previous version, and upgrading to 6.x was painless.

Drupal offers a wide range of customizability and scalability. It is ideal for people who want fine-grain control over the functionality and appearance of their Web sites, and for those who may not want that cookie-cutter look that comes with some other CMS offerings. Drupal provides building blocks for everyone from those with no experience to programmers who could write all their own code but wish to save time and effort.

I was impressed with this release of Drupal. From the install wizard through the upgrade process to the performance improvements, Drupal is maturing into one of the best content management solutions available.

Categories:

  • Reviews
  • Internet & WWW