Drupal Update with Drush

Last modified by Yu Pang Law on 2022/12/14 10:39

  1. cd to Drupal installation Directory
  1. Backup Drupal
    drush archive-dump
  2. Check Drupal Update and get the list of modules that have update
    drush ups
    {{code}}
    1. Set Drupal Website to maintenance mode
    {{code}}
    drush sset system.maintenance_mode 1
    {{code}}
    1. Clear Drupal Cache
    {{code}}
    drush cr
    {{/code}}
    1. Update Drupal and press "Y" when asked
    {{code}}
    drush up drupal
    {{/code}}
    1. Update Drupal Database
    {{code}}
    drush updb
    {{/code}}
    1. Update Drupal modules
    {{code}}
    drush up XXXX XXXX
    {{/code}}
    where XXXX is the module name (the string inside the bracket in step 2)

    1. Set Drupal Website back to live mode
    {{code}}
    drush sset system.maintenance_mode 0
    {{/code}}
    1. Clear Drupal Cache Again
    {{code}}
    drush cr
    {{/code}}
Tags:
 
Copyrighted by Pangnet.net