A Note On Updating

Photo of Greg Harvey
Thu, 2008-11-27 16:17By greg

These days, now the Update Status module is core in Drupal 6, people find themselves updating their core, modules and themes far more regularly than before. This is, of course, a very good thing. I'd just like to raise a couple of points of order on the matter:

When updating it is always tempting to copy the contents of the downloaded tar file straight over the existing module or theme. Don't! It is entirely possible there are files with the old version which are not required by the new one. Worse, they may even do some harm.

Take a back-up copy of your old module or theme (and database), delete it entirely from the Drupal application, then copy in your new module or theme where the old one was. Now you absolutely know you have the latest version and *only* the latest version, with no orphan files or sub-modules floating around.

All that remains to be done is login as user 1 and run update.php. Anything goes catastrophically wrong? Restore your old database and module/theme directory.

One other note - it is unwise to ignore the warnings to update for too long. The longer you leave it, the further from HEAD your version of the code gets and the more painful the upgrade path is likely to be. You have been warned! =)