تفصیل
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-modeclass 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.
عمومی سوالات
-
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-modeclass 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_rulesfilter.<?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?
-
We recommend using our website support forum as the primary method for requesting features and getting help. You can also reach out via our Discord support server or the WordPress.org support forum, but please note that WordPress.org doesn’t always notify us of new posts, so it’s not ideal for time-sensitive issues.
-
Why does the redirect sometimes stay after I disable maintenance mode?
-
If a redirect was issued previously as a permanent redirect (HTTP 301) it can be cached by browsers and upstream caches (CDNs, reverse proxies). A cached 301 tells clients "this URL has moved permanently” and many browsers and proxies will continue using the cached result without checking the origin again.
What we do now:
- The plugin explicitly sends temporary redirects (HTTP 302) and uses no-cache headers to avoid creating new cached permanent redirects.
- We also provide a JavaScript fallback (enqueued script) for rare situations where headers were already sent before the redirect could be emitted.
How to fix it for visitors who still see the redirect:
- Browser: Ask affected users to hard-refresh the page or clear their browser cache. On most browsers a hard refresh is Ctrl+F5 (Windows) or Cmd+Shift+R (macOS).
- CDN / Reverse Proxy: If you use Cloudflare, Fastly, Varnish, nginx proxy_cache, or another caching layer, purge the cache for the affected URL (or do a full purge if necessary). On Cloudflare you can purge a single URL from the dashboard or use their API.
- Server configs: Ensure no server-level rewrite or redirect (nginx/apache) has permanently redirected the route.
جائزے
There are no reviews for this plugin.
شراکت دار اور ڈیویلپرز
“Simple Maintenance Redirect” اوپن سورس سافٹ ویئر ہے۔ مندرجہ ذیل لوگوں نے اس پلگ ان میں حصہ لیا:
شراکت دار“Simple Maintenance Redirect” کا اپنی زبان میں ترجمہ کریں۔
ڈویلپمینٹ میں دلچسپی ہے؟
کوڈ براؤز کریں، ایس این وی ریپوزیٹری کو چیک کریں یا ڈویلپمینٹ لاگ کو سبسکرائب کریں بذریعہ آر ایس ایس۔
چینج لاگ
1.1.2
- Fix: Caching redirects
1.1.1
- Fix: Login page blocked if redirected to a different page
1.1.0
- Update: New support links
1.0.1
- Initial Release on April 28, 2025

