Menu du compte de l'utilisateur

  • Log in

Navigation principale

  • Home Page
  • All CMS
  • Tutorials
  • White Paper
Home
Guide CMS

Breadcrumb

  • Home
  • Tutorials
  • Drupal User Guide
  • Chapter 11. Extending and Customizing Your Site
  • 11.2. Enabling and Disabling Maintenance Mode

Language selector

  • Français
  • English

Main navigation

  • Home Page
  • All CMS
  • Tutorials
  • White Paper

User login

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
  • Create new account
  • Reset your password

Book navigation

  • Tutorials
    • Drupal User Guide
      • Preface
      • Chapter 1. Understanding Drupal
      • Chapter 2. Planning Your Site
      • Chapter 3. Installation
      • Chapter 4. Basic Site Configuration
      • Chapter 5. Basic Page Management
      • Chapter 6. Setting Up Content Structure
      • Chapter 7. Managing User Accounts
      • Chapter 8. Blocks
      • Chapter 9. Creating Listings with Views
      • Chapter 10. Making Your Site Multilingual
      • Chapter 11. Extending and Customizing Your Site
        • 11.1. Finding Modules
        • 11.2. Enabling and Disabling Maintenance Mode
        • 11.3. Downloading and Installing a Module from Drupal.org
        • 11.4. Finding Themes

Guy Vigneault

11.2. Enabling and Disabling Maintenance Mode

By Guy Vigneault | 1:20 AM EDT, Wed October 14, 2026

Goal

Put your site in maintenance mode to allow users with the right permissions to use the site while users without this permission are presented with a message that the site is under maintenance.

Prerequisite knowledge

Section 13.3, “Concept: Security and Regular Updates”

Site prerequisites

If you want to use Drush to enable or disable maintenance mode, Drush must be installed. See Section 3.3, “Concept: Additional Tools”.

Steps

You can use the administrative interface or Drush to enable or disable maintenance mode.

Enabling maintenance mode using the administrative interface

  1. In the Manage administrative menu, navigate to Configuration > Development > Maintenance mode (admin/config/development/maintenance). The Maintenance mode page appears.
  2. Fill in the fields as shown below.

    Field nameExplanationValue
    Put site into maintenance modeEnable the maintenance modeChecked
    Message to display when in maintenance modeThe information that is shown to website visitors when the mode is enabled. Variables such as @site can be used in the message@site is currently under maintenance but should be back shortly. Thank you for your patience.
  3. Click Save configuration.
  4. Verify that the site is in maintenance mode by accessing it from another browser where you aren’t logged in. If you are not able to verify, try clearing the cache. See Section 12.2, “Clearing the Cache”.

    Maintenance mode enabled

Disabling maintenance mode using the administrative interface

  1. In the Manage administrative menu, navigate to Configuration > Development > Maintenance mode (admin/config/development/maintenance). The Maintenance mode page appears.
  2. Fill in the fields as shown below.

    Field nameExplanationValue
    Put site into maintenance modeDisable the maintenance modeUnchecked
    Message to display when in maintenance modeNo message required while disabling. You can leave the field blank. 
  3. Click Save configuration.
  4. Verify that the site is no longer in maintenance mode by accessing it from another browser where you aren’t logged in. If you are not able to verify, try clearing the cache. See Section 12.2, “Clearing the Cache”.

    Maintenance mode disabled

Enabling or disabling maintenance mode using Drush

  1. Follow the user interface steps above to edit the site maintenance message, if desired.
  2. Run the following Drush commands to enable maintenance mode and clear the cache:

    drush config:set system.maintenance message "Optional message" -y
    drush state:set system.maintenance_mode 1 --input-format=integer
    drush cache:rebuild
  3. Run the following Drush commands to disable maintenance mode and clear the cache:

    drush state:set system.maintenance_mode 0 --input-format=integer
    drush cache:rebuild
  4. After running either set of commands, verify that your site is either in or out of maintenance mode by visiting the site in a browser where you are not logged in.

Expand your understanding

  • Section 13.5, “Updating the Core Software”
  • Section 13.7, “Updating a Theme”
  • Section 13.6, “Updating a Module”

Videos

Enabling and Disabling Maintenance Mode

Attributions

Written and edited by Boris Doesborg, Jojy Alphonso at Red Crackle, and Jennifer Hodgdon.

 

Book traversal links for Tutorials

  • ‹ 11.1. Finding Modules
  • Up
  • 11.3. Downloading and Installing a Module from Drupal.org ›
CMS

 

All CMS

 

Tuto

 

Tutorials

 

White Paper

 

White Paper

Powered by Drupal

Privacy Policy

Privacy Policy

 

Recent content

  • 11.4. Finding Themes
    19 hours 46 minutes ago
  • 11.3. Downloading and Installing a Module from Drupal.org
    19 hours 50 minutes ago
  • 11.2. Enabling and Disabling Maintenance Mode
    19 hours 55 minutes ago
  • 11.1. Finding Modules
    20 hours 1 minute ago
  • Chapter 11. Extending and Customizing Your Site
    20 hours 5 minutes ago

Copyright

Creative Commons

Sauf mention contraire, Guide CMS © 2025 par Guy Vigneault est sous licence Creative Commons Attribution - Utilisation non commerciale - Partage dans les mêmes conditions 4.0 International

 

Creative Commons

Unless otherwise stated, Guide CMS © 2025 by Guy Vigneault is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License

eGV Web