Oops! I Broke WordPress! How to Fix Your Auto-Update Problems

picture of masonLast week our ever-enthusiastic Help and Support Dude broke the internet.

Okay, so I exaggerate. He gave in to the nag message and pressed the “please update now” button on a WordPress installation, taking down one of our test sites. While no one was looking he craftily fixed the problem and then disappeared into the sunset.

If you’re an everyday end user, the WordPress auto-update button may seem like a godsend but it can cause endless trauma when you end up with a message like this:

Message that says "Briefly unavailable for scheduled maintenance. Check back in a minute."

WordPress experts will know instantly how to fix it, but plenty of people will be like “OMG! WHAT AM I GOING TO DO NOW?!

It is actually remarkably easy to fix. As the message “Briefly unavailable for scheduled maintenance. Check back in a few minutes,” suggests, WordPress has created a maintenance file and placed it in your root directory.

Here’s how to get it:

1. Log in to your FTP and navigate to the root of your website. There you’ll find that pesky file. It’s called “.maintenance“:

maintenance file in root folder

2. Delete the file

Done!

That was easy!!!

Tip: This tends to happen with WordPress websites that have been installed using a 1-Click install like Fantastico. If you have installed with Fantastico you should update as outlined below.

How Do I Update WordPress Correctly?

This method does take longer than the one-click method but you’re much less likely to have problems.

  1. Backup (you should be doing this regularly anyway!)
  2. De-activate all plugins
  3. Download the latest version of WordPress
  4. Unzip WordPress
  5. Upload new versions of the wp-admin and wp-includes directories
  6. Upload new versions of root files except wp-config.php
  7. Choose any files from wp-content that you want (do this carefully – don’t upload the whole folder at once as you could overwrite important data!)
  8. Visit the home page, run database upgrade if prompted
  9. Re-activate plugins one by one.

MOST IMPORTANTLY! Don’t let Help and Support Dudes with itchy fingers near your site.

Comments (12)

  1. While this is an important piece of information for high volume sites, the .maintenance file will automatically expire after 10 minutes — so it’s not *really* the end of the world if it still exists.

  2. I agree, especially for the typical web dev that tends to be extremely impatient. There’s more to this problem than the simple creation of the .maintenance file though.

    When the site is on a host with strict permissions the .maintenance file often can’t be deleted: this is the case on most Windows-hosted WP sites I’ve seen. I never understood why the .maintenance file wouldn’t be created within the wp-uploads folder. That would have made more sense to me…but the functions that relate to the .maintenance file are not designed to be overloaded or provide alternatives. Sad, really.

    There was a bug report/ticket on this topic submitted 9 months ago, and I provided a workaround on that thread to upload a default .maintenance file that would prevent the dreaded “down for maintenance” issue that sites with strong permission controls experience. The ticket is still open, with no clear indication that it’s going to be resolved anytime soon.

  3. The wordpress automatic upgrade plugin suffers the same problems (especially on strong security servers), and also has an additional point of failure (index.php.wpau.php.bak). Finally, since it caches the FTP authentication information, you should be careful about using it on any system that has shared access or uses plugins or themes that perform custom reads of the metadata tables, or it could put you at even greater risk.

  4. One of the reasons I hate this is that some plugins lose all of their settings by simply deactivating them. I wish there was an easier way, or at least a better standard from authors of plugins.

Participate