{"id":517,"date":"2025-03-18T09:00:42","date_gmt":"2025-03-18T10:00:42","guid":{"rendered":"https:\/\/kerrprogroup.com\/?p=517"},"modified":"2025-03-19T12:24:57","modified_gmt":"2025-03-19T12:24:57","slug":"how-to-put-your-wordpress-site-in-maintenance-mode","status":"publish","type":"post","link":"https:\/\/kerrprogroup.com\/index.php\/2025\/03\/18\/how-to-put-your-wordpress-site-in-maintenance-mode\/","title":{"rendered":"How to Put Your WordPress Site in Maintenance Mode"},"content":{"rendered":"

There are times when you need to temporarily take your WordPress site offline, whether for updates, troubleshooting, or redesigns. Instead of displaying a broken or unfinished site, maintenance mode allows you to show visitors a professional message while you work behind the scenes.<\/p>\n

Unlike a regular page, a maintenance page uses the 503 standard HTTP status code<\/a>, which tells search engines the downtime is temporary and prevents SEO penalties.<\/p>\n

In this article, we\u2019ll walk you through a couple of different ways to implement this maintenance page. Let\u2019s check it out.<\/p>\n

Use Built-in Maintenance File<\/h4>\n

WordPress has a built-in maintenance mode that activates when you update your site. It creates a .maintenance<\/code> file in the root directory of your site. This file contains the message you want to show visitors and the time the maintenance mode was activated. Likewise, you could create a .maintenance<\/code> file manually to put your site in maintenance mode.<\/p>\n

You can create the file, .maintenance<\/code>, at the root of your WordPress site installation where the wp-config.php<\/code> file resides, as you can see below:<\/p>\n

\"Screenshot<\/figure>\n

Then put this code below within the file:<\/p>\n

\r\n\r\n<\/pre>\n

This will immediately activate WordPress maintenance mode. If you call the built-in wp_is_maintenance_mode<\/code> function, it should return true<\/code>, confirming that maintenance mode is active. When you reload the page, WordPress will display the default maintenance message.<\/p>\n

\"WordPress<\/figure>\n
Customizing the Maintenance Page<\/h5>\n

The default maintenance message is simple and plain.<\/p>\n

You can customize it by creating a custom maintenance page named maintenance.php<\/strong> within the wp-content<\/code> directory. You can add a custom message and styles to the page to make it more appealing to visitors or make it fit better with your overall site design.<\/p>\n

Here is an example code you can put within the file:<\/p>\n

\r\n\n\n\n    \n    Maintenance<\/title>\n    \n    \n    #container {\n        display: flex;\n        width: 100vw;\n        height: 100vh;\n        padding-inline: 20vw;\n        box-sizing: border-box;\n        text-align: center;\n        justify-content: center;\n        align-items: center;\n        flex-flow: column wrap;\n    }\n    \n\n\n    <div id=\"container\">\n        <h1>Maintenance<\/h1>\n        <p>Our website is currently undergoing scheduled maintenance. We should be back shortly. Thank you for your patience.<\/p>\n    <\/div>\n\n    \r\n<\/pre>\n<p>Now, when you reload your site, you should see the entire page rendered with the updated content and styles from this <code>maintenance.php<\/code> file.<\/p>\n<figure class=\"border-solid-1\"><img decoding=\"async\" loading=\"lazy\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" alt=\"Custom WordPress maintenance page example\" width=\"1000\" height=\"212\" class=\"lazyload\" data-src=\"https:\/\/kerrprogroup.com\/wp-content\/uploads\/2025\/03\/page-maintenance-message.jpg\"><\/figure>\n<p>The problem with this file is that you cannot use WordPress functions such as <code>wp_head<\/code>, <code>wp_title<\/code>, <code>wp_footer<\/code>, <code>esc_html_e<\/code>, etc. This means that you cannot display the site title, enqueue assets like stylesheets and JavaScript files, or any other dynamic content rendered using WordPress functions within this file.<\/p>\n<p>That\u2019s why, as you can see above, we\u2019ve only added static content and linked stylesheets statically as well.<\/p>\n<p>This leads to additional problems, such as the inability to translate content on the maintenance page. And since stylesheets can\u2019t be dynamically enqueued, the maintenance page design may feel out of place if you change your theme.<\/p>\n<h4>Use a Plugin<\/h4>\n<p>The easiest way to enable maintenance mode on your WordPress site is by using a plugin. There are several options available, but in this article, we\u2019ll use <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/wordpress.org\/plugins\/syntatis-feature-flipper\/\">Feature Flipper<\/a>. This plugin includes various utilities, one of which allows you to activate maintenance mode easily.<\/p>\n<p>After installing and activating the plugin, navigate to <strong>Settings > Features > Site<\/strong> and enable the <strong>\u201cMaintenance\u201d<\/strong> option. As we can see below, you can also customize the maintenance page content to match your needs.<\/p>\n<figure class=\"border-solid-1\"><img decoding=\"async\" loading=\"lazy\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" alt=\"Feature Flipper plugin maintenance mode settings interface\" width=\"1000\" height=\"600\" class=\"lazyload\" data-src=\"https:\/\/kerrprogroup.com\/wp-content\/uploads\/2025\/03\/maintenance-setting.jpg\"><\/figure>\n<p>The maintenance page automatically inherits styles from your active theme to ensure that the page seamlessly matches your theme\u2019s styles. If you change your theme, the maintenance page will adapt to the new styles accordingly.<\/p>\n<p>Here\u2019s how it looks with some of the popular themes from the WordPress.org repository:<\/p>\n<h5><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/wordpress.org\/themes\/twentytwentyfive\/\">TwentyTwentyFive<\/a><\/h5>\n<figure class=\"border-solid-1\"><img decoding=\"async\" loading=\"lazy\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" alt=\"Maintenance mode page using Twenty Twenty-Five theme\" width=\"1000\" height=\"600\" class=\"lazyload\" data-src=\"https:\/\/kerrprogroup.com\/wp-content\/uploads\/2025\/03\/theme-2025.jpg\"><\/figure>\n<h5><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/wordpress.org\/themes\/twentytwentyfour\/\">TwentyTwentyFour<\/a><\/h5>\n<figure class=\"border-solid-1\"><img decoding=\"async\" loading=\"lazy\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" alt=\"Maintenance mode page using Twenty Twenty-Four theme\" width=\"1000\" height=\"600\" class=\"lazyload\" data-src=\"https:\/\/kerrprogroup.com\/wp-content\/uploads\/2025\/03\/theme-2024.jpg\"><\/figure>\n<h5><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/wordpress.org\/themes\/twentytwentyone\/\">TwentyTwentyOne<\/a><\/h5>\n<figure class=\"border-solid-1\"><img decoding=\"async\" loading=\"lazy\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" alt=\"Maintenance mode page using Twenty Twenty-One theme\" width=\"1000\" height=\"600\" class=\"lazyload\" data-src=\"https:\/\/kerrprogroup.com\/wp-content\/uploads\/2025\/03\/theme-2021.jpg\"><\/figure>\n<h4>Wrapping Up<\/h4>\n<p>In this article, we explored two ways to enable maintenance mode on your WordPress site. The built-in method is quick and easy but lacks customization. Meanwhile, a plugin offers more flexibility and makes it easy to toggle maintenance mode on and off directly from the dashboard.<\/p>\n<p>No matter which method you choose, don\u2019t forget to disable maintenance mode once you\u2019re done so your site remains accessible!<\/p>\n<p>The post <a href=\"https:\/\/www.hongkiat.com\/blog\/wordpress-maintenance-mode-guide\/\">How to Put Your WordPress Site in Maintenance Mode<\/a> appeared first on <a href=\"https:\/\/www.hongkiat.com\/blog\">Hongkiat<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are times when you need to temporarily take your WordPress site offline, whether for updates, troubleshooting, or redesigns. Instead of displaying a broken or unfinished site, maintenance mode allows you to show visitors a professional message while you work behind the scenes. Unlike a regular page, a maintenance page uses the 503 standard HTTP status code, which tells search engines the downtime is temporary and prevents SEO penalties. In…<\/p>\n","protected":false},"author":1,"featured_media":519,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[],"_links":{"self":[{"href":"https:\/\/kerrprogroup.com\/index.php\/wp-json\/wp\/v2\/posts\/517"}],"collection":[{"href":"https:\/\/kerrprogroup.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kerrprogroup.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kerrprogroup.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kerrprogroup.com\/index.php\/wp-json\/wp\/v2\/comments?post=517"}],"version-history":[{"count":3,"href":"https:\/\/kerrprogroup.com\/index.php\/wp-json\/wp\/v2\/posts\/517\/revisions"}],"predecessor-version":[{"id":526,"href":"https:\/\/kerrprogroup.com\/index.php\/wp-json\/wp\/v2\/posts\/517\/revisions\/526"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kerrprogroup.com\/index.php\/wp-json\/wp\/v2\/media\/519"}],"wp:attachment":[{"href":"https:\/\/kerrprogroup.com\/index.php\/wp-json\/wp\/v2\/media?parent=517"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kerrprogroup.com\/index.php\/wp-json\/wp\/v2\/categories?post=517"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kerrprogroup.com\/index.php\/wp-json\/wp\/v2\/tags?post=517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}