---
title: "Maintenance Mode"
date: "2022-02-10T18:57:58+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/93561-maintenance-mode"
id: "d9d1b8e9-5501-470b-986e-b6ceb8718610"
---

Table of contents will be added

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](/node/56350) 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".  
  

![Checkbox for maintenance mode with message input field. Button labeled "Save configuration." Instructions on using maintenance mode for updates.](https://acquia.widen.net/content/1087e4a0-96a2-43e9-8f4b-b5d4723ecfae/web/ka06g000001tvpB00N6g00000VCdgi0EM6g000002W7up.png)

Drush commands
--------------

An alternative to the user interface is to use [Drush](/node/56323). Ensure you have [SS](https://docs.acquia.com/acquia-cloud/ssh/enable)[H acce](https://docs.acquia.com/acquia-cloud/ssh/enable)ss 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](https://www.drupal.org/docs/user_guide/en/extend-maintenance.html)