WP Manifestindependent plugin directory
manifest / utilities / developry-wp-maintenance-mode

Developry — WP Maintenance Mode

A lightweight WordPress maintenance mode plugin that works with any theme.

by Krasen Slavov · github.com/krasenslavov/developry-wp-maintenance-mode · website

1stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/krasenslavov/developry-wp-maintenance-mode/archive/refs/heads/main.zip

A lightweight WordPress maintenance mode plugin that works with any theme. Perfect for displaying a custom maintenance page while you work on your website.

Features

  • Works with any WordPress theme - No theme dependencies
  • Easy toggle - Turn maintenance mode on/off from the admin bar
  • Administrator access - Admins can still access the site while in maintenance mode
  • Custom page template - Create your own maintenance page with the WordPress block editor
  • SEO-friendly - Sends proper 503 HTTP headers and Retry-After headers
  • Secure - Nonce verification and proper capability checks
  • Responsive design - Mobile-friendly default template
  • Translation ready - Full internationalization support
  • Lightweight - Minimal performance impact

Installation

From GitHub

  1. Download the latest release from GitHub
  2. Upload the developry-wp-maintenance-mode folder to /wp-content/plugins/
  3. Activate the plugin through the 'Plugins' menu in WordPress
  4. Toggle maintenance mode from the admin bar

Manual Installation

  1. Clone this repository into your WordPress plugins directory:
    cd wp-content/plugins
    git clone https://github.com/krasenslavov/developry-wp-maintenance-mode.git
  2. Activate the plugin through the 'Plugins' menu in WordPress

Usage

Quick Start

  1. Activate the plugin - Go to Plugins → Activate "Developry — WP Maintenance Mode"
  2. Toggle maintenance mode - Click the "Maintenance OFF" button in the admin bar to turn it ON
  3. Access your site - Only administrators can access the site while in maintenance mode

Creating a Custom Maintenance Page

  1. Create a new page - Go to Pages → Add New
  2. Select template - In the page attributes, choose "Maintenance Mode" from the template dropdown
  3. Design your page - Use the WordPress block editor to create your custom maintenance page
  4. Publish - Save and publish your page
  5. Automatic display - The plugin will automatically display this page when maintenance mode is enabled

Default Maintenance Page

If you don't create a custom page, the plugin displays a default maintenance message:

  • "Website Under Maintenance"
  • "We are currently performing scheduled maintenance. Please check back soon!"

Technical Details

HTTP Headers

When maintenance mode is active, the plugin sends:

  • 503 Service Unavailable - Proper HTTP status code
  • Retry-After: 3600 - Suggests retry after 1 hour (good for SEO)

Security Features

  • Nonce verification - All toggle actions are protected with WordPress nonces
  • Capability checks - Only administrators can toggle maintenance mode
  • Safe redirects - Uses wp_safe_redirect() for secure redirects
  • Input sanitization - All user inputs are properly sanitized
  • Output escaping - All outputs are properly escaped

Files Structure

developry-wp-maintenance-mode/
├── assets/
│   └── css/
│       ├── admin.css          # Admin bar styles
│       └── frontend.css       # Frontend styles (optional)
├── lang/                      # Translation files
├── templates/
│   └── tpl-maintenance-mode.php   # Maintenance page template
├── developry-wp-maintenance-mode.php  # Main plugin file
└── uninstall.php             # Cleanup on uninstall

Requirements

  • WordPress 5.0 or higher
  • PHP 7.0 or higher

Hooks and Filters

The plugin uses standard WordPress hooks:

Actions

  • plugins_loaded - Load text domain for translations
  • admin_enqueue_scripts - Enqueue admin styles
  • wp_enqueue_scripts - Enqueue frontend styles
  • init - Check maintenance mode status
  • admin_init - Handle maintenance mode toggle
  • admin_bar_menu - Add toggle button to admin bar
  • get_header - Display maintenance page

Filters

  • wp_die_handler - Custom maintenance page handler
  • page_template - Load maintenance template
  • theme_page_templates - Add template to dropdown

Multisite Support

The plugin supports WordPress multisite installations. On uninstall, it will clean up options from all sites in the network.

Uninstallation

When you delete the plugin, it automatically:

  • Removes all plugin options from the database
  • Cleans up options from all sites in multisite networks

Translation

The plugin is translation-ready with the text domain developry-wp-maintenance-mode.

To translate:

  1. Use a translation plugin like Loco Translate, or
  2. Create a .po/.mo file in the /lang directory

Changelog

Version 1.0.0

  • Theme-agnostic template (works with any WordPress theme)
  • Added nonce security for toggle actions
  • Added proper HTTP 503 and Retry-After headers
  • Added PHPDoc comments to all functions
  • Added activation/deactivation hooks
  • Added uninstall script
  • Fixed CSS file references
  • Added internationalization support
  • Updated copyright to 2025

Version 0.1.0

  • Initial release
  • Basic maintenance mode functionality
  • GeneratePress template support

Support

For bugs, feature requests, or questions:

License

GPLv2 or later - See LICENSE

Author

Krasen Slavov

Credits

Copyright 2018 - 2025 Developry Ltd.