Sébastien Laframboise

WordPress stuck in maintenance mode after an update

WordPress stuck in maintenance mode after an update

One WordPress stuck in maintenance mode can be worrying, especially when the issue appears right after updating a plugin, a theme, or WordPress itself. The site then displays a message saying it’s temporarily unavailable for maintenance, but the situation doesn’t resolve.

In most cases, I can fix this issue fairly quickly. However, it’s important to understand why WordPress stays in this state before doing further updates.

Why WordPress stays stuck in maintenance mode

When an update starts, WordPress temporarily creates a file named .maintenance in the site’s root folder. This file prevents visitors from accessing the site while some files are being replaced.

Normally, WordPress automatically removes this file when the operation is complete. However, if the update is interrupted or fails, the file can remain. The site will then continue to display the maintenance message.

How to unlock WordPress after an update

To resolve the issue, I usually start by accessing the site files via the host’s file manager or with an FTP connection.

  1. I open the root folder of the WordPress installation.
  2. I look for the file named .maintenance.
  3. I delete only that file.
  4. I then reload the site in my browser.
  5. I also check the WordPress admin to confirm everything is working properly.

The official WordPress documentation also recommends deleting this file when an update fails and leaves the site in maintenance mode.

What to check after removing the .maintenance file

The site coming back doesn’t necessarily mean the previous update completed successfully. I therefore take a few minutes to check WordPress’s overall state.

  • I check for updates for WordPress, themes, and plugins.
  • I visit a few important pages of the site.
  • I check whether the admin shows an error.
  • I confirm that the plugin or theme in question is functioning normally.

Why a WordPress update can fail

Several situations can interrupt an update: a server connection that drops, a file permissions issue, a lack of resources, or an error triggered during installation.

In practice, I advise against immediately triggering several updates at once if the site has just experienced a problem. It’s better to check its status and have a recent backup before proceeding.

Avoid another lockout in maintenance mode

Before a major update, I always recommend a reliable backup of the site and its database. When several plugins need updating, I also prefer to proceed gradually on more sensitive sites. That way, it becomes much easier to identify the source of a problem.

Regular maintenance also helps reduce the risk of accumulating obsolete plugins or having multiple major updates to perform at once.

A WordPress site stuck in maintenance mode usually repairs well

One WordPress stuck in maintenance mode after an update therefore does not necessarily indicate a serious problem. I start by checking the .maintenance file, then make sure the update actually completed correctly. If the site remains inaccessible or shows other errors, I can take deeper action. My WordPress services are also available in my online store.