WordPress Maintenance Mode: Fix Stuck In Maintenance Mode

It’s a happy feeling when your WordPress website is going smooth. You have the maximum reach, hitting goals, getting conversions. But surrounding changes gives you many reasons to stop and think. No doubt, WordPress serves it’s best but like other tools, it also needs to keep in WordPress maintenance mode.

Being a successful online entrepreneur, it is necessary to keep your site in WordPress maintenance mode. Because without frequent care, your site does not run smoothly and may affect your business.

That’s why put your site in WordPress maintenance mode because it is a process display a notice “site is under maintenance” to your users instead of broken a site.

When you put your WordPress site on maintenance mode, it is temporarily inaccessible and this unexpected change can down your site ranking in search engine. But to run the latest version of plugins, themes, and WordPress core; we need to update. Therefore, it’s necessary to put your WordPress website offline during maintenance.

Now you need to know when to plan the WordPress maintenance with viewers respect and how to get out of it. If you are aware of WordPress files and codes then the task is quite easy. But if you are not aware, then don’t hesitate to outsource WordPress Support help.

Now get an entire overview of WordPress maintenance mode;

What is WordPress maintenance mode?

WordPress maintenance mode stuck is a process which can apply to your WordPress site to keep maintain and run smoothly. It takes care of some administrative tasks that can harm your site performance.

For example, your WordPress setup is made up of various parts including WordPress software itself, WordPress hosting, WordPress plugins, and themes. You need to put these site’s parts in maintenance mode to keep the best working of your site.

Hence, it’s best to set WordPress maintenance mode. Make sure that your site should be offline during the maintenance mode because some changes may lose your site ranking. And create a “site is under maintenance” landing page so that users can understand the site is under construction.

When to plan WordPress maintenance mode?

WordPress maintenance is a time taking process and until the maintenance mode is on, the visitors are not able to see your site. So try to put your website in maintenance mode in the duration in which your site is getting minimum traffic.

When you decided to put your site in maintenance, create a beautiful landing page showing “site is under construction” or site is under maintenance mode or “website is temporarily disabled” etc. Due to this, the users will understand that the site is temporarily out of service and it will be live soon.

But the question is – when and why you should use WordPress maintenance mode process;

When and Why you use WordPress maintenance mode?

Without putting your site in maintenance mode, you can also customize your WordPress site for minor changes, but sometimes for major changes, you may require to work on your site for a longer time, for ex, when you manually configuring a new plugin or setting up a new theme. At the same time, you need to put your site in maintenance mode so that your site does not show a broken page to your visitors.

Fast forward, in case your site has numerous traffic, so a single site owner doesn’t want their visitor see a broken page because it creates a bad impression on your brand.

And applying WordPress maintenance mode allows you such solutions – alternative links to visit, a user-friendly notification, and give a time frame once the maintenance will be done. It creates a good impression and user satisfaction between your visitors.

Use can use the same strategy for the new site to put WordPress maintenance mode.

Over to this, let’s see how to fix WordPress maintenance mode stuck;

How to put a WordPress site in maintenance mode with and without plugins?

There are mainly four methods to set WordPress maintenance mode

  1. Use the WordPress maintenance inbuilt features
  2. By using a .htaccess file
  3. Display a maintenance page via custom coding
  4. WordPress maintenance mode plugins

Let’s get cracking!

Enable WordPress maintenance mode without plugin (manually)

Method 1: By using the WordPress maintenance function

The WordPress maintenance function is an inbuilt feature apply automatically during the updation of WordPress themes, plugins, and WordPress core. But it is a very simple process. During the updation process, it shows a message that represents the site is in under construction. After completed the updation, maintenance mode is deactivated auto.

WordPress Maintenance Mode

However, the updating process doesn’t take a long time to update but still, at the same time, your site will replace by this splash page:

WordPress Maintenance Splash Page

A temporary file .maintenance file” creates this page. You will see this file only in your WordPress file directory during the WordPress updates. Note that this method does not cover all things, it only covers when you update things via a WordPress core update mechanism.

Method 2: By using .htaccess

This technique is only for Apache server user. By using you can get control access to the directories within the server and send a response code of the server status.

Here, you can use a 503 status code. This code will show that the “server is temporarily unavailable”. Before you edit .htaccess, it’s necessary to create a new file in .html or .php format and add a message in the file like:

maintenance page view

Now edit your .htaccess file in your server and add the following code lines:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^123\.456\.789\.000
RewriteCond %{REQUEST_URI} !/maintenance.html$ [NC]
RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC]
RewriteRule .* /maintenance.html [R=503,L]

The mentioned above code redirect all web requests (coming to site homepage) to maintenance.html file. But note that, very first you will have to create this maintenance.html file because you will be using this as a temporary homepage replacement.

Now bending towards the points –

To add this code login to your website and click on Appearance➤Editor. Thereafter, find out function.php at the left and add the code in the bottom of the function.php file.

Method 3: Display a maintenance page using custom coding

You can also display a maintenance page by using custom coding. We are going to mention a code, just you have to add this code to your function.php file.

// Activate WordPress Maintenance Mode
function wp_maintenance_mode() {
if (!current_user_can(‘edit_themes’) || !is_user_logged_in()) {
wp_die(‘<h1>Under Maintenance</h1><br />Something ain’t right, but we’re working on it! Check back later.’);
add_action(‘get_header’, ‘wp_maintenance_mode’);

This process apply maintenance mode on your site and shows a message “Under Maintenance” (that you want to show) with H1 tag. See the below screenshot;

Manual WordPress Maintenance Mode

Now logout or disable WordPress site and see your site is in action.

Method 4:  Put your WordPress site in maintenance mode with plugins

There are a lot of WordPress maintenance mode plugins to put your site in maintenance mode. Each & every come with its own distinct features and work also in case of WordPress maintenance mode not working manually (via discussed above method).  Here, we will discuss some most popular plugin which let you turn on WordPress maintenance mode.

1. WP Maintenance mode plugin

wp maintenance page plugin

With 5-star rating, it is a most popular, powerful, and free maintenance mode plugin that is designed by Designmodo. WP maintenance mode plugin allows you to add a page which shows that your site is down for maintenance. You can also add the date and countdown timer to show the time after you will connect with your user again. It has a structured theme that you can customize as per your choice like a different background, colors, and content.

Additionally, with the help of this plugin, you can add things such as email forums, social media links, contact forms, and use a date with a countdown timer. It also works with WordPress multisite installs.

The features of WP maintenance mode plugin are as follows:

  • Customizable color, text, and background;
  • Subscription form;
  • Coming soon page;
  • Contact Form;
  • Landing page;
  • WordPress Multisite;
  • Responsive design;
  • Social media icons;
  • Works with any WordPress theme;
  • SEO options;
  • Exclude URLs from maintenance;
  • The Bot functionality allows collecting emails in a friendly and efficient way.
  • GDPR(General Data Protection Regulation) Ready.

Now the question is how to setup maintenance mode using this WP maintenance mode plugin, let’s see;

Setting up maintenance mode via WP maintenance mode plugin

The very first install and activate the plugin. For more info: How to install a WordPress plugin.

After the activation process, go to the Setting>>WP Maintenance Mode to configure the plugin settings.

wp maintenance mode

[Image source: www.wpbeginner.com]

Now you will see five tabs on your plugin screen. Under the first one General tab, there is a “status” option which is deactivated by default. You have to activate it if you want to keep your site in maintenance mode.

If you want to see your site to search engine during the maintenance mode, set the “Bypass for Search Bots” option (next to status) to Yes. We recommend setting this option to Yes if you have an established site.

Fast forward, during the maintenance mode, WP maintenance mode plugin allows users to have full access to your site. Means you can login to your WordPress dashboard and see the working website.

During this mode, you can define which user roles should have access to the front and backend of the site. However, it is set to Administrator role by default.

Rest all options on the plugin page are self-explanatory. After all the entire settings, press the save settings button to save your changes.

Create your own splash page for maintenance mode

Create a beautiful maintenance mode landing page with this plugin to show your site is in maintenance mode. For the same, click the Design tab on the plugin setting page.