Using Drush to encapsulate operation inside a drupal maintenance mode

24th October 2011 – 53 words

Using drush is a convenient way to deploy bigger DB-changes without giving the users a glitch. Instead they will see a maintenance mode page.

drush vset site_offline 1
cat ~/db.sql | mysql -u usr_bla -p db_bla
drush vset site_offline 0

Reposted from