Styling the maintenance page
When you need to perform a massive update to your website, it’s a good practice to put it in maintenance mode.
Drupal allows you to enable maintenance mode and provide a custom message to show to your customers:
Figure 10.1 – The form to configure and enable maintenance mode
The URL of the configuration page shown in Figure 10.1 is /admin/config/development/maintenance
. Here, you can enable maintenance mode and set a message. The message text only allows plain strings, and the only dynamic part is @site
, which will be replaced with the name of the site (as configured on /admin/config/system/site-information
).
Suggestions for the maintenance page are as follows:
maintenance
-
page
--
offline.html.twig
: Used when the site is offline due to some internal error, such as a broken database connectionmaintenance
-
page
--
front.html.twig
: Used for the front page of the site and also for pages such asupdate...