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
    • September 23, 2019 19:07

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

    Drupal 8 commands

    Enable maintenance mode, then clear Drupal cache

    drush cset system.maintenance_mode 1
    drush cr

    Disable maintenance mode, then clear Drupal cache

    drush cset system.maintenance_mode 0
    drush cr

    More Information

    Drupal.org's Maintenance Mode resource

    Avatar
    Jacqi Jordan
    • September 23, 2019 19:07
    • Updated
    • Facebook
    • Twitter
    • LinkedIn

    Was this article helpful?
    0 out of 0 found this helpful
    Have more questions? Submit a request

    Return to top

    Related articles

    • Avoiding maintenance mode during site updates
    • Maintaining a static microsite alongside Drupal's docroot
    • Changes to trusted proxy headers on Acquia Cloud for Drupal 8 sites
    • Drupal 8 core moderately critical release: DRUPAL-PSA-2018-07-30
    • Debugging cron / search indexing

    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.