6

I've neglected a site for a while, and now I need to update some modules that are several versions out of date. Can I just jump to the newest version of the module or do I need to copy each version in order and run update.php each time?

Also, if several modules need updating, is it OK to copy all the files across and run update.php once, or do I need to copy each module individually and run the update each time?

migrated from stackoverflow.com May 17 '11 at 19:07

This question came from our site for professional and enthusiast programmers.

1

Yes, you can skip steps when updating. The best method I've found is to use drush. "drush up" will make backups; update all modules, themes, and Drupal core; and then run update.php.

I do this on my development site, test, then commit to SubVersion and check it out on production. In fact, I'm just about to update our production site.

  • This is true for minor versions, but not all major versions have a working upgrade path. It's generally best to read the module change log/update notes beforehand. However I'd say majority of cases no issue will arise. – Daniel Waters Aug 23 '13 at 11:13
6

As long as you're not skipping major Drupal versions (i.e. going from Drupal 5.x to Drupal 7.x), just jump to the new version(s).

  • 4
    The same might be true for contributed modules, e.g. directly supporting the upgrade from an outdated 6.x version to a 7.x version, so you should make sure to update to the lastest version of all contributed modules before upgrading the major version. – Berdir May 17 '11 at 17:23
2

Generally speaking, you can update from (for example) version 6.1 to 6.20; Drupal saves the last update function executed for each module, and will execute the functions that have never been run, one by one.

I would check if the project page contains particular instructions for updating a module; the module could be incompatible with some versions of other modules, or require a particular updating procedure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.