Upgrading Drupal Core and Modules via Drush

There may be a time when it is a time to upgrade your drupal core and modules. It may also be a situation, when some feature or functionality doesn’t work as it should be. In that case, it may be that one of the modules are out of date causing it malfunction.

Its recommended to back up the database and the code of the Drupal site before upgrading

Step 1. Check The Status

To check status on what is out of date or which module has an upgrade available run:

drush cron

This will update the ‘Status Report’. To see the report, login as Admin and go to Reports->Status Report

Step 2. Upgrade Modules and the core

To upgrade the modules and the core, run

drush upc

This will start an interactive mode and walk through the process upgrading each module and eventually the core

To see available options ‘drush upc –help’ in situations where you don’t want to update core but only modules, for example

drush upc --no-core

This will only update modules and skip the core update.

Step 3. Updating Database

To update database, run

drush updb

This will run all database updates
To see available options run ‘drush updp –help’

Step 2 & 3: To upgrade code and database at once

To upgrade modules, core together with database udpates, run:

drush up

Its combines the step 2 and 3. For finding available options, run ‘drush up –help’

Other

1. Find Current project info

drush status

This will display current Drupal and Drush vers, database driver, php configuration, etc.

Useful Lins

Updating drupal core and modules

Leave a Reply

Your email address will not be published. Required fields are marked *