RBA Cash Rate: 4.35% · 1AUD = 0.67 USD · Inflation: 5.4%  
Leading Digital Marketing Experts | 1300 235 433 | Aggregation Enquires Welcome | Book Appointment
Example Interest Rates: Home Loan Variable: 5.00% (5.13%*) • Home Loan Fixed: 5.39% (6.11%*) • Fixed: 5.39% (6.11%*) • Variable: 5.00% (5.13%*) • Investment IO: 5.59% (7.06%*) • Investment PI: 5.10% (6.04%*)

Create a Custom Maintenance Page (Upgrading Plugins & Themes)

Whenever WordPress updates its core, or a plugin is updated, your website will go into maintenance mode and display a message that reads: Briefly unavailable for scheduled maintenance. Check back in a minute.

This WP snippet supports an article in our blog, "Redirect WordPress Websites That Are Under Construction". Read it here.

While the article linked to above details how to create longer-term and more complex redirects, all you have to do to alter WordPress' generic message is follow two simple steps.

Step 1

Upload a file called .maintenance to your WordPress root (the same location as index.php). Note that the file has a dot before maintenance - not unlike your .htaccess file. Inside of the file, copy the following:

1
<?php 
2
$upgrading = time();

Because WordPress has a 10-minute expiry on the file, using the current time ensures that it will remain valid. Of course, you could use a specific timestamp if you wanted the site live at a particular moment. WordPress checks for the existence of this file when wp-includes/load.php is called.

Step 2

Upload a file into your wp-contents directory called maintenance.php. This file may contain all your HTML style and other code to your liking.

Further Reading

  • wp_maintenance() in load.php .
  • enable_maintenance_mode filter() on WP.org .
  • wp_maintenance() on WP.org

Considerations

This hack is a permanent solution to an "under construction" page (or until .maintenance is deleted). Many themes now include this file as part of their core code. At some point we'll likely integrate this feature into one of our own plugins.

Download our 650-page guide on Finance Marketing. We'll show you exactly how we generate Billions in volume for our clients.

  AUS Eastern Standard Time (Washington)

  Want to have a chat?
 

Like this article?

Share on Facebook
Share on Twitter
Share on Linkdin
Share on Pinterest

Leave a comment