Skip to content

Stuck .maintenance mode prevents sites from starting #3879

Description

@dknauss

Quick summary

It's easy for users to get a Studio site into a long-lasting white-screen maintenance mode lockout with this frustrating, inaccurate message displayed: "Briefly unavailable for scheduled maintenance. Check back in a minute." One way to reproduce this is to interrupt or abandon a long-running update after .maintenance has been created.

This lockout should clear up after ten minutes, but if the user tries stopping and restarting the site in Studio, they will find it no longer starts at all. Instead, another unhelpfully vague error message suggests the core install files may be incomplete or modified:

Image

Checking for a .maintenance file would be a nice touch here, if only to give the end user a clearer description of why their site won't boot.

Steps to reproduce

  1. Get stuck in maintenance mode. Browse away from many, long, active updates in the admin interface or add a dummy .maintenance file to the root folder for a WordPress instance running in Studio. Typically these contain a single line of PHP with a Unix timestamp indicating when the update/maintenance lock was created. <?php $upgrading = 1781739530; ?> Until 10+ minutes have passed since that timestamp, WordPress will display the maintenance mode WSOD.
  2. Stop and restart the site in the Studio app. Studio will throw its own error message and fail to start.

What you expected to happen

The site should load in maintenance mode, at worst. Ideally, Studio should detect the .maintenance file and possibly report the timestamp, note when it will clear up on its own, and offer to clear it immediately if the user chooses.

What actually happened

Image

Sooner or later, everyone hits this WSOD.

Impact

Some (< 50%)

Available workarounds?

Yes, difficult to implement

Platform

Mac Silicon

Logs or notes

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Fields

    No fields configured for Bug.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions