Activate Drupal maintenance mode using drush


/ Published in: Bash
Save to your folder(s)

We can use this in a shell script (while doing a backup process, an update, ...)


Copy this code and paste it in your HTML
  1. #Activate maintenance mode
  2. drush vset --always-set site_offline 1
  3. drush cc all
  4.  
  5. #Desactivate maintenance mode
  6. drush vset --always-set site_offline 0
  7. drush cc all

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.