Common causes
- An update was interrupted by closing the browser or losing the connection
- PHP timed out or ran out of memory during a large update
- Updating many plugins at once on a slow server
- A plugin or theme update failed partway, leaving files incomplete
- Insufficient disk space or file permissions during the update
How to fix it
- Delete the .maintenance file. Connect over SFTP or the hosting file manager and delete .maintenance from the WordPress root, next to wp-config.php. It is a hidden file, so enable 'show hidden files'. From a shell: rm /var/www/html/.maintenance.
- Check the site and dashboard. Reload the site and wp-admin. If you now see a critical error, the interrupted update left a plugin or theme broken; disable it by renaming its folder in wp-content/plugins or wp-content/themes.
- Re-run the update. Go to Dashboard > Updates and update the item again, one at a time. With WP-CLI run wp plugin update plugin-name or wp core update.
- Clear the core update lock if needed. If WordPress says 'Another update is currently in progress', wait 15 minutes for the lock to expire, or delete the core_updater.lock option with wp option delete core_updater.lock.
- Fix resource limits. If updates keep timing out, raise max_execution_time and memory_limit in PHP, and check free disk space with df -h. WordPress downloads and unpacks packages in wp-content/upgrade, which needs space and write permission.
Shell / WP-CLI
# Remove the leftover maintenance flag
rm /var/www/html/.maintenance
# Re-run updates one at a time
wp plugin update --all --dry-run
wp plugin update woocommerce
# Clear a stuck core update lock
wp option delete core_updater.lock How to stop it happening again
- Keep the browser tab open until updates finish
- Update plugins one or a few at a time on slower hosting
- Run updates with WP-CLI, which is not subject to web request timeouts
- Take a backup before major updates