I faced the same issue THRICE in WordPress 3.1.3 (and also in early 3.1) while updating a plugin. Got stuck in maintenance mode and simply removing the .maintenance
file NEVER worked for me.
In my case what I had to do was:
- Delete the
.maintenance
file
- Delete the affected plugin folder entirely from wp-content/plugins/
- Pay attention to this step as this can be the root cause for many. Under
wp-content
you’ll find a new folder named upgrade
. Clear out whatever you find under this folder. If you have shell access do a rm -rf upgrade/*
or manually remove all files and folders from this dir.
You system WILL start working again after this.
P.S. If anyone’s wondering if it’s got to do with restricted shell / permissions – I’m on a VPS with full access to all parts of the server. So it isn’t an issue about shared / non-permissive hosting.