How to Set Up Maintenance Mode in WordPress Using cPanel

How to Set Up Maintenance Mode in WordPress Using cPanel

How to Set Up Maintenance Mode in WordPress Using cPanel

How to Set Up Maintenance Mode in WordPress Using cPanel

Learn how to enable WordPress maintenance mode using cPanel tools such as File Manager or custom code for plugin-free site updates and safe changes.

 

What is Maintenance Mode in WordPress?

Maintenance mode temporarily disables access to your website’s public pages, displaying a simple message like “We’ll be back soon” while you make updates, install plugins, or change themes. It helps keep your site professional and user-friendly during backend work.

Method 1: Create a .maintenance File Using cPanel File Manager

  1. Log into your cPanel via your hosting provider.
  2. Click on File Manager under the “Files” section.
  3. Navigate to your site root directory: /public_html/
  4. Click on + File at the top and name the file: .maintenance
  5. Edit the file and paste the following code:
    
    <?php
    $upgrading = time();
    ?>
              
  6. Save the file and close the editor.

Result: WordPress now displays its default “Briefly unavailable for scheduled maintenance” message to visitors.

Method 2: Create a Custom Maintenance Page

If you want a custom message, follow these extra steps:

  1. In the same /public_html folder, create a new file called maintenance.html
  2. Insert custom HTML like this:
    
    <!DOCTYPE html>
    <html>
    <head><title>Maintenance Mode</title></head>
    <body>
      <h1>Site Under Maintenance</h1>
      <p>We are currently working on updates. Please check back soon.</p>
    </body>
    </html>
              
  3. Create or edit the .htaccess file and insert:
    
    RewriteEngine On
    RewriteCond %{REQUEST_URI} !/maintenance.html$
    RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123
    RewriteRule ^(.*)$ /maintenance.html [R=302,L]
              
  4. Replace 123.123.123.123 with your IP address to allow admin access during maintenance.

Method 3: Use a Maintenance Mode Plugin (Alternative)

If you prefer not to use cPanel, you can log in to WordPress and install one of the following plugins:

  • WP Maintenance Mode
  • SeedProd – Maintenance, Coming Soon & Landing Pages
  • Maintenance by WebFactory

These plugins offer customizable maintenance templates, countdowns, and even newsletter signup forms.

How to Turn Off Maintenance Mode

To bring your site back online:

  • Delete the .maintenance file in /public_html.
  • Or remove the rewrite rules and maintenance.html file if using the .htaccess method.
  • If using a plugin, disable it from your WordPress dashboard.

Final Tips

  • Use 302 redirects (temporary) to avoid SEO penalties.
  • Always test the maintenance page in a different browser or incognito mode.
  • Whitelist your IP address to retain admin access.

 

 

Post Your Comment

Build Your Website with HiveRift

From professional business to enterprise, we’ve got you covered!

©2025, Hosting. All Rights Reserved by KhatuShyam Technologies

HiveRift
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.