Linux 软件免费装
Banner图

Simple Maintenance Redirect

开发者 apos37
更新时间 2026年6月11日 05:23
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

redirect coming soon maintenance mode construction staging

下载

1.1.2.1 1.0.1 1.1.1 1.1.0 1.1.2 1.1.3

详情介绍:

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: How It Works: 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.

安装:

  1. Upload the plugin files to the /wp-content/plugins/simple-maintenance-redirect/ directory.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. 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-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?

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.
If the problem persists after clearing your browser cache and CDN, you can use the Clear Cache Everywhere plugin to flush all cache layers from your WordPress dashboard.

更新日志:

1.1.3 1.1.2.1 1.1.2 1.1.1 1.1.0 1.0.1