{"id":131930,"date":"2020-11-25T21:37:02","date_gmt":"2020-11-25T21:37:02","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/hkdev-maintenance-mode\/"},"modified":"2026-08-03T12:48:10","modified_gmt":"2026-08-03T12:48:10","slug":"hkdev-maintenance-mode","status":"publish","type":"plugin","link":"https:\/\/jv.wordpress.org\/plugins\/hkdev-maintenance-mode\/","author":18400925,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"3.2.1","stable_tag":"3.2.1","tested":"7.0.2","requires":"6.2","requires_php":"7.4","requires_plugins":null,"header_name":"Maintenance Mode","header_author":"helderk","header_description":"This plugin allows you to specify a maintenance mode message \/ page for your site as well as configure settings to allow specific users to bypass the maintenance mode functionality in order to preview the site prior to public launch, etc.","assets_banners_color":"","last_updated":"2026-08-03 12:48:10","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/paypal.me\/helderk","header_plugin_uri":"https:\/\/helderk.com\/","header_author_uri":"","rating":4.6,"author_block_rating":0,"active_installs":7000,"downloads":135805,"num_ratings":14,"support_threads":1,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"2.1.2":{"tag":"2.1.2","author":"helderk","date":"2020-11-26 15:05:19"},"2.1.3":{"tag":"2.1.3","author":"helderk","date":"2024-03-04 11:45:20"},"2.1.4":{"tag":"2.1.4","author":"helderk","date":"2024-03-04 11:45:20"},"2.2.1":{"tag":"2.2.1","author":"helderk","date":"2024-03-04 11:45:20"},"2.2.2":{"tag":"2.2.2","author":"helderk","date":"2024-03-04 11:45:20"},"2.2.3":{"tag":"2.2.3","author":"helderk","date":"2024-03-04 11:45:20"},"2.2.4":{"tag":"2.2.4","author":"helderk","date":"2024-03-04 11:45:20"},"2.2.5":{"tag":"2.2.5","author":"helderk","date":"2024-03-04 11:45:20"},"2.2.6":{"tag":"2.2.6","author":"helderk","date":"2024-03-04 11:45:20"},"2.3.1":{"tag":"2.3.1","author":"helderk","date":"2024-03-04 11:45:20"},"2.3.2":{"tag":"2.3.2","author":"helderk","date":"2024-03-04 11:45:20"},"2.4.1":{"tag":"2.4.1","author":"helderk","date":"2024-03-04 11:45:20"},"2.4.2":{"tag":"2.4.2","author":"helderk","date":"2023-05-24 10:59:28"},"2.4.3":{"tag":"2.4.3","author":"helderk","date":"2023-05-24 17:53:39"},"2.4.5":{"tag":"2.4.5","author":"helderk","date":"2023-09-26 15:02:09"},"2.5.0":{"tag":"2.5.0","author":"helderk","date":"2024-03-04 11:45:20"},"3.1.0":{"tag":"3.1.0","author":"helderk","date":"2025-03-03 20:13:15"},"3.1.1":{"tag":"3.1.1","author":"helderk","date":"2025-03-03 20:13:15"},"3.1.2":{"tag":"3.1.2","author":"helderk","date":"2025-03-04 12:47:55"},"3.1.3":{"tag":"3.1.3","author":"helderk","date":"2025-03-07 10:20:35"},"3.2.1":{"tag":"3.2.1","author":"helderk","date":"2026-08-03 12:48:10"}},"upgrade_notice":[],"ratings":{"1":1,"2":0,"3":0,"4":1,"5":12},"assets_icons":{"icon-256x256.png":{"filename":"icon-256x256.png","revision":2426554,"resolution":"256x256","location":"assets","locale":"","width":825,"height":825}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["2.1.2","2.1.3","2.1.4","2.2.1","2.2.2","2.2.3","2.2.4","2.2.5","2.2.6","2.3.1","2.3.2","2.4.1","2.4.2","2.4.3","2.4.5","2.5.0","3.1.0","3.1.1","3.1.2","3.1.3","3.2.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2426554,"resolution":"1","location":"assets","locale":"","width":2306,"height":838},"screenshot-2.png":{"filename":"screenshot-2.png","revision":2481753,"resolution":"2","location":"assets","locale":"","width":1130,"height":889},"screenshot-3.png":{"filename":"screenshot-3.png","revision":2481753,"resolution":"3","location":"assets","locale":"","width":1130,"height":822},"screenshot-4.png":{"filename":"screenshot-4.png","revision":2481753,"resolution":"4","location":"assets","locale":"","width":1132,"height":567},"screenshot-5.png":{"filename":"screenshot-5.png","revision":2481753,"resolution":"5","location":"assets","locale":"","width":954,"height":547},"screenshot-6.png":{"filename":"screenshot-6.png","revision":2481753,"resolution":"6","location":"assets","locale":"","width":1130,"height":582},"screenshot-7.png":{"filename":"screenshot-7.png","revision":2481753,"resolution":"7","location":"assets","locale":"","width":1130,"height":673},"screenshot-8.png":{"filename":"screenshot-8.png","revision":2481753,"resolution":"8","location":"assets","locale":"","width":1132,"height":577},"screenshot-9.png":{"filename":"screenshot-9.png","revision":2481754,"resolution":"9","location":"assets","locale":"","width":1133,"height":837}},"screenshots":[]},"plugin_section":[],"plugin_tags":[802,2275,732,727,733],"plugin_category":[52],"plugin_contributors":[193435,80018,154653],"plugin_business_model":[],"class_list":["post-131930","plugin","type-plugin","status-publish","hentry","plugin_tags-coming-soon","plugin_tags-developer","plugin_tags-maintenance","plugin_tags-redirect","plugin_tags-under-construction","plugin_category-performance","plugin_contributors-helderk","plugin_contributors-jfinch3","plugin_contributors-petervandoorn","plugin_committers-helderk"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/hkdev-maintenance-mode\/assets\/icon-256x256.png?rev=2426554","icon_2x":"https:\/\/ps.w.org\/hkdev-maintenance-mode\/assets\/icon-256x256.png?rev=2426554","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/hkdev-maintenance-mode\/assets\/screenshot-1.png?rev=2426554","caption":""},{"src":"https:\/\/ps.w.org\/hkdev-maintenance-mode\/assets\/screenshot-2.png?rev=2481753","caption":""},{"src":"https:\/\/ps.w.org\/hkdev-maintenance-mode\/assets\/screenshot-3.png?rev=2481753","caption":""},{"src":"https:\/\/ps.w.org\/hkdev-maintenance-mode\/assets\/screenshot-4.png?rev=2481753","caption":""},{"src":"https:\/\/ps.w.org\/hkdev-maintenance-mode\/assets\/screenshot-5.png?rev=2481753","caption":""},{"src":"https:\/\/ps.w.org\/hkdev-maintenance-mode\/assets\/screenshot-6.png?rev=2481753","caption":""},{"src":"https:\/\/ps.w.org\/hkdev-maintenance-mode\/assets\/screenshot-7.png?rev=2481753","caption":""},{"src":"https:\/\/ps.w.org\/hkdev-maintenance-mode\/assets\/screenshot-8.png?rev=2481753","caption":""},{"src":"https:\/\/ps.w.org\/hkdev-maintenance-mode\/assets\/screenshot-9.png?rev=2481754","caption":""}],"raw_content":"<!--section=description-->\n<p>This plugin lets you place a WordPress site into maintenance mode and display a custom message, HTML page, or redirect users to a static page or external URL.<\/p>\n\n<p>It also disables the WordPress REST API while maintenance mode is active, helping keep site data inaccessible during maintenance.<\/p>\n\n<p>Any logged-in user with administrator privileges can be allowed to view the site, and the required capability can be changed through a filter hook. See the FAQ section for details.<\/p>\n\n<p>The maintenance mode behavior can be enabled or disabled at any time without losing the configured settings. However, deactivating the plugin is still recommended when maintenance mode is not needed.<\/p>\n\n<p>The plugin also supports excluding specific pages from maintenance mode so only selected pages remain visible.<\/p>\n\n<p>When maintenance mode is active, the plugin sends no-cache headers to help prevent caching plugins, CDNs, or browsers from storing responses that would bypass the maintenance page.<\/p>\n\n<p>When redirect mode is enabled, the plugin can send two different response codes. \u201c200 OK\u201d is suitable for development environments, while \u201c503 Service Temporarily Unavailable\u201d is better when the site is temporarily taken offline. If used for long periods, 503 may negatively affect search engine visibility.<\/p>\n\n<p>A list of IP addresses can be configured to bypass maintenance mode completely. This is useful for allowing an entire office or client team to access the site without managing individual access keys.<\/p>\n\n<p>Access keys work by creating a key on the user\u2019s computer that is checked while maintenance mode is active. When a new key is created, a link to store the access key cookie is sent to the email address provided. Access can then be revoked by disabling or deleting the key.<\/p>\n\n<p>This plugin offers four ways to present the maintenance experience:<\/p>\n\n<ol>\n<li>A message rendered with WordPress\u2019s wp_die() function, making the experience feel native to WordPress.<\/li>\n<li>A page styled with the active theme\u2019s template.<\/li>\n<li>A custom HTML page.<\/li>\n<li>A redirect to a static page or external URL.<\/li>\n<\/ol>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>hkdev-maintenance-mode<\/code> folder to your plugins directory (usually <code>\/wp-content\/plugins\/<\/code>).<\/li>\n<li>Activate the plugin through the <code>Plugins<\/code> menu in WordPress.<\/li>\n<li>Configure the settings through the <code>Maintenance Mode<\/code> Settings panel.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20can%20i%20bypass%20the%20redirect%20programatically%3F\"><h3>How can I bypass the redirect programatically?<\/h3><\/dt>\n<dd><p>There is a filter which allow you to programatically bypass the redirection block:<\/p>\n\n<p><strong><code>hkdev_matches<\/code><\/strong><\/p>\n\n<p>This allows you to run pretty much any test you like, although be aware that the whole redirection thing runs <em>before<\/em> the <code>$post<\/code> global is set up, so WordPress conditionals such as <code>is_post()<\/code> and <code>is_tax()<\/code> are not available.<\/p>\n\n<p>This example looks in the <code>$_SERVER<\/code> global to see if any part of the URL contains \"demo\"<\/p>\n\n<pre><code>function my_hkdev_matches( $hkdev_matches ) {\n    if ( stristr( $_SERVER['REQUEST_URI'], 'demo' ) ) {\n        $hkdev_matches[] = \"&lt;!-- Demo --&gt;\";\n    }\n    return $hkdev_matches;\n}\nadd_filter( \"hkdev_matches\", \"my_hkdev_matches\" );\n<\/code><\/pre>\n\n<p><em>Props to @brianhenryie for this!<\/em><\/p><\/dd>\n<dt id=\"how%20can%20i%20let%20my%20logged-in%20user%20see%20the%20front%20end%3F\"><h3>How can I let my logged-in user see the front end?<\/h3><\/dt>\n<dd><p>By default, Maintenance Mode uses the <code>manage_options<\/code> cap, 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:<\/p>\n\n<p><strong><code>hkdev_user_can<\/code><\/strong><\/p>\n\n<p>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 <code>edit_posts<\/code>. Note that this is run before <code>$post<\/code> is set up, so WordPress conditionals such as <code>is_post()<\/code> and <code>is_tax()<\/code> 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.<\/p>\n\n<pre><code>function my_hkdev_user_can( $capability ) {\n    return \"edit_posts\";\n}\nadd_filter( \"hkdev_user_can\", \"my_hkdev_user_can\" );\n<\/code><\/pre><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>3.2.1<\/h4>\n\n<ul>\n<li>Bug fixes and code quality improvements<\/li>\n<li>Security and maintenance hardening updates<\/li>\n<\/ul>\n\n<h4>3.2.0<\/h4>\n\n<ul>\n<li>Updated for WordPress 7.0.2 compatibility<\/li>\n<li>Improved security hardening<\/li>\n<li>Improved REST API handling during maintenance mode<\/li>\n<li>Compatibility improvements for admin notices and asset loading<\/li>\n<li>Added no-cache headers while maintenance mode is active to reduce caching conflicts<\/li>\n<\/ul>\n\n<h4>3.1.3<\/h4>\n\n<ul>\n<li>Bug fix<\/li>\n<\/ul>\n\n<h4>3.1.2<\/h4>\n\n<ul>\n<li>Bug fix<\/li>\n<\/ul>\n\n<h4>3.1.1<\/h4>\n\n<ul>\n<li>Updated for WordPress 6.7<\/li>\n<li>Added functionality to disable the WordPress REST API while maintenance mode is active<\/li>\n<li>Security improvements<\/li>\n<\/ul>\n\n<h4>3.0.2<\/h4>\n\n<ul>\n<li>Security improvements<\/li>\n<\/ul>\n\n<h4>3.0.1<\/h4>\n\n<ul>\n<li>Code completely revised and modernized to increase possible risks and vulnerabilities<\/li>\n<li>Implementation of various performance and security improvements<\/li>\n<\/ul>\n\n<h4>2.6.0<\/h4>\n\n<ul>\n<li>Bug fix - Bypass Vulnerability<\/li>\n<\/ul>\n\n<h4>2.5.0<\/h4>\n\n<ul>\n<li>Bug fix - Updated for WordPress WordPress 6.4.1<\/li>\n<li>Minor improvements and fixes<\/li>\n<\/ul>\n\n<h4>2.4.5<\/h4>\n\n<ul>\n<li>Bug fix - conflict with other plugins using Select2<\/li>\n<\/ul>\n\n<h4>2.4.4<\/h4>\n\n<ul>\n<li>Minor fixes<\/li>\n<\/ul>\n\n<h4>2.4.1<\/h4>\n\n<ul>\n<li>Updated for WordPress 6.2.2<\/li>\n<li>Added new attributes to the html editor<\/li>\n<li>Minor improvements and fixes<\/li>\n<\/ul>\n\n<h4>2.3.2<\/h4>\n\n<ul>\n<li>Minor fixes<\/li>\n<\/ul>\n\n<h4>2.3.1<\/h4>\n\n<ul>\n<li>Minor fixes<\/li>\n<\/ul>\n\n<h4>2.3.0<\/h4>\n\n<ul>\n<li>Bug fix<\/li>\n<li>Minor fixes<\/li>\n<\/ul>\n\n<h4>2.2.6<\/h4>\n\n<ul>\n<li>Updated translations<\/li>\n<\/ul>\n\n<h4>2.2.5<\/h4>\n\n<ul>\n<li>Updated for WordPress 6.1.1<\/li>\n<li>Added functionality to resend an access key<\/li>\n<li>Added functionality to copy access keys.<\/li>\n<li>Added functionality to facilitate insertion of IPs<\/li>\n<li>Minor fixes<\/li>\n<\/ul>\n\n<h4>2.2.4<\/h4>\n\n<ul>\n<li>Updated for WordPress 6.0<\/li>\n<li>Minor fixes<\/li>\n<\/ul>\n\n<h4>2.2.3<\/h4>\n\n<ul>\n<li>Updated for WordPress 5.8<\/li>\n<\/ul>\n\n<h4>2.2.2<\/h4>\n\n<ul>\n<li>Bug fix<\/li>\n<\/ul>\n\n<h4>2.2.1<\/h4>\n\n<ul>\n<li>Minor fixes<\/li>\n<\/ul>\n\n<h4>2.2.0<\/h4>\n\n<ul>\n<li>Added functionality to exclude pages from maintenance mode.<\/li>\n<li>Firefox fix<\/li>\n<\/ul>\n\n<h4>2.1.4<\/h4>\n\n<ul>\n<li>Minor fixes<\/li>\n<\/ul>\n\n<h4>2.1.3<\/h4>\n\n<ul>\n<li>Added toggle switch for activating Maintenance Mode<\/li>\n<\/ul>\n\n<h4>2.1.2<\/h4>\n\n<ul>\n<li>Added new allowed html Tags<\/li>\n<li>Minor improvements<\/li>\n<\/ul>\n\n<h4>2.1.1<\/h4>\n\n<ul>\n<li>Added new icon status on admin bar menu<\/li>\n<li>Improve the uninstall function<\/li>\n<\/ul>\n\n<h4>2.1<\/h4>\n\n<ul>\n<li>New settings panel interface for better usability.<\/li>\n<li>Added status indicator on the admin bar menu.<\/li>\n<li>Plugins ready for translation.<\/li>\n<li>Added Portuguese translation (pt-PT)<\/li>\n<li>Security fixes.<\/li>\n<\/ul>\n\n<h4>2.0<\/h4>\n\n<ul>\n<li>First release of the new adaptation of the plugins based on the version created by petervandoorn and modified by jfinch3.<\/li>\n<\/ul>","raw_excerpt":"This plugin is intended primarily for developers who need to allow clients to preview sites before public launch, or temporarily hide a WordPress site &hellip;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/131930","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=131930"}],"author":[{"embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/helderk"}],"wp:attachment":[{"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=131930"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=131930"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=131930"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=131930"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=131930"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=131930"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}