Has your WordPress maintenance update got stuck or locked and just hanging for a long time, here are some steps you can try to resolve the issue:
Your website may occasionally become trapped in maintenance mode due to unforeseen problems. This could be annoying. But do not fear! In this article, we’ll explain what maintenance mode is, why your WordPress website could become trapped in it, and—most importantly—how to fix it.
Troubleshooting
Manual Deactivation: The simplest solution is to manually deactivate maintenance mode by following these steps:
Access your website’s root directory via FTP or File Manager in cPanel or Plesk.
Look for a file named “.maintenance” and delete it.
Refresh your website, and it should now be out of maintenance mode.
Also when the updater is running, it places a lock code in your websites’ database, to prevent you from damaging your site while in progress. If the problem still persists, you can try the following to remove it.
- Login to phpmyadmin
- Go to the Options table
- Search Core_updater.lock
- Delete that entry.
- Increase the PHP memory limit: You can increase the PHP memory limit by adding the following code to your wp-config.php file:
define('WP_MEMORY_LIMIT', '256M');
- Deactivate plugins: Some plugins may cause conflicts during the update process, try deactivating all plugins and then perform the update again.
- Check your website’s file permissions: Incorrect file permissions can also cause an issue during the update process. You can try resetting the permissions to the recommended settings.
- Use FTP to update: You can try updating WordPress via FTP by uploading the latest version of WordPress to your server.
- Repair the database: If the problem persists, you can try repairing the database by adding the following code to your wp-config.php file:
define('WP_ALLOW_REPAIR', true);
and then visiting https://your-site.com/wp-admin/maint/repair.php
Why does this happen?
In some cases, when you initiate an update or perform specific actions, your site might not exit maintenance mode correctly, leaving it stuck in this state. The most common reasons for this issue are:
- Incomplete Updates: If an update process is interrupted or doesn’t complete successfully, your site can get stuck in maintenance mode.
- Plugin/Theme Compatibility: Certain plugins or themes might not be compatible with the latest version of WordPress, causing conflicts during the update process.
- Server Configuration: Misconfigured server settings, such as insufficient memory limits or execution time limits, can disrupt the update process. You can learn more here.
- File Permissions: Incorrect file permissions can prevent the update process from accessing the necessary files, causing it to get stuck.
- Database Issues: Corruption or other issues with the WordPress database can cause the update process to get stuck.
It can be aggravating to be trapped in maintenance mode, but by following these steps, you can minimise downtime, ensure a seamless update process, and keep your WordPress website secure and running properly. Good luck with your updates!