Logo Knowledge
  • Product Documentation
  • Insight
  • Developer Center
  • Training
  • Submit a Request
  • Product Documentation
  • Insight
  • Developer Center
  • Training
  • Submit a Request
  1. Acquia Support Knowledge Base
  2. How-To
  3. Best Practices

Maintenance Mode

    See more
    • Updated
    • January 25, 2021 15:32

    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". 

    Maintenance mode screenshot
    Screenshot of maintenance mode configuration in Drupal 8

    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

    External Links

    • Drupal.org: Drupal User Guide: 11.2. Enabling and Disabling Maintenance Mode
    Avatar
    Jacqi Jordan
    • January 25, 2021 15:32
    • Updated
    • Facebook
    • Twitter
    • LinkedIn

    Was this article helpful?
    1 out of 1 found this helpful

    Return to top

    Related articles

    • Upgrading from PHP 7.2 to 7.3
    • Conditionally increasing memory limits
    • What to expect when requesting deprovisions from Acquia Support
    • How to investigate Memory Consumption problems
    • Connect MySQL Workbench to an Acquia Cloud database

    Support

    Acquia Support Knowledge Base
    • Submit a Request
    • Contact Support
    • Acquia Support Guide
    • Product Documentation
    • System Status

    About Acquia

    • About Us
    • Leadership
    • Board of directors
    • Newsroom
    • Careers
    • Customers
    • Contact Us
    53 State Street, 10th Floor
    Boston, MA 02109
    United States
    Phone: 888-922-7842
    Map: Google Maps
    View other locations
    • Feeds
    • Legal
    • Security Issue?

    Copyright © 2018 Acquia Inc. All Rights Reserved. Drupal is a registered trademark of Dries Buytaert.