How to disable automatic maintenance mode during WordPress development

I’m working on a WordPress site and keep running into an annoying issue. Whenever an automatic update fails or when I’m testing updates that cause errors, WordPress automatically switches the site into maintenance mode. This is really frustrating when I’m developing because I actually want to see what happens when things break.

Sometimes I deliberately cause update errors just to test how the system responds, but then WordPress locks me out with the maintenance screen. Is there a way to completely turn off this automatic maintenance mode behavior? I need to be able to work on my site without WordPress constantly putting up the maintenance page every time something goes wrong during updates.

I’ve tried looking in the admin settings but can’t find any option to disable this feature. Any help would be appreciated.

u can try deleting the .maintenance file in your root dir. it gets left behind sometimes after failed updates. also, adding define(‘WP_DEBUG’, true) in wp-config.php helps u see real errors instead of that maint. page.

To resolve the automatic maintenance mode during development, consider adding the line define('AUTOMATIC_UPDATER_DISABLED', true); to your wp-config.php file. This will prevent all automatic updates, thus keeping you out of maintenance mode. If you only wish to disable core updates while keeping plugin updates active, use define('WP_AUTO_UPDATE_CORE', false); instead. Additionally, enable error logging to identify issues without encountering the maintenance screen. Just be sure to remove these configurations before your site goes live to ensure you receive essential security updates.

Here’s another trick - create a custom drop-in file that overrides the maintenance mode. Just make a file called maintenance.php in your /wp-content/ directory and add a simple bypass for your dev environment. WordPress loads this instead of the default maintenance screen. Add some conditional logic to check if you’re on localhost or your dev domain, then return false or redirect to your site. I’ve used this for years and it’s rock solid. No more deleting maintenance files or forgetting to re-enable updates later. You get way more control over when maintenance mode actually triggers during development.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.