In normal Drupal practice, it’s quite necessary to set the website in off-line mode before testing and changing anything as the administrator. The good news is that Drupal 7 itself has a default maintenance mode page, from which you can put the site into maintenance mode and even style a maintenance message with little effort.
In this tutorial, we’re going to showcase a step-by-step reference on how to enable and disable the maintenance mode in a Drupal 7 website. In the meanwhile, the process of changing the default maintenance mode message will also be covered in the following parts. Now, let’s drop down and take a deeper look into the detailed steps.
How to Put a Drupal 7 Website into Maintenance Mode??
To turn on the maintenance mode in Drupal 7, you should firstly log onto the admin area using your own username and password. Once entered this Drupal 7 dashboard, you will be displayed with plenty of editing options in the top toolbar, such as “Content”, “Structure”, “Appearance” and “People”, etc. All you need to do is locate and click on the “Configuration” option across the top of the right-hand interface.
From the next screencast, there are a lot of configuration options that allow you administrator to edit the every aspect of your Drupal 7 site. Simply scroll down to this “Development” section and make a hit on the “Maintenance Mode” link as below. As is implied, you can also bring an off-line website back online within the same “Maintenance Mode” tab.
The next step is to check the box saying “Put site into maintenance mode” as follows. Once the maintenance mode is successfully enabled, only those users who have the “Use the site in Maintenance” permission can enter your website to carry out maintenance work. If you wish, it is possible to add permission to access website under maintenance mode, which is beyond the scope of the tutorial.
How to Change the Default Maintenance Message?
Now that you’ve set the website into maintenance mode, it’s time to configure the maintenance mode message that will be displayed to all of the other scanners and visitors. To do so, you only need to enter the very message that you’d like to show for visitors during this interruption. Once done with all settings, do remember to click the bottom “Save Configuration” button to take effect.
If implemented properly, a success message will appear onscreen to notify that your configuration options have been saved. Till now, you are free to perform your upgrade or deletion task. For security purposes, you’d better make a backup of Drupal in advance.
How to Get a Drupal 7 Website Out of Maintenance Mode?
After switching on the maintenance mode, you may find yourself unable to access the Drupal 7 backend any more. If this is the case, you can quickly log into your off-line Drupal site by appending /?q=user to the site address. Below is an example of how your user login page URL looks like.
From here, you will be able to enter the login screen and get your site out of maintenance mode. If needed, you can also apply whatever changes and tweaks out there.