Skip to content

Enabling and customizing maintenance mode in WordPress

Maintenance mode allows you to temporarily take your WordPress site offline while performing updates, testing, or development work. Visitors will see a maintenance message instead of your live site. On ruachost.com, you can enable and customize maintenance mode easily.

  • Prevents visitors from seeing incomplete or broken updates.
  • Provides a professional message instead of errors.
  • Useful during plugin/theme updates, migrations, or testing.
  1. Log in to your hosting account via cPanel or SSH.

  2. Navigate to the directory where WordPress is installed (usually public_html).

  3. Create a file named .maintenance using a text editor.

  4. Add the following code:

    <?php $upgrading = time(); ?>
  5. Save the file.

  6. WordPress will now display the default maintenance message:

    Briefly unavailable for scheduled maintenance. Check back in a minute.

✅ To restore normal site operation, simply delete the .maintenance file.

  1. Navigate to the wp-content directory of your WordPress installation.

  2. Create a file named maintenance.php.

  3. Add your custom HTML/PHP code to design the page. Example:

    <!DOCTYPE html>
    <html>
    <head>
    <title>Site Under Maintenance</title>
    <style>
    body { text-align: center; font-family: Arial; padding: 50px; }
    h1 { color: #333; }
    </style>
    </head>
    <body>
    <h1>We’ll be back soon!</h1>
    <p>Our site is currently undergoing scheduled maintenance. Please check back later.</p>
    </body>
    </html>
  4. Save the file.

  5. WordPress will use maintenance.php instead of the default message whenever maintenance mode is active.