Wordpress Maintenance Mode Without a Plugin (3 Ways)

Blog WordPress
Zee Ahmed
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Do you want to put your WordPress blog into maintenance mode without a plugin?

I have depicted two traditional methods, but one method is unique that only a few people know about it—Cloudflare Edgy. Don’t know what is it? Keep reading.

Did you know?

WordPress has more than 2,000 maintenance mode plugins.

2000 Maintenance Plugins For WordPress

I’m glad you didn’t install any of the plugins and looking for a solution without one. 🙂

In this guide, you’ll learn:

  • What is WordPress maintenance mode?
  • Why activate WordPress maintenance mode without a plugin?
  • 3 ways to put your WordPress site in maintenance mode

What Is WordPress Maintenance Mode?

WordPress Maintenance Mode indicates that the webmaster is repairing, servicing, and fixing the WordPress site. It is used to inform visitors that the webmaster is working on the site, and estimation is also provided about when the site will go live.

Besides, maintenance mode has a server status of 503 that demonstrates the server is currently incapable of managing the request due to a temporary overloading or maintenance of the server, according to RFC—Request for Comments.

Why Activate WordPress Maintenance Mode Without a Plugin?

I have seen sites that use more than 30 plugins and owners complain about why their website gets hacked frequently.

Plugins are responsible for WordPress websites getting hacked.

Plugins Are The Main Reason WordPress Gets Hacked

Even maintenance mode plugins have also been hacked.

Maintenance Plugins Got Hacked

Plugins are not frequently updated and leave the majority of vulnerabilities on the table for hackers.

Hackers won’t try to find vulnerabilities in the core WordPress generally; rather, they focus on plugins and themes since it’s an easy target. Did you know? Hackers can also steal content from websites that have mixed content errors.

Due to the reason being, I strongly recommended that you should activate WordPress maintenance mode without a plugin.

How to Put Your WordPress Site in Maintenance Mode

I’ll explain the three ways in details so that you can easily implement:

1. Hardest Way – .htaccess

In this method, you create a simple HTML file that loads when a user visits your site.

It looks like this:

You can also download the maintenance HTML file for free as shown above from here.

Otherwise, you can copy and paste the below code to make your maintenance HTML file.

<!DOCTYPE html>



<title>Site is down for maintenance</title>

<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″>

<meta name=”viewport” content=”width=device-width, initial-scale=1″ />

<style type=”text/css”>

body {

text-align: center;

padding: 10%;

font: 20px Helvetica, sans-serif;

color: #333;


h1 {

font-size: 50px;

margin: 0;


article {

display: block;

text-align: left;

max-width: 650px;

margin: 0 auto;


a {

color: #dc8100;

text-decoration: none;


a:hover {

color: #333;

text-decoration: none;


@media only screen and (max-width : 480px) {

h1 {

font-size: 40px;







<h1>Site is temporarily unavailable.</h1>

<p>Scheduled maintenance is currently in progress. Please check back soon.</p>

<p>We apologize for any inconvenience.</p>

<p id=”signature”>&mdash; <a href=”mailto:[Email]”>[Name]</a></p>




Upload in the root directory of your website.

Once you’ve uploaded it, paste the following code in your htaccess.

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_URI} !^/maintenance.html$

RewriteRule ^(.*)$ https://example.com/maintenance.html [R=307,L]

2. Easiest Way – Function.php

Funtion.php is a user-friendly way since you don’t need to go to any complicated work.

Rather you just need to paste a piece of code.

Go to Appearance and click Theme Editor.

Funtion.php For Maintenance Mode

Paste the code at the bottom of the file.

function maintenance_mode() {

if ( !current_user_can( ‘edit_themes’ ) || !is_user_logged_in() ) {wp_die(‘Write your message here.’);}


add_action(‘get_header’, ‘maintenance_mode’);

It looks like this:

Maintenance Example


If your theme consists of parent and child themes, you have to paste into the child’s theme function.

You can type any message that will appear to the users upon visiting any page on your blog.

3. Easy Way – Cloudflare Edge App

Cloudflare isn’t only limited to the CDN servers, but it provides many useful apps that you can use on your website without changing anything.

Go to Cloudflare Apps and explore apps that you can use without slowing down your server.

Cloudflare Apps

Find the Edgy app that can be used to put our website in maintenance mode.

Cloudflare Edgy App For Maintenance Purpose

It’s crucial to install Cloudflare on your WordPress site so that Edgy can work.

Is Cloudflare not installed? Sign in to Cloudflare and click to +Add a Site

Cloudflare Add A Site

Enter your domain name.

Enter Your Site In Cloudflare

Select the free plan.

Selecting A Free Plan For Cloudflare

Your DNS records will be scanned and captured by Cloudflare. Click Continue.

Click Continue In Cloudflare That Show All DNS Records

It would be best if you change your nameservers to Cloudflare.

Change Nameservers To Cloudflare

In order to change the nameservers, login to your domain registrar, and find the name servers field. Change the nameservers found on your old hosting provider to the Cloudflare nameservers.

Name Change Name Servers From Your Registrar

Don’t worry; your website will not face any downtime since Cloudflare has received your DNS records.

Wait a few minutes until your website runs on Cloudflare.

Once activated, go to Apps section and search for Edgy.

Edge Cloudflare App

Click on Preview on your site.

Preview Edgy

Now enter your email address, not crucial to be true 🙂

Type Email To Edgy

Scroll down a little, you’ll see Activate Maintenance Mode. Please enable it and save changes.

Activate Maintenance Mode In Edgy Without A Plugin

It will show the maintenance page like this:

Maintenance Exmaple Of Edgy

If you’re not conformable with the above maintenance page, you can create your custom maintenance page.

You can add your HTML code as well in the Edgy app.

Select the option “Render an HTML template that I provide” and paste the HTML code.

Render A HTML Template That I Provide

Final Thoughts

Several methods can be used to put your WordPress blog into maintenance mode without a plugin.

If you’re already using Cloudflare, Edgy is recommended since it’s the fastest and doesn’t put any strain on your servers. The best part? You don’t need to add or edit anything.

If you aren’t a fan of Cloudflare, you should go for the function.php method that is quick and easy. All you need to paste the maintenance code into the function.php and you’re good to go.

Are you a developer? I hope you’ll use the maintenance.html way since it suits your lifestyle since you can change any aspect of the design.

Do you have any other way to put WordPress maintenance mode without a plugin? Did the above ways work for you? Let us know in the comment section.