How to Put Your WordPress Site into Maintenance Mode

I’ve been working with WordPress for years and I’ve always been a bit intimidated by the whole maintenance mode thing.

It just seemed like a complicated process and I wasn’t sure if I was doing it right.

But recently I discovered a new approach that’s changed my whole perspective.

Let me tell you all about it!

Why Put Your Website into Maintenance Mode?




Before we dive into the technical stuff let’s talk about why maintenance mode is even important.

Think about it: you’re working hard to make your website the best it can be adding new features tweaking the design updating content and maybe even implementing a whole new theme.

But all this work is happening behind the scenes and your visitors have no idea what’s going on.

They might stumble upon a half-finished page see broken elements or even encounter an annoying error message.

That’s where maintenance mode comes in.

It’s like putting up a “closed for renovations” sign but for your website.

It lets your visitors know that you’re busy working on something exciting and that they should check back later.

The Benefits of Using Maintenance Mode

Now let’s break down the benefits of using maintenance mode:

1. Maintaining Professionalism

Imagine you’re visiting a store and find the entire shop in disarray with shelves empty and tools scattered everywhere.

Would you trust that business? Probably not.

Your website is your online storefront and a broken or incomplete site can give visitors a similar impression.

Using maintenance mode ensures a clean and professional experience even during updates.

2. Enhancing User Experience

No one likes encountering errors or broken pages.

Maintenance mode allows you to control the information visitors see during updates preventing frustration and potentially even improving their perception of your site.

3. Protecting Your Reputation

Imagine your website is down for an extended period due to technical issues and visitors are met with an error message.

It can damage your reputation making them question your credibility and professionalism.

Using maintenance mode you can provide a clear and concise explanation of the situation maintaining a positive image even while your site is under construction.

Choosing the Right Method: Plugins Code or .htaccess

Now that you understand the benefits of maintenance mode let’s talk about how to implement it.

There are three main approaches:

1. The Plugin Powerhouse

The easiest and most user-friendly method is using a plugin.

It’s perfect for beginners and anyone who wants to avoid coding.

There are plenty of great options available but my personal favorites are:

  • WP Maintenance Mode: This free plugin is simple to use and offers a visual customizer for creating an aesthetically pleasing maintenance page. It lets you personalize the message add a countdown timer and even connect to your social media accounts.

  • SeedProd: A freemium solution that excels at creating eye-catching coming soon and maintenance mode landing pages. It’s compatible with almost any WordPress theme and lets you customize 404 error pages as well.

  • Maintenance: This plugin is all about functionality and utility. It enables a 503 “Service Temporarily Unavailable” message and allows you to add branding elements like your logo and a background image. Plus the premium version offers over 200 pre-made templates.

2. The Code-Savvy Approach

If you’re comfortable with code you can manually activate maintenance mode by adding a snippet to your theme’s functions.php file.

This method offers more control over the design and functionality of your maintenance page.

Here’s the code snippet you can use:

add_action( 'wp_footer' 'add_maintenance_mode_message' );

function add_maintenance_mode_message() {
  if ( !is_user_logged_in() ) {
    ?>
    <div id="maintenance-mode-message">
      <p>Our website is currently under maintenance.

We'll be back soon!</p>
      <p>Please check back later.</p>
    </div>
    <?php
  }
}

Important Note: Always back up your website before making any changes to its files.

3. The .htaccess Hack

The .htaccess file is a powerful tool for controlling how your website behaves.

You can use it to activate maintenance mode by creating a maintenance.html file and adding a few lines of code to .htaccess.

Here are the steps:

  1. Create a new file named maintenance.html in your website’s root directory.
  2. Add the message you want to display on your maintenance page to this file.
  3. Open your .htaccess file and paste this code at the bottom:
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/maintenance.html$
RewriteRule ^.*$ /maintenance.html [LR=302NC]

Remember: Always create a backup before making any changes to your .htaccess file.

Creating a Custom Maintenance Mode Page

The default maintenance mode page in WordPress can be pretty basic.

But with a little creativity you can make it more visually appealing and informative.

1. Using Plugins for Customization

Plugins like WP Maintenance Mode and SeedProd offer a wide range of customization options.

You can change the message add a countdown timer include social media links and even customize the design elements.

2. Building a Page with Elementor

If you want to create a truly custom maintenance mode page Elementor is a fantastic option.

This powerful page builder plugin gives you complete control over the design and functionality of your maintenance page.

Here’s how to create a maintenance page with Elementor:

  1. Install and activate the Elementor plugin.
  2. Navigate to Templates → Add New and select Page as the template type.
  3. Give your template a name and select Create Template.
  4. Open the Elementor editor and select Elementor Canvas from the page settings to create a blank canvas.
  5. Choose a template from the library or start from scratch.
  6. Use the Elementor interface to add and customize content using various widgets.
  7. Save your template once you’re satisfied with the design.
  8. Go to Elementor → Tools and select the Maintenance Mode tab.
  9. Choose between Maintenance Mode and Coming Soon Mode.
  10. Select the template you created from the Choose Template dropdown.
  11. Save Changes to activate maintenance mode.

Taking Your Website Out of Maintenance Mode

Once your updates are complete it’s time to take your website out of maintenance mode.

The process depends on the method you used to activate it.

1. Using Plugins

If you used a plugin like WP Maintenance Mode simply deactivate the plugin from the Settings → WP Maintenance Mode → General section.

2. Removing Code Snippets

If you added code to functions.php or .htaccess you’ll need to remove that code to bring your website back online.

Use the same method you used to add the code to delete it.

For example if you edited functions.php via FTP navigate to the file delete the code snippet and save the changes.

3. Deleting Maintenance.html

If you used the .htaccess method delete the maintenance.html file and save the changes to your .htaccess file.

Tip: After taking your website out of maintenance mode check the frontend to ensure it’s working as expected. You may need to clear your browser cache for the changes to take effect.

Troubleshooting Maintenance Mode Issues

Sometimes you might encounter problems with maintenance mode such as your website getting stuck in maintenance mode.

This can happen due to a conflict that prevents the maintenance file from recognizing that updates are complete.

1. Deleting Maintenance.html

If you can’t log in to your website connect via FTP or your web host’s file manager navigate to the root directory and delete the maintenance.html file.

2. Clearing Cache and Refreshing Browser

After deleting the maintenance.html file refresh your website in a new browser tab and try clearing your browser cache.

The Final Word on Maintenance Mode

Using maintenance mode in WordPress is essential for maintaining a professional online presence and providing a positive user experience during website updates.

Choosing the right method and customizing your maintenance page will further enhance your visitors’ perception of your brand and keep them coming back for more.

I hope this detailed guide has demystified maintenance mode for you and given you the confidence to implement it on your own website! Remember the best way to learn is through experience.

So go ahead and try it out!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top