Maintenance Mode in Kirby?

This feature does not exist, but you can easily implement it yourself, e.g.

in your site.php blueprint add a field maintenance:

maintenance:
    label: Maintenance
    type: checkbox
    text: Enable Maintenance

Then add a new invisible page called maintenance with a text file called maintenance.txt and a maintenance.php template. Add the text you want to display when in maintenance mode. Alternatively, you can use a router to achieve the same.

Then in your header snippet add this:

<?php if($site->maintenance()->isTrue() and $page->uid() != 'maintenance') { go('maintenance');} ?>
2 Likes