Loading...


Related Products


Date Published: February 10, 2022

Maintenance Mode

Maintenance mode allows you to put your site in a state which no anonymous visitors can access site content, aside from the maintenance message you specify and files in the file system which are not private. A site might be put in maintenance mode during development, to perform site maintenance, or as a security precaution during an attack.  

Common methods of putting a side into maintenance mode are using the Drupal UI or Drush.

Drupal UI

To put a site in maintenance mode, you must first have the permission level to do so, typically assigned to an administrator role.

Once you have logged into the site, you can turn maintenance mode on at path /admin/config/development/maintenance (the path is the same in both Drupal 7 and 8) by clicking the "Put site into maintenance mode" checkbox, then "Save configuration".

Drush commands

An alternative to the user interface is to use Drush. Ensure you have SSH access setup first. 

Drupal 8 commands

Enable maintenance mode, then clear Drupal cache

drush --uri=[SITE-URL] state:set system.maintenance_mode 1 --input-format=integer
drush cache:rebuild

Disable maintenance mode, then clear Drupal cache

drush --uri=[SITE-URL] state:set system.maintenance_mode 0 --input-format=integer
drush cache:rebuild

Drupal 7 commands

Enable maintenance mode, then clear Drupal cache

drush vset maintenance_mode 1
drush cc all

Disable maintenance mode, then clear Drupal cache

drush vset maintenance_mode 0
drush cc all

More Information

Drupal.org's Maintenance Mode resource

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation