How to upgrade a module already distributed with Drupal Commerce?

33 Views Asked by At

Drupal Commerce 1 has included Crumbs 1.10. I need to upgrade Crumbs to 2.7, and this version isn't included with Drupal Commerce.

How can I upgrade it without breaking Drupal Commerce distribution (and update) ?

Thanks.

2

There are 2 best solutions below

1
Anson W Han On

Composer Package Management:

If you are using Composer to manage the installed modules/distributions for your Drupal 7 site, you can set the minimum version constraint and then run composer update for the Crumbs module:

composer require 'drupal/crumbs:^2.7'
composer update 'drupal/crumbs'

Traditional/Legacy code repositories:

For traditional/legacy code repositories that don't use composer, you can:

  1. Backup your database/codebase
  2. Download the desired version of the module
  3. replace the older version of the module (typically found in your codebase's /profiles/contrib/commerce/modules/ directory or /modules/contrib/ directory).
  4. Deploy the updated module code.
  5. Run update.php or drush updatedb.
  6. Clear caches.

In the case that the Drupal Commerce profile has a fixed version dependency for Crumbs 1.10, you should be able to update the version constraint in the .info file for the module.

0
khurrami On

You can use drush command as follow to update a specific version of module.

$ drush pm-update views_send-7.x-1.x-dev

Thanks