Сүрөттөө
Simple Maintenance Redirect allows site administrators to enable maintenance mode by redirecting visitors to one of your specified pages (without header and footer) or an external URL instead of complicating things with all kinds of confusing settings. Logged-in administrators can still access the site normally, ensuring a seamless workflow while updates are made.
Features:
- Custom Maintenance Page: Redirects visitors to a selected WordPress page while the site is in maintenance mode.
- Maintenance Page Modifications: Automatically hides the header and footer on the maintenance page and adds a
maintenance-mode
class to the body element for further customization. - External Redirect Option: Redirect to an external URL instead of a WordPress page if needed.
- Admin Bypass: Logged-in administrators can continue working on the site without redirection.
- Developer Hook: Modify rules for when a user should be redirected.
How It Works:
- Create and publish a page with your custom maintenance message.
- Go to Settings > General and choose a Maintenance Mode Page or enter an External URL.
- When enabled, visitors will be redirected to the selected page or URL. Logged-in administrators can still access the site.
- The plugin does not affect the login page, REST API, or JSON endpoints.
This plugin is great for “coming soon” pages, staging site protection, design previews, or any situation where you need to hide the main site while keeping access for yourself.
Demo
Орнотуу
- Upload the plugin files to the
/wp-content/plugins/simple-maintenance-redirect/
directory. - Activate the plugin through the ‘Plugins’ menu in WordPress.
- Go to Settings > General.
FAQ.KG
-
Can I customize the maintenance page?
-
Yes! Just create a page like you would normally and the plugin will automatically hide the header and footer so that your navigation bar and page styling is not visible. If you want to further customize the appearance of the page such as the background color, you can use CSS like you would any other page. A
maintenance-mode
class has been added to the body element for easier targeting. CSS can easily be added in your customizer. -
Can I allow specific users or roles to bypass maintenance mode?
-
Yes! Logged-in administrators are always allowed. You can also customize bypass conditions using the
smredirect_redirect_rules
filter.<?php add_filter( 'smredirect_redirect_rules', function( $checks, $page_id, $request_uri ) { // Allow access to a specific user (with ID 37) $checks[ 'not_john_smith' ] = get_current_user_id() !== 37; // Allow access to a specific role $user = wp_get_current_user(); $checks[ 'not_editor' ] = !in_array( 'editor', (array) $user->roles, true ); // Always return checks return $checks; }, 10, 3 ); ?>
-
Where can I request features and get further support?
-
Join my Discord support server
Сын-пикирлер
There are no reviews for this plugin.
Contributors & Developers
“Simple Maintenance Redirect” is open source software. The following people have contributed to this plugin.
МүчөлөрүTranslate “Simple Maintenance Redirect” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Өзгөртүүлөр
1.0.1
- Initial Release on April 28, 2025