In WordPress Last updated:
Share on:
Cloudways offers managed cloud hosting for any size business to host a website or complex web applications.

Owning a WordPress site and maintaining the site are two completely different things. You must go through regular maintenance, including backup creation, regular updates, security checks, and content updates.  These tasks may seem daunting, especially for those who lack technical knowledge. 

However, when your site is going through a bigger maintenance, some breathing space is required. This is where WordPress Maintenance Mode helps you make changes on your site without affecting the user experience. It’s like you are putting on a signboard that says construction work Is going on; sorry for the inconvenience. 

When the maintenance mode is on, you can convey all the necessary adjustments to your site. In this article, I’ll introduce you to the WordPress maintenance mode, its necessity, and how you can enable or disable it when required. Learning this will surely help you manage your website in a more efficient manner. 

Challenges in Maintaining a WordPress Site 

Maintaining a WordPress site can involve a lot of tasks & challenges, but the end result is always rewarding. Some common challenges that you’ll face while maintaining a WordPress site can be:


Since most of the websites on the web are powered by WordPress, it’s a honeycomb for hackers. Thus, sites are often facing malware infections, brute force attacks, and errors in themes and plugins. So, the initial solution is to keep your website, themes & plugins updated and use strong passwords. Then, you can think about installing a security plugin that actually works. 

Plugins & Themes

WordPress is going through frequent updates, but plugins and themes may not always catch the pace of it. Compatibility issues can arise with erroneous functionality, layout faults, and more. Thus, it’s crucial to keep plugins and themes updated so that they work properly with the latest WordPress version. 


If your website is loading slowly, it’s degrading the user experience, and your ranking on SERP is going down. In this scenario, you need to implement caching techniques, image compression, content delivery networks, and proper coding.

Backup and Recovery

There are times when you can lose your site data for numerous reasons. It could be server malfunctions, cyber-attacks, accidental deletions, and so on. Therefore, you should regularly keep a backup of your site and have a reliable recovery strategy. 


If you are running a WordPress site that is growing big, it will face performance issues at some point due to a cluttered database. So, you need to run routine optimization and keep your database clean to improve performance and reliability. 

SEO & Content 

Maintaining a satisfying SEO presence and successful content strategy requires constant maintenance. Hence, you need to constantly research potential keywords, optimize the website for search engines, and keep up with the constantly changing search engine algorithms. 

Website Design

It takes smart effort to maintain a flexible and trending website design while also making sure that users are having their preferred experience. So, with the change in user expectations, you need to maintain your site’s design and apply demanding design concepts to it.


A grown-up website means more visitors to accommodate and resources to handle. Thus, you need to expand the infrastructure of your website, which is a challenging maintenance task to handle.

Maintaining compliance with a variety of rules, such as GDPR or data privacy, is another task to complete to keep your site effective. So, you need to update your website along with the latest legal standards and make the necessary adjustments. 

As you can see, there are lots of challenges to handle while maintaining a WordPress site. But with constant updates, security checks, and modifications as per the requirements, you can overcome those challenges. But you should get professional help for handling more sophisticated issues that are out of your expertise.

WordPress Maintenance Mode

Maintenance mode prevents visitors from viewing your website and provides a notice to visitors that you’ve temporarily disabled. It basically acts as a pause button for your website, letting you work on things in the background. 

When your site is in maintenance mode, your visitors will see a notice that the site is under maintenance at the moment. You can personalize this message according to your brand’s voice and style. Besides you can also showcase an approximate time of when your site will be back up and running. 

Showing maintenance mode messages helps to control visitors’ expectations because it stops them from running into broken features or poor loading times. While the maintenance mode is activated, you can take the following actions:

  • Update the WordPress version 
  • Update any theme or plugin 
  • Change any code in the backend
  • Make design changes in the front end
  • Configure a plugin or Theme
  • Make content updates 
  • Fix any errors and security issues 

After you are done taking any of the above-mentioned actions on your site, simply switch to the maintenance mode. Turning off this mode will restore your website back to its original state, with all your updates live and accessible to visitors.

So, by using Maintenance Mode, you can make sure that users have a flawless experience even when there are big changes taking place behind the scenes. It’s a necessary feature for managing your WordPress site efficiently. 

Scenarios for Using WordPress Maintenance Mode

There are certain scenarios when you need to put your WordPress site in maintenance mode. The reason behind it is simple: ensuring a smooth user experience and reduced downtime to preserve the reliability of your site. 

Here are the typical scenarios when turning on the maintenance mode becomes necessary: 

Website Updating 

Updating websites is one of the most frequent use cases of the Maintenance Mode. This can occur when you update the core WordPress themes and plugins.

Sometimes, upgrading a theme or plugin can create brief issues or changes to your site’s functionalities and effectiveness. However, your website  visitors won’t face these issues if you turn on the maintenance mode 

Error Resolving 

Whenever an error occurs on your site or has to be fixed right away, switching to the maintenance mode is an excellent choice. This will let you focus on resolving the problem without worrying about your visitors running across the error message. 

Content Updating 

When you are updating the content of your website, turning on the maintenance mode can be helpful. During the maintenance mode, you can update content on several and even alter the design of your website alongside the content. 

Website Redesigning 

A comprehensive redesign of a website is a big project that can have a big influence on the look and feel of your website. Thus, you should employ Maintenance Mode throughout this whole redesigning process. This will keep the user experience intact by only showing the updated version of your website instead of any broken design.  

Feature Testing

Let’s say you want to introduce new features and functionalities to your website. In this case, activating Maintenance Mode and testing those features won’t hamper the user experience of your visitors. 

Server Shifting 

While moving your site to a new server, some instability or downtime can occur.  Yet, you can maintain a positive user experience throughout this procedure by utilizing the Maintenance Mode. 

Database Maintaining

Database maintenance is a complex task, and during this process, turning on Maintenance Mode is essential. It guarantees that users do not interact with your site while you are optimizing, repairing, or cleaning the database and avoids possible data corruption or slowdowns.  

Security Patching  

It would be upsetting to find a security breach or vulnerability on your website, isn’t it? At this point, Maintenance Mode excels as a safeguard. It enables you to identify and resolve any security concerns without putting your website at increased risk.

I highly recommend you communicate with your audience and keep them informed about the reason behind your site’s maintenance. Also, let them know about the expected downtime so that they come back right when your site is live.    

Enable/Disable WordPress Maintenance Mode

You can turn on the Maintenance Mode of your WordPress site using two different methods. The first one is the manual process in which you can follow two ways –

  • Add a file named .maintenance in your root directory and add some code to it.
  • Or, modify the function.php file and add some code to it. 

However, the second approach is straightforward and requires you to install a plugin. When using a plugin, the process becomes much easier.

I recommend you use the manual approach since adding an extra plugin can slow down your site. But if you are willing to avoid any complexity or hassle of configuring WordPress files on the backend, using the plugin will be wise.

#1. Enable or Disable Maintenance Mode From the Root Directory

To turn on the Maintenace Mode using the .htaccess file, you need to access your hosting provider’s cPanel. Here are the steps you can follow: 

Step 1: After logging into your hosting provider’s account, get into your cPanel.

Step 2: Go to File Manager from your Cpanel 

Step 3: Navigate to the public_html folder, which is the root directory of your WordPress site.

Step 4: Inside this folder, create a .maintenance file and save it.

Step 5: Now right-click the .maintenance file and click edit.

Step 6: Put the following lines of code inside the file and click Save Changes. 

 <?php $upgrading = time(); ?>

Note: This line of code communicates with your WordPress site and indicates that you’re in the process of upgrading your site. 

Step 7: To activate the Maintenance Mode, all you need to do is go to your website. There, you will see a notice indicating that Briefly unavailable for scheduled maintenance. Check back in a minute. 

Step 8 (Optional): Inside the  /wp-content/ directory, you can add a maintenance.php file to modify the maintenance message. Besides, you can develop a unique maintenance page by adding PHP, CSS< and HTML to it. 

Disable Maintenance Mode: In order to turn off Maintenance Mode and restore visitor access to your website, you must remove the .maintenance file after completing your maintenance activities.

Let’s move on to the next manual process of activating maintenance mode. 

#2. Enable or Disable Maintenance Mode Using function.php File 

You can also activate the maintenance mode by modifying the function.php file of your website. But to do so, you need to make modifications to your theme file and put some codes in it. These are the steps you can follow: 

Step 1: Log in to your website and click Appearance > Theme File Editor. Then click the functions.php file located on the right-hand side of the screen.

Step 2: Since you are about to modify the function.php file, create a copy of that file and save it to your device as a backup. 

Step 3: Scroll down at the bottom of the functions.php file, copy the following code, and paste it into the file.

function wp_maintenance_mode(){
    if(!current_user_can('edit_themes') || !is_user_logged_in()){
        wp_die('<h1>Under Maintenance</h1><br />Website under planned maintenance. Please check back later.');
add_action('get_header', 'wp_maintenance_mode');

Note: This code checks if the current user is logged in and can edit themes. If not, it displays a maintenance message.

Step 4: After entering the code, click Update File to save the changes. 

Step 5: Now go to your website to view if the Maintenance Mode is active or not. So, the default maintenance mode page will look like this. 

Disable Maintenance Mode: To disable the Maintenance mode this time, you need to go to the function.php file and simply remove the codes that you’ve previously entered. Then again, you need to click the Update File button to save the changes. That’s it; the Maintenance Mode is now disabled from your site. 

The default maintenance page looks more blunt, and it lacks information. If you want to easily create a maintenance mode page that speaks with your visitors, using a plugin is a better option. Thus, you don’t need to take any manual approach and design your page with more flexibility. 

#3. Enable or Disable Maintenance Mode Using a Plugin 

If you are willing to save your effort by going through the manual process, simply use a plugin. There are various WordPress Maintenance Mode plugins available, but I’ll be using the LightStart plugin. 

Here are the steps you can follow:  

Step 1:  Start by installing and activating the LightStart plugin on your WordPress site.

Step 2: Access the LightStart plugin from the dashboard. 

Step 3: Click on the Design tab. This is where you alter the appearance and feel of the page your visitors will view while in maintenance mode. You will be able to pick & import a template for your maintenance page from here. Don’t forget to save your changes by clicking Save Settings at the bottom.

Step 4: Next, click on the Modules tab. This is where you can add features like Google Analytics tracking code to your maintenance mode page. However, after applying any modification, don’t forget to click Save Settings.

Step 5: Click on the Manage Bot tab to set up a chatbot. From here, you can add a bot name, upload an avatar, set an automated message, and include it in the maintenance mode page. When you are done, click Save Settings again.

Step 6: Go back to the General tab When you are done configuring your Maintenance Mode Page. Switch the status to Activated to turn on the maintenance page on your WordPress site. 

Step 7:  Lastly, make sure your website is in maintenance mode by opening a new browser window and visiting your web address.

Well Done! You’ve successfully put your WordPress site in maintenance mode using the LightStart plugin. 

Final Thoughts 

Now that you know how to enable or disable Maintenance Mode, turn it on before employing any change on your website. I’ve mentioned two manual approaches and one plugin-based approach to enable and disable maintenance mode. You can simply choose one that matches your requirements and skillset. 

You may also read about WordPress companies that are dominating the industry.

Share on:
  • Atanu Das
    Atanu Das is a professional content writer with experience writing SEO-optimized creative content in different niches. He is actively writing effective content for tech companies to expand their business to the next level. He has completed…
  • Narendra Mohan Mittal

    Narendra Mohan Mittal is a versatile and experienced digital branding strategist and content editor with over 12 years of experience. He is a Gold Medalist in M-Tech and B-Tech in Computer Science & Engineering.


Thanks to our Sponsors

More great readings on WordPress

Creating Architecture Runway for the SAFe Portfolio
Creating Architecture Runway for the SAFe Portfolio

Have you ever wondered how it is possible that every time your product owner brings in some new feature topic, the team response is they need to investigate technical possibilities and create some form of design before they can be sure how to develop that feature? Then that’s most likely because you have no Architecture Runway in place.

Power Your Business

Some of the tools and services to help your business grow.
  • The text-to-speech tool that uses AI to generate realistic human-like voices.

    Try Murf AI
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.

    Try Brightdata
  • is an all-in-one work OS to help you manage projects, tasks, work, sales, CRM, operations, workflows, and more.

    Try Monday
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.

    Try Intruder