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 up commands

Enabling Maintenance Mode

Through the Admin Panel

  1. Navigate to Settings > Maintenance
  2. Toggle Enable Maintenance Mode
  3. Optionally customize the message and whitelisted IPs
  4. 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:

  1. Set the maintenance start date/time in the admin panel
  2. 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

  1. Whitelist your IP before enabling maintenance mode
  2. Enable during updates — Put the site in maintenance mode during database migrations
  3. Keep it brief — Maintenance windows should be as short as possible
  4. Custom message — Tell visitors when the site will be back
  5. Test admin access — Verify you can still access the admin panel
  • Backups — Create a backup before maintenance
  • Cache — Clear caches after maintenance
  • Configuration — Maintenance settings reference