In normal Drupal practice it is necessary to put the site into maintenance mode before upgrading anything, even a module, if I have understood correctly. Is this still true with Drush? and is there a Drush command to do this?

Comments

moshe weitzman’s picture

Status:Active» Fixed

drush does not do that, nor do the maintainers think thats needed. if you want to do it yourself, run drush vset site_offline 1

AFowle’s picture

Status:Fixed» Active

Thanks for this important clarification. This seems to puzzle people - I have amended the documentation at http://drupal.org/node/477684. Could you please consider adding it to the readme.txt and other places where Drush is documented?

greg.1.anderson’s picture

What if we added a lot of examples to drush help variable-set? I could whip up a quick list later...

mariomaric’s picture

+1 for examples a.k.a. time savers. :)

clemens.tolboom’s picture

xref #804754: HTML documentation through drush where the drush documentation help page is generated through drush.

The same way we could generate the examples.

moshe weitzman’s picture

Status:Active» Fixed

I think the existing examples are sufficient. site_offline is there.

greg.1.anderson’s picture

I agree; I did go trolling through the variables table, and didn't really see anything useful and generic enough to add...

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

roball’s picture

Here is a one-liner that puts all sites of a multisite environment into sites maintenance mode:

for s in $(drush -n @sites st | sed -e '/#/!d' -e 's/^[^#]*#//'); do echo -n "$s: "; drush -y -l http://$s vset site_offline "1"; done

Putting them all back online works with that code:

for s in $(drush -n @sites st | sed -e '/#/!d' -e 's/^[^#]*#//'); do echo -n "$s: "; drush -y -l http://$s vset site_offline "0"; done

Working great for me :-)