Title: Maintenance Redirect
Author: Peter Hardy-vanDoorn
Published: <strong>Juni 13, 2010</strong>
Last modified: Pébruari 10, 2026

---

Search plugins

![](https://ps.w.org/jf3-maintenance-mode/assets/banner-772x250.jpg?rev=2845135)

![](https://ps.w.org/jf3-maintenance-mode/assets/icon.svg?rev=2134384)

# Maintenance Redirect

 By [Peter Hardy-vanDoorn](https://profiles.wordpress.org/petervandoorn/)

[Download](https://downloads.wordpress.org/plugin/jf3-maintenance-mode.2.2.1.zip)

 * [Details](https://su.wordpress.org/plugins/jf3-maintenance-mode/#description)
 * [Reviews](https://su.wordpress.org/plugins/jf3-maintenance-mode/#reviews)
 *  [Installation](https://su.wordpress.org/plugins/jf3-maintenance-mode/#installation)
 * [Development](https://su.wordpress.org/plugins/jf3-maintenance-mode/#developers)

 [Support](https://wordpress.org/support/plugin/jf3-maintenance-mode/)

## Description

This plugin is intended primarily for designers / developers that need to allow 
clients to preview sites before being available to the general public or to temporarily
hide your WordPress site while undergoing major updates.

Any logged in user with WordPress administrator privileges will be allowed to view
the site regardless of the settings in the plugin. The exact privilege can be set
using a filter hook – see FAQs.

The behaviour of this plugin can be enabled or disabled at any time without losing
any of the settings configured in its settings pane. However, deactivating the plugin
is recommended versus having it activated while disabled.

When redirect is enabled it can send 2 different header types. “200 OK” is best 
used for when the site is under development and “503 Service Temporarily Unavailable”
is best for when the site is temporarily taken offline for small amendments. If 
used for a long period of time, 503 can damage your Google ranking.

A list of IP addresses can be set up to completely bypass maintenance mode. This
option is useful when needing to allow a client’s entire office to access the site
while in maintenance mode without needing to maintain individual access keys. See
FAQ below about working through a proxy.

Access keys work by creating a cookie on the user’s computer that will be checked
for when maintenance mode is active. When a new key is created, a link to create
the access key cookie will be emailed to the email address provided. Access can 
then be revoked either by disabling or deleting the key.

This plugin allows three methods of notifying users that a site is undergoing maintenance:

 1. They can be presented with a simple message.
 2. They can be presented with a custom HMTL page.
 3. They can be redirected to a static HTML page. This static page will need to be 
    uploaded to the server via FTP or some other method. This plugin DOES NOT include
    any way to upload the static page file. Any URL can be used here, and it doesn’t
    need to be on the same server (so you could redirect back to the client’s current
    site if you’re working on a dev site, for example). However, it should NOT be the
    URL of a WordPress page or post on the same site as this will result in an infinite
    redirect loop.

## Screenshots

 * [[
 * About & Info tab
 * [[
 * Header Type tab
 * [[
 * Unrestricted IP Addresses tab
 * [[
 * Access Keys tab
 * [[
 * Maintenance Message tab showing Message only
 * [[
 * Maintenance Message tab showing Redirect
 * [[
 * Maintenance Message tab showing HTML

## Installation

 1. Upload the `jf3-maintenance-mode` folder to your plugins directory (usually `/wp-
    content/plugins/`).
 2. Activate the plugin through the `Plugins` menu in WordPress.
 3. Configure the settings through the `Maintenance Redirect` Settings panel.

## FAQ

### What does Maintenance Redirect block?

This plugin is designed to block only the normal display of pages in the web browser.
It will not effect any other calls to WordPress, such as the Rest API.

This means that services such as the PayPal and Stripe integrations in WooCommerce,
for example, are still able to function for testing WooCommerce stores.

It also means that all of the usual WordPress REST endpoints are active. If you 
wish to completely lock down your site’s data then you will need to find an additional
solution to block those calls.

### How can I bypass the redirect programatically?

There is a filter which allows you to programatically bypass the redirection block:

**`wpjf3_matches`**

This allows you to run pretty much any test you like, although be aware that the
whole redirection thing runs _before_ the `$post` global is set up, so WordPress
conditionals such as `is_post()` and `is_tax()` are not available.

This example looks in the `$_SERVER` global to see if any part of the URL contains“
demo”

    ```
    function my_wpjf3_matches( $wpjf3_matches ) {
        if ( stristr( $_SERVER['REQUEST_URI'], 'demo' ) ) 
            $wpjf3_matches[] = "<!-- Demo -->";
        return $wpjf3_matches;
    }
    add_filter( "wpjf3_matches", "my_wpjf3_matches" );
    ```

_Props to @brianhenryie for this!_

### How can I let my logged-in user see the front end?

By default, Maintenance Redirect uses the `manage_options` capability, but that 
is normally only applied to administrators. As it stands, a user with a lesser permissions
level, such as editor, is able to view the admin side of the site, but not the front
end. You can change this using this filter:

**`wpjf3_user_can`**

This filter is used to pass a different WordPress capability to check if the logged-
in user has permission to view the site and thus bypass the redirection, such as`
edit_posts`. Note that this is run before `$post` is set up, so WordPress conditionals
such as `is_post()` and `is_tax()` are not available. However, it’s not really meant
for programatically determining whether a user should have access, but rather just
changing the default capability to be tested, so you don’t really need to do anything
other than the example below.

    ```
    function my_wpjf3_user_can( $capability ) {
        return "edit_posts";
    }
    add_filter( "wpjf3_user_can", "my_wpjf3_user_can" );
    ```

### Does this work through a proxy?

Yes, there is no problem when using access keys. However, using the IP address whitelist
is now a little more problematic as, due to an over-zealous security researcher,
I have been forced to drop the support for testing the http X-FORWARDED-FOR header
which supplies the original IP address rather than the proxy IP address. This is
unfortunate as it means that you will have to whitelist the proxy’s IP address rather
than the end-user’s address.

## Reviews

![](https://secure.gravatar.com/avatar/2e1e237840b4363c7a399adc4484f464cf038bfa6f2fd2e8462b8a513bb5f328?
s=60&d=retro&r=g)

### 󠀁[Excellent plugin](https://wordpress.org/support/topic/excellent-plugin-9649/)󠁿

 [Mauro](https://profiles.wordpress.org/maurofon/) Agustus 14, 2025 3 replies

The plugin is very good and is always my choice when I have to develop a new project.
I have a small but important suggestion: Add a code editor to Maintenance Mode HTML.
It is difficult to keep the code tidy without it.

![](https://secure.gravatar.com/avatar/3090072eb9d04fb0bb67a40d9931ccf07b7a7b36d4c4b61641789a91388693cd?
s=60&d=retro&r=g)

### 󠀁[Works perfectly](https://wordpress.org/support/topic/works-perfectly-2826/)󠁿

 [crdunst](https://profiles.wordpress.org/crdunst/) Januari 31, 2025

Really easy to use, and does the job perfectly. Thanks.

![](https://secure.gravatar.com/avatar/301865dafe109f5a0d5eedd5e0181bbdf7d9a264f56695c725e64c47190c1c2e?
s=60&d=retro&r=g)

### 󠀁[Amazing job](https://wordpress.org/support/topic/please-let-me-know-how-to-fix-my-website/)󠁿

 [veetihsu](https://profiles.wordpress.org/veetihsu/) Januari 9, 2023

It works just fine. Definitely recommend!!

![](https://secure.gravatar.com/avatar/3a0d4408354ac7f1fddc273366daae9126187a427e91b7798e3502d2ba499b4d?
s=60&d=retro&r=g)

### 󠀁[A lifesaver! Lightweight, no cruft plugin. Where can I donate?](https://wordpress.org/support/topic/a-lifesaver-lightweight-no-cruft-plugin-where-can-i-donate/)󠁿

 [Anne-Mieke Bovelett](https://profiles.wordpress.org/annebovelett/) Januari 2, 
2023 3 replies

Great plugin! I used to apply password protection via Plesk (HTTP Auth) to shield
my playgrounds. But now I am in a situation where that affects what I am doing in
the backend. Creating a site with Cwicly, which starts puking when you use HTTP 
Auth, unless you know how to whitelist your server, which I don’t. I’m not a hoster.
Maintenance Redirect is the PERFECT solution. Simple to set up, no screaming “buy
our pro” messages (there is no pro, as far as I know). Dear developers, tell me,
how can I buy you coffee?

![](https://secure.gravatar.com/avatar/0e020a82fa1a18ecb6f9469ae631c8130ab6a6e5d61262d0f31a9ae5d685c093?
s=60&d=retro&r=g)

### 󠀁[Very useful, no nonsense plugin](https://wordpress.org/support/topic/very-useful-no-nonsense-plugin-2/)󠁿

 [Bence Fodor](https://profiles.wordpress.org/webmotion/) Nopémber 18, 2022

It works well and does not have a premium offering. The link generation feature 
is super useful. There was an issue recently with PHP 8.x and it was fixed quite
quickly. Thanks, Peter!

![](https://secure.gravatar.com/avatar/6449942ea38ca3296c7fe1af687fdb113d3a02de215c78472b24384815762a6f?
s=60&d=retro&r=g)

### 󠀁[This is perfect](https://wordpress.org/support/topic/this-is-perfect-25/)󠁿

 [pinkeyegraphics](https://profiles.wordpress.org/pinkeyegraphics/) Oktober 23, 
2022

This plugin is great. I’ve used various other ‘coming soon’ type plugins and this
is the best. It allows me to easily show clients their website before launch, and
work on a site with the public seeing a custom holding page. And it’s light, free,
and well-updated. I will be using this again.

 [ Read all 24 reviews ](https://wordpress.org/support/plugin/jf3-maintenance-mode/reviews/)

## Contributors & Developers

“Maintenance Redirect” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Peter Hardy-vanDoorn ](https://profiles.wordpress.org/petervandoorn/)
 *   [ jfinch3 ](https://profiles.wordpress.org/jfinch3/)

[Translate “Maintenance Redirect” into your language.](https://translate.wordpress.org/projects/wp-plugins/jf3-maintenance-mode)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/jf3-maintenance-mode/),
check out the [SVN repository](https://plugins.svn.wordpress.org/jf3-maintenance-mode/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/jf3-maintenance-mode/)
by [RSS](https://plugins.trac.wordpress.org/log/jf3-maintenance-mode/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 2.2.1

 * Fixed conflict with PublishPress Capabilities plugin’s admin notices cleanup 
   function. Thanks to @manni02 for bringing that to my attention.

#### 2.2

 * Updated minimum requirements for WP (6.1).
 * Added built-in WordPress code editor to the HTML field. Thanks to @maurofon for
   the idea to do this.

#### 2.1.1

 * Updated minimum requirements for PHP (7.4).
 * Removed the checking of X-FORWARDED-FOR header to get the IP address for the 
   whitelisting bypass as some over-zealous security researcher says that can be
   spoofed. Access through a proxy must now be made by whitelisting the proxy IP
   rather than the end-user’s.

#### 2.0.1

 * Added clarification to readme and on-screen info about the scope of what this
   plugin blocks (see FAQs)

#### 2.0

 * Updated minimum requirements for WP (5.1) and PHP (5.6).
 * Updated the UI with tabs for each of the sections.
 * Changed the activation method from a select menu to a toggle switch.
 * Split the HTML and Message storage in the database to separate fields. When the
   plugin is updated the message text should be copied across, but please do double-
   check. _I suggest that you make a copy of your message or HTML before updating
   just in case._
 * Tweaked the HTML used for the Message option.
 * Added an option to delete all of the plugin’s settings and database tables the
   next time that the plugin is deleted using the Plugins screen. There are caveats–
   see the About & Options tab in the plugin settings page for more info.
 * Added responsive styling for the IP addresses and Access Keys tables to better
   display on mobile phone screens.
 * Tidied up some of the on-screen information.
 * Added an about section with a link to “buy me a coffee” 🙂
 * Additional minor code tweaks

#### 1.8.3

 * Fixed sprintf() PHP warning.

#### 1.8.2

 * Added plugin status to the admin bar.
 * Fixed bug where body text was being output twice.

#### 1.8.1

 * Fixed Update Settings button not working.

#### 1.8

 * Added button to copy full URL of an Access Key link to the clipboard.
 * You can now click on your IP or Class C address to add it to the unrestricted
   IP addresses field.
 * General hardening of translated text escaping.

#### 1.7

 * Added links to plugin screen and the dashboard notification to go to the Settings
   page.
 * Added information to the Site Health screen.

#### 1.6

 * Added `wpjf3_matches` filter to allow programatical bypasses. Thanks to @brianhenryie
   for this.
 * Added `wpjf3_user_can` filter to allow the WordPress capability check to be changed
   so logged-in users can be allowed to bypass the redirect.

#### 1.5.3

 * Fixed ability to set IP address using Class C wildcard (eg, 192.168.0.*) – thanks
   to @tsouts for bringing that to my attention.

#### 1.5.2

 * Tiny translation tweak

#### 1.5.1

 * Phooey! Found a couple of translation strings that I missed on the previous commit!

#### 1.5

 * Now translatable! I’m a typical Englishman who doesn’t speak any other language,
   so at time of release there aren’t any translation packs available. However, 
   if you’re interested in contributing, just pop over to https://translate.wordpress.
   org/ and get translating!
 * Minimum WordPress requirement now 4.6 due to usage of certain translation bits&
   bobs.

#### 1.4

 * Plugin taken over by @petervandoorn due to being unmaintained for over 4 years.
 * Changed name to Maintenance Redirect
 * Setting added to choose whether to return 200 or 503 header
 * Added nonces and other, required, security checks
 * General code modernisation

#### 1.3

 * Updated to return 503 header when enabled to prevent indexing of maintenance 
   page.
 * Also, wildcards are allowed to enable entire class C ranges. Ex: 10.10.10.*
 * A fix affecting some installations using a static page has been added. Thanks
   to Dorthe Luebbert.

#### 1.2

 * Fixed bug in Unrestricted IP table creation.

#### 1.1

 * Updated settings panel issue in WordPress 3.0 and moved folder structure to work
   properly with WordPress auto install.

#### 1.0

 * First release. No Changes Yet.

## Meta

 *  Version **2.2.1**
 *  Last updated **2 months ago**
 *  Active installations **10.000+**
 *  WordPress version ** 6.1 or higher **
 *  Tested up to **6.9.4**
 *  PHP version ** 7.4 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/jf3-maintenance-mode/)
 * Tags
 * [coming soon](https://su.wordpress.org/plugins/tags/coming-soon/)[developer](https://su.wordpress.org/plugins/tags/developer/)
   [maintenance](https://su.wordpress.org/plugins/tags/maintenance/)[maintenance mode](https://su.wordpress.org/plugins/tags/maintenance-mode/)
   [redirect](https://su.wordpress.org/plugins/tags/redirect/)
 *  [Advanced View](https://su.wordpress.org/plugins/jf3-maintenance-mode/advanced/)

## Ratings

 4.9 out of 5 stars.

 *  [  21 5-star reviews     ](https://wordpress.org/support/plugin/jf3-maintenance-mode/reviews/?filter=5)
 *  [  3 4-star reviews     ](https://wordpress.org/support/plugin/jf3-maintenance-mode/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/jf3-maintenance-mode/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/jf3-maintenance-mode/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/jf3-maintenance-mode/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/jf3-maintenance-mode/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/jf3-maintenance-mode/reviews/)

## Contributors

 *   [ Peter Hardy-vanDoorn ](https://profiles.wordpress.org/petervandoorn/)
 *   [ jfinch3 ](https://profiles.wordpress.org/jfinch3/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/jf3-maintenance-mode/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://paypal.me/fabulosawebdesigns)