Maintenance Mode
Unfold CMS includes a maintenance mode that displays a "site under maintenance" message to visitors while allowing administrators to continue accessing the site.
Overview
Maintenance mode provides:
- Public-facing maintenance page — Visitors see a maintenance message
- Admin bypass — Administrators can access the site normally
- IP whitelist — Allow specific IPs to bypass maintenance
- Custom message — Configure the maintenance message
- Scheduled maintenance — Set start times for planned maintenance
- Artisan integration — Syncs with Laravel's
artisan down/artisan upcommands
Enabling Maintenance Mode
Through the Admin Panel
- Navigate to Settings > Maintenance
- Toggle Enable Maintenance Mode
- Optionally customize the message and whitelisted IPs
- Save
Through Artisan
# Enable maintenance mode
php artisan down
# Enable with custom message
php artisan down --message="Upgrading to v2.0"
# Enable with secret bypass
php artisan down --secret="my-bypass-token"
# Disable maintenance mode
php artisan up
The CMS syncs the artisan down/up state with the database settings, keeping both in sync.
Configuration
Configure maintenance mode in Settings > Maintenance in the admin panel.
Admin Bypass
When maintenance mode is active:
- Admin panel (
/admin/*) — Fully accessible to authenticated admins - Login page — Always accessible
- API endpoints — Blocked (unless whitelisted)
- Public pages — Show maintenance message
Administrators who are already logged in can browse the site normally, including the public frontend, to verify changes.
IP Whitelist
Add IP addresses that should bypass maintenance mode. This is useful for:
- Your office IP — So your team can test during maintenance
- Client IPs — Allow specific clients to preview
- CI/CD servers — Allow deployment scripts to access the site
Configure IPs in Settings > Maintenance as a comma-separated list or one per line.
Scheduled Maintenance
You can schedule maintenance mode to activate at a future time:
- Set the maintenance start date/time in the admin panel
- The system checks the schedule and activates maintenance when the time arrives
This allows you to announce maintenance windows in advance without having to manually enable it at the right time.
Maintenance Page
The maintenance page is a standalone Blade template that displays:
- Site name
- Maintenance message
- Retry-After information
- A clean, branded design
The page does not load the full CMS — it's a lightweight, static template that works even if the application has issues.
Best Practices
- Whitelist your IP before enabling maintenance mode
- Enable during updates — Put the site in maintenance mode during database migrations
- Keep it brief — Maintenance windows should be as short as possible
- Custom message — Tell visitors when the site will be back
- Test admin access — Verify you can still access the admin panel
Related
- Backups — Create a backup before maintenance
- Cache — Clear caches after maintenance
- Configuration — Maintenance settings reference