How to manually enable and customize maintenance mode in WordPress

4. In the root folder of your WordPress installation, click New File

5. Name the file .maintenance, making sure to include the dot (.) at the beginning. 

9. The file opens in the File Manager editor. Add the following lines to the file:

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

Disabling manual maintenance mode

When you’re finished updating your site and want to disable manual maintenance mode, you can delete the .maintenance file. However, if you think you might put your site in maintenance mode in the future, you may want to rename the file instead of deleting it. This way, the next time you want to enable maintenance mode, you can rename it to .maintenance instead of creating a new file.

  1. Right-click the .maintenance file and select Rename.
  2. Name the file any descriptive name you want and click Rename File. In this example, we’re calling it .maintenance-disabled.

Your site is now displayed normally to visitors.

Customizing the maintenance mode message

Follow these steps to customize the message site visitors see when the site is in maintenance mode.

  1. Log in to your HostPapa Dashboard.
  2. Click My cPanel. 
  3. In the Files section, click File Manager.

4. In the root folder of your WordPress installation, open the wp-content subfolder. 

5. Click New File. 

6. Name the file maintenance.php and click Create New File.

7. Right-click the maintenance.php file and click Edit.

8. Add the HTML or PHP code you want to use to display the maintenance mode message and click Save Changes. In this example, we’re creating a simple message with text and an image.

<html>
<head><title>Offline for maintenance</title></head>
 <body>
 <h2 style="text-align: center;">Sorry, we're currently offline for scheduled maintenance. 
We'll be back soon!</h2>
 <p style="text-align: center;"><img src="https://example.com/wp/wp-content/uploads/2018/01/clouds.jpg" width="600" height="400" /></p> 
 </body>
</html>
«
»
ACF (3)
Admin Column (4)
Amps (9)
Breadcrumbs (2)
CSS (6)
Custom post types (4)
Custom Taxonomies (3)
Customizer (4)
Furniture (3)
Hooks & Filters (3)
Jquery (9)
LAMP (10)
Login (5)
Meta boxes (6)
Multisite (2)
My Code (1)
Open Graph Meta Tags (1)
Pedals (9)
Redirects (2)
SEO (4)
Theme Building (5)
Title Tags (2)
Tuners (3)
Turntables (2)
Typography (3)
Uncategorised (57)
User Roles & Capabilities (2)
White labeling (9)
Working with Images (11)
Working with videos (2)
WP Database (1)