Posted By

isholgueras on 08/19/10


Tagged

drupal Drush


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

picxelplay


Activate Drupal maintenance mode using drush


 / Published in: Bash
 

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

  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
Posted By: tregeagle on May 29, 2012

D7

#Activate maintenance mode drush vset --always-set maintenance_mode 1 drush cc all

#Desactivate maintenance mode
drush  vset --always-set maintenance_mode 0
drush cc all
Posted By: tregeagle on May 29, 2012

sorry can't be stuffed reading how to do markdown... this is how I do the same in drupal7

drush vset --always-set maintenancemode 1 drush cc all drush vset --always-set maintenancemode 0 drush cc all

Posted By: tregeagle on May 29, 2012

ffs

Posted By: tregeagle on May 29, 2012

Can't see how to go back and delete/edit my comments

drush vset --always-set maintenancemode 1 drush cc all drush vset --always-set maintenancemode 0 drush cc all

You need to login to post a comment.