WordPress Core Upgrade Maintenance Mode Persistence
0 reputation · 15 Jul 2025, 17:10 UTC
Core Update Maintenance State
WordPress utilizes a .maintenance file in the site root to signal a maintenance state during core upgrades. This mechanism ensures that visitors do not interact with a partially updated codebase, displaying a standard "Briefly unavailable" message until the process completes.
Upgrade Failure Behavior
When a core upgrade fails—due to factors such as file permission restrictions or network interruptions—the .maintenance file may persist in the root directory. Because the Recovery Mode feature introduced in WordPress 5.2 is designed for fatal errors in plugins or themes rather than core upgrade failures, the site remains in maintenance mode even if the server is otherwise operational.
This creates a state where the site is inaccessible to the public, but the system lacks an automated mechanism to clear the flag or roll back the partial file changes upon failure detection.
- Does WordPress provide a programmatic way to detect a stalled upgrade state without manual file system access?
- Is there a configuration to define a maximum timeout for the
.maintenancefile that triggers an automatic exit?