Resources     Blog  

  1. Home
  2. WordPress Tutorials
  3. How to Repair the WordPress Unavailable for Scheduled Maintenance Error

How to Repair the WordPress Unavailable for Scheduled Maintenance Error

WordPress is one of the most stable and popular content management systems on the Internet. However, it does have its own issues when it comes to updating and developer compatibility. This often leads to common problems that are easy to fix. One of those is the WordPress “unavailable for scheduled maintenance” error.

In this tutorial, I’ll show you how to remove the problem when you see “Briefly unavailble for scheduled maintenance” in WordPress.

What is the Scheduled Maintenance Error?

This particular error isn’t really an error at all. It’s actually a notification page. This is a default message that is displayed when something within the site is being updated. Usually, these updates happen rather quickly which means visitors should be unaware of most of them.

However, sometimes an update will get “stuck” and the site remains in maintenance mode.

Another contributor to this error is system resources. If the server is experiencing heavy lag or is low on memory, WordPress is unable to update its files. This is because it is having issues connecting with the WordPress.org server for updates.

An interruption can also prevent WordPress from taking the site out of maintenance mode. For instance, a timeout response from the system could essentially lock it down so it can’t revert back.

Fixing the Scheduled Maintenance Error in WordPress

Before you continue, make sure your site is using the most current version of WordPress. If WordPress itself timed-out during its update, it could throw this error to visitors.

One of the best methods in this situation is perhaps using FTP to manually update WordPress. This gives you the opportunity to make sure an automatic system like Softaculous isn’t causing the issue or timing out on its own.

You can always choose to update WordPress using automated systems. But what if they are the ones that are actually prevent WordPress from successfully updating?

Delete the Maintenance File

Once you’re sure WordPress is updated, delete the “.maintenance” file. This is located in the website’s root folder of your web host, and it’s hidden.

Using FileZilla
If you use FileZilla as your FTP program for the update, go to Server and click, “Force showing hidden files.”

FileZilla Hidden Files

Using cPanel’s File Manager
You can also update WordPress using File Manager in cPanel instead of FileZilla. To show hidden files in this browser app, go to Settings and click “Show Hidden Files.” Once you click “Save,” the .maintenance file should appear.

File Manager Hidden Files

Visitors will continue to see the scheduled maintenance error in WordPress unless the .maintenance file is removed.

Customizing the Message on the Maintenance Mode Page

If you want to engage your visitors and leave them a more informative message, you can create a “maintenance.php” file and customize it. In fact, you can use all kinds of CSS and PHP coding in this page to deliver a completely unique appearance.

You can easily create the PHP file by using a text editor on your computer system. For example, I can load up Notepad and paste the code into a new file saved as “maintenance.php.”

All you need to do is place this code within a new maintenance.php file:


<?php
$protocol = $_SERVER[“SERVER_PROTOCOL”];
if ( ‘HTTP/1.1’ != $protocol && ‘HTTP/1.0’ != $protocol )
$protocol = ‘HTTP/1.0’;
header( “$protocol 503 Service Unavailable”, true, 503 );
header( ‘Content-Type: text/html; charset=utf-8’ );
?>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<body>
<h1>This site is being updated. Here is where a custom message would go to tell visitors what’s going on.</h1>
</body>
</html>
<?php die(); ?>

Note the message, “This site is being updated…” Here is where you can input any message you’d like for your visitors to see.

Once you saved maintenance.php on your computer, upload the file to the wp-content folder of your website.

Upload File

If All Else Fails, Restore

If you are unable to fix the problem of WordPress being unavailable due to maintenance, you can always restore using a back up copy. This is one of the biggest reasons why I suggest to always have a saved copy of the site. It makes a difference when problems like this arise.

Keep your site properly maintained and operating efficiently. Any downtime you experience could result in a loss of income as well as reputation from visitors.

Have you had errors in WordPress you couldn’t explain? What kind of coding fixes have you made on your website?

Author: Kaumil Patel

Kaumil Patel is the Chief Operating Officer of GreenGeeks and has over 13 years of experience in the web hosting industry working for and owning web hosting companies. Kaumil’s expertise is in marketing, business development, operations, acquisitions and mergers.

Was this article helpful?

Related Articles

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.