🚧
System

Maintenance Mode

Admin Settings

Graceful site lockdown with admin bypass

Overview

One-click maintenance mode that blocks all access except for admins. Displays custom message and optional estimated end time. Enable via admin panel or CLI command.

Design Considerations

UX patterns and visual design notes for this feature:

  • Maintenance page should be visually interesting
  • Show estimated end time to manage expectations
  • Email signup for "notify when back" is nice
  • Admin bypass should be clearly indicated

Key Benefits

What makes this feature stand out:

  • One-click activation
  • Custom maintenance message
  • Admin bypass automatic
  • CLI and GUI controls
Technical Note

MaintenanceHelper::enable('message', 'end_time'). Middleware checks ConfigHelper::isMaintenanceMode(). Admins with viewAdminPanel bypass automatically.

Helpers
MaintenanceHelperConfigHelper
Models
SystemSetting
Database Tables
system_setting

Configuration

Config Relationship Legend
DB overrides params.php🔗 DB related setting📋 DB stores value only
params.php Configuration

Config path: params['maintenance']

params['features']['maintenance'] => trueparams['maintenance']['bypassRoles'] => ['superadmin', 'admin']params['maintenance']['excludeRoutes'] => ['site/login', 'site/maintenance']
Database Settings (system_setting table)
KeyTypeDescriptionRelation
maintenance_modebooleanEnable/disable maintenance mode
maintenance_messagestringMessage displayed during maintenance📋
maintenance_end_timestringEstimated end time (optional)📋