Problem Description
When updating WordPress core, plugins, or themes, you may encounter a situation where your site becomes inaccessible after the update and displays the following message:
正在执行例行维护,请一分钟后回来
Briefly unavailable for scheduled maintenance. Check back in a minute
Root Cause
This issue typically occurs when a WordPress update fails due to a network interruption, timeout, or other unexpected error, but the system does not automatically exit "maintenance mode." When WordPress begins an update, it creates a temporary file named .maintenance in the website's root directory to inform visitors that the site is under maintenance. If the update process is interrupted, this file may not be deleted automatically, causing the site to remain stuck on the maintenance page.
Solution
The solution is straightforward: manually remove the flag file that triggers maintenance mode.
Step-by-Step Instructions
- Connect to Your Server: Use an FTP client (e.g., FileZilla) or SSH to access your website's server.
- Locate the Root Directory: Navigate to your WordPress installation directory, which contains files like
wp-config.phpand folders likewp-content. - Find and Delete the File: In the root directory, look for a file named
.maintenance(note the leading dot; you may need to enable "Show hidden files" in your FTP client). - Delete the File: If found, delete this file.
- Refresh Your Site: After deletion, refresh your website's front end. Access should be restored immediately.
Additional Notes & Prevention
- File Location: The
.maintenancefile must be in the WordPress root directory, at the same level as other core files. - Manual Maintenance Mode: You can also place this file in the root directory to manually put your site into maintenance mode. The file content can be customized to display a specific message.
- Preventive Measures: Before performing major updates (especially core or multiple plugin updates), it is advisable to:
- Back up your website files and database.
- Perform updates during periods of low traffic.
- Ensure your server environment (PHP version, memory limit, etc.) meets update requirements.
- If updates frequently fail, consider manually uploading update files via FTP or checking the network connection between your server and the WordPress update servers.
After deleting the .maintenance file, your website should return to normal operation.