Article directory
Wordpress The maintenance mode is stuck, and my website is completely bricked.
Yesterday, a friend called me, sounding very anxious, saying that his WordPress website suddenly became inaccessible, and all visitors were seeing a page that read, "Unable to perform scheduled maintenance temporarily, please come back in one minute."
He thought it was a server problem, so he restarted it three times, changed the DNS twice, and spent more than an hour messing around with it, but the website was still the same.
I told him not to panic, I know this problem very well.
To be honest, my own website has also experienced this issue, and more than once.

What exactly is the WordPress maintenance mode?
WordPress's maintenance mode is ultimately a good thing. Whenever you need to update the core, plugins, or theme, WordPress automatically switches the website to maintenance mode, allowing you to safely update files without showing visitors a partially updated and crippled page.
Normally, this process takes only a few seconds, so fast that you won't even notice it.
However, sometimes WordPress can be unpredictable. It might freeze halfway through an update, or you might accidentally close your browser, or update too many things at once and confuse the system, causing it to remain in maintenance mode.
Then your website will be useless.
Visitors see "Temporarily unable to perform regular maintenance", and you can't log in to the backend either; the entire website seems to be locked.
When I first encountered this situation, I was truly stunned.
Because I had no idea what was going on, I thought my website had been hacked, or the server had crashed, and I even considered whether the domain name had expired.
It was later discovered that WordPress had encountered a minor issue during the update, causing it to fail to properly exit maintenance mode.
Why am I stuck in maintenance mode?
The reason WordPress gets stuck in maintenance mode is because it created a file named .m in the website's root directory.aiThe WordPress file tells WordPress, "I am currently under maintenance, do not allow visitors to enter."
Normally, WordPress will automatically delete this file after the update is complete. However, if the update encounters an error, this file will remain there, and your website will continue to display maintenance mode.
The first method to fix WordPress maintenance mode
So how do we fix it?
It's actually very simple.
The solution is to manually delete the .maintenance file.
Here's how to do it: You need to use an FTP tool to connect to your website server, such as FileZilla or WinSCP. Once connected, go to the root directory of your website, which is where the wp-config.php file is located.
Then you'll see a bunch of files, including one called .maintenance. Just delete it.
After deleting everything, refresh your website, and you'll find that the maintenance mode has disappeared and the website is back to normal.
It's that simple.
The second method: Modify the wp-activate.php file
However, what if the website still shows up in maintenance mode after you delete the .maintenance file?
That means there's another place that needs to be modified.
There is another file called wp-activate.php in the root directory. Open it with a text editor and you will see a line of code: define('WP_INSTALLING', true). Change true to false, save the file, and the problem will be solved.
When I first encountered this problem, I deleted the .maintenance file, but the website still didn't work. Then I checked wp-activate.php, modified it, and it worked.
To be honest, the process isn't difficult, but if you don't know this thing exists, you can get stuck for a long time.
So I think it's necessary to write this down, just in case you encounter it in the future.
Suggestions for preventing WordPress maintenance mode errors
Honestly, WordPress is a pretty interesting system; it allows...Building websiteIt becomes incredibly simple, but sometimes its simplicity can cause people to overlook some fundamental aspects.
For example, when updating, it's best not to update too many things at the same time. It's also best to back up your data first, and don't close the browser while updating.
These all sound like common sense, but people tend to forget them when they're in a hurry.
Okay, that's all for today's sharing. If you found it helpful, feel free to share it with friends who might need it. See you next time!
Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ The article "How to Fix a WordPress Website: Routine Maintenance in Progress, Please Be Back in a Minute?" shared here may be helpful to you.
Welcome to share the link of this article:https://www.chenweiliang.com/cwl-34444.html
