When do you need to enable Maintenance Mode for Bolt?
This is a good option when you are performing major modifications to our Bolt CMS website. Your users will not be able to see those changes until you allow them to.

Since Bolt has a maintenance_default.twig pre-defined template, all that we will need to do is to make some modifications to the general configurations file.

The Bolt application will display the template to our website’s visitors, while the administrative users will still have access to the website itself.

Without further due, here are the simple instructions which you can follow in order to activate Maintenance Mode for Bolt:

Login to your Bolt administrator dashboard and click on Configuration >> Main Configuration

This will open the config.yml file for editing. As we said, Bolt has an existing predefined maintenance mode template. What we have to do is tell the controller to preview the maintenance template to the website’s visitors.

Scroll down to the maintenance_mode section, which is around row 52. Change the following values:

After performing the alterations to the config.yml file, simply click on the Save button to keep the changes.

Make sure that you either logout from Bolt, or open the front page with another browser, otherwise you will still be able to access the mainpage, because you are logged in with a user, for which the maintenance rules don’t apply.

Logged out from your Bolt administrator page. Now enter the Bolt URL on your web browser and you shall see the Maintenance Page immediately as shown below.

If you wish to disable the Maintenance Mode, you just need to edit the config.yaml file to the following:

maintenance_mode: false
maintenance_template: maintenance_default.twig

Remember to press the Save button to save changes.
Was this article helpful?
Thank you!