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
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.zipA 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
- Download the latest release from GitHub
- Upload the
developry-wp-maintenance-modefolder to/wp-content/plugins/ - Activate the plugin through the 'Plugins' menu in WordPress
- Toggle maintenance mode from the admin bar
Manual Installation
- Clone this repository into your WordPress plugins directory:
cd wp-content/plugins git clone https://github.com/krasenslavov/developry-wp-maintenance-mode.git - Activate the plugin through the 'Plugins' menu in WordPress
Usage
Quick Start
- Activate the plugin - Go to Plugins → Activate "Developry — WP Maintenance Mode"
- Toggle maintenance mode - Click the "Maintenance OFF" button in the admin bar to turn it ON
- Access your site - Only administrators can access the site while in maintenance mode
Creating a Custom Maintenance Page
- Create a new page - Go to Pages → Add New
- Select template - In the page attributes, choose "Maintenance Mode" from the template dropdown
- Design your page - Use the WordPress block editor to create your custom maintenance page
- Publish - Save and publish your page
- 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 translationsadmin_enqueue_scripts- Enqueue admin styleswp_enqueue_scripts- Enqueue frontend stylesinit- Check maintenance mode statusadmin_init- Handle maintenance mode toggleadmin_bar_menu- Add toggle button to admin barget_header- Display maintenance page
Filters
wp_die_handler- Custom maintenance page handlerpage_template- Load maintenance templatetheme_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:
- Use a translation plugin like Loco Translate, or
- Create a .po/.mo file in the
/langdirectory
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:
- GitHub Issues: https://github.com/krasenslavov/developry-wp-maintenance-mode/issues
- Email: contact@developry.com
License
GPLv2 or later - See LICENSE
Author
Krasen Slavov
- Website: https://krasenslavov.com/
- Company: Developry Ltd.
Credits
Copyright 2018 - 2025 Developry Ltd.