Oct 092013
 

One of my website clients has a Drupal site, and it was time to upgrade from Drupal 6 to 7. Drupal is one of those vastly complicated, able-to-do-anything platforms that is part blogging software, part CMS, and part playground for PHP developers, with the inevitable result that Drupal 7 is a worthwhile upgrade over Drupal 6, but requires more than a little time to figure out what needs doing. Thanks to Shane at Left Right Minds who pointed me in the right direction on several occasions. With power comes complexity and there are many ways to get things wrong.

As always, the basics are clear: use a development site for the upgrade to get all the issues out of the way while not affecting the production site. Allow more time than you think you will need. Ensure an adequate supply of chocolate and/or coffee. Take breaks as needed.

Copy the files on the production site to the development site (which I’m calling {yourdevwebsite}). Create a backup and restore that on the development site. Next time: turn off caching and clear the cache before making the backup. Make sure caching is turned off while developing.

List all the modules on the current site, see if they have Drupal 7 equivalents. Spend some time figuring out whether the new versions are worthwhile, or if there’s a better way to add function X in Drupal 7 (asking an expert, like Shane, is really helpful at this stage).

Upgrade the core by installing Drupal 7, solve any issues. If the previous sysadmin changed the defaults so none of the menus appear to work, go to {yourdevwebsite}/admin/structure/menu to reset them to the defaults.

Drupal 7 allows upgrading modules from a URL, yay! So the process of upgrading modules turns into a fairly simple one , if no errors crop up. The first step is to determine the order in which to upgrade the modules – Backup and Migrate should be the first, Content Construction Kit (CCK) second since it requires some field conversion. Then Date, Token, and Views (never underestimate the power of a View). Once you have those basics done, upgrade the other modules in whatever order makes sense. I like to order things so I fix what’s on the front page of the web site first, then the other pages.

  1. Go to {yourdevwebsite}/admin/modules/install, add the link for the latest stable Drupal 7 version, and install.
  2. Enable the module, then run {yourdevwebsite}/update.php
  3. Fix any errors.
  4. Run the backup to back up the changes.
  5. Configure the module, adjust menus, etc, until the module more or less does what you need. Final tweaking can wait until all the modules are installed, but get the main functionality in place for each module as you upgrade it.
  6. Repeat for your list of modules

Be aware, some modules just don’t work in Drupal 7 and for those you need to find another way to get that functionality. Some modules (e.g., Calendar) changed the way they work between Drupal 6 and Drupal 7. Some modules use the standard configuration methods, others (Calendar again) are configured using different methods.

Drupal 7 lets you split libraries and the module. For example, a good way to install the CK editor is to get the download from the web site and put in /sites/all/libraries. Then install the CKeditor module, which will use that library via the libraries API.

IMCE is a nice image and file browser/uploader.

When it comes to updating themes, be aware that even if the theme has the same name as one in Drupal 6, it will probably have significant changes. Responsive design techniques and the availability of more base themes contributed to this, as well as the changes due to the actual platform. Expect to spend more time than you expected to tweak the theme back to something approaching the original look and feel (assuming that’s what the client wants).

Allow time for training people on the new features. Even an hour or two helps.

 Leave a Reply

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=""> <s> <strike> <strong>

(required)

(required)

/* ]]> */