Other / Maintenance (offline) mode
Note: You are currently reading the documentation for Bolt 4.0. Looking for the documentation for Bolt 5.2 instead?
Bolt comes with a built-in 'Maintenance Mode'. If this mode is active, regular visitors to the site will see the website's configured maintenance page, or a default.
Note: This page returns a HTTP 503 status code. This means "Service Unavailable" and makes the maintenance page search engine friendly.
Any users that are logged in, will be able to use the site as normal, while
other visitors will see the maintenance screen. You can enable the Maintenance
mode with these settings in the config.yml
file:
maintenance_mode: true
maintenance_template: maintenance_default.twig
The first value turns the maintenance mode on or off. The second option sets
the template to use. By default, the template maintenance_default.twig
is
chosen, which can be found in bolt/templates/helpers/
. If you wish to change this
file, you should set it to another filename, and place that file in your own
theme- folder. Otherwise it might be overwritten during an update of Bolt.
Note: If you're testing this feature, be aware that you will not see the maintenance screen if you are logged in. Use another browser to test it.
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.