Oct 092013
 

One of my web­site cli­ents has a Drupal site, and it was time to upgrade from Drupal 6 to 7. Drupal is one of those vastly com­plic­ated, able-to-do-any­thing plat­forms that is part blog­ging soft­ware, part CMS, and part play­ground for PHP developers, with the inev­it­able res­ult that Drupal 7 is a worth­while upgrade over Drupal 6, but requires more than a little time to fig­ure out what needs doing. Thanks to Shane at Left Right Minds who poin­ted me in the right dir­ec­tion on sev­er­al occa­sions. With power comes com­plex­ity and there are many ways to get things wrong.

As always, the basics are clear: use a devel­op­ment site for the upgrade to get all the issues out of the way while not affect­ing the pro­duc­tion site. Allow more time than you think you will need. Ensure an adequate sup­ply of chocol­ate and/or cof­fee. Take breaks as needed.

Copy the files on the pro­duc­tion site to the devel­op­ment site (which I’m call­ing {yourdevweb­site}). Cre­ate a backup and restore that on the devel­op­ment site. Next time: turn off cach­ing and clear the cache before mak­ing the backup. Make sure cach­ing is turned off while developing.

List all the mod­ules on the cur­rent site, see if they have Drupal 7 equi­val­ents. Spend some time fig­ur­ing out wheth­er the new ver­sions are worth­while, or if there’s a bet­ter way to add func­tion X in Drupal 7 (ask­ing an expert, like Shane, is really help­ful at this stage).

Upgrade the core by installing Drupal 7, solve any issues. If the pre­vi­ous sysad­min 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 upgrad­ing mod­ules from a URL, yay! So the pro­cess of upgrad­ing mod­ules turns into a fairly simple one , if no errors crop up. The first step is to determ­ine the order in which to upgrade the mod­ules — Backup and Migrate should be the first, Con­tent Con­struc­tion Kit (CCK) second since it requires some field con­ver­sion. Then Date, Token, and Views (nev­er under­es­tim­ate the power of a View). Once you have those basics done, upgrade the oth­er mod­ules 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 oth­er pages.

  1. Go to {yourdevwebsite}/admin/modules/install, add the link for the latest stable Drupal 7 ver­sion, and install. 
  2. Enable the mod­ule, then run {yourdevwebsite}/update.php
  3. Fix any errors.
  4. Run the backup to back up the changes.
  5. Con­fig­ure the mod­ule, adjust menus, etc, until the mod­ule more or less does what you need. Final tweak­ing can wait until all the mod­ules are installed, but get the main func­tion­al­ity in place for each mod­ule as you upgrade it.
  6. Repeat for your list of modules

Be aware, some mod­ules just don’t work in Drupal 7 and for those you need to find anoth­er way to get that func­tion­al­ity. Some mod­ules (e.g., Cal­en­dar) changed the way they work between Drupal 6 and Drupal 7. Some mod­ules use the stand­ard con­fig­ur­a­tion meth­ods, oth­ers (Cal­en­dar again) are con­figured using dif­fer­ent methods.

Drupal 7 lets you split lib­rar­ies and the mod­ule. For example, a good way to install the CK edit­or is to get the down­load from the web site and put in /sites/all/libraries. Then install the CKed­it­or mod­ule, which will use that lib­rary via the lib­rar­ies API.

IMCE is a nice image and file browser/uploader.

When it comes to updat­ing themes, be aware that even if the theme has the same name as one in Drupal 6, it will prob­ably have sig­ni­fic­ant changes. Respons­ive design tech­niques and the avail­ab­il­ity of more base themes con­trib­uted to this, as well as the changes due to the actu­al plat­form. Expect to spend more time than you expec­ted to tweak the theme back to some­thing approach­ing the ori­gin­al look and feel (assum­ing that’s what the cli­ent wants).

Allow time for train­ing people on the new fea­tures. 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)

/* ]]> */