Yesterday when I was updating one of my WordPress blogs the automatic update failed and was stuck in maintenance mode. What to do when this happens?
First of all, don’t panic! Your blog is not lost for ever, or anything like that. Even if you haven’t backed up your blog’s files and its database (like recommended by WordPress), it is still possible to fix the update fail issue in a few easy steps.
Of course if you had backed up your files and database then you could simply restore them and try an automatic update again. In fact some web hosts will regularly backup everything for you. One such host is DreamHost. They also have a great technical support team that could help you out in such a situation if you sent them an email.
But if you didn’t backup and don’t have a web host that could help you out, or you just want to do it all by yourself, then this is how it’s done:
WordPress manual upgrade
A manual upgrade is the solution to a failed automatic update. Although this is not a one-click process, it is still fairly easy, even to beginners.
- First of all, download to your hard drive the latest WordPress zip (or tar.gz) file from here.
- Then unpack the zip file that you downloaded.
- On your web host delete the old
wp-admindirectories through your FTP or shell access.
- Using FTP or your shell access, upload the new
wp-admin directories to your web host, overwriting old files.
- For the
wp-contentfolder it’s different. Do NOT delete any files or folders in that directory. This is where all your files are stored (plugins, themes, images, cache, etc.) What you want to do is upload the individual files from the new
wp-contentfolder to your existing
wp-contentfolder, overwriting existing files, but leaving your own custom files intact.
- Upload all new loose files from the root directory of the new version to your existing WordPress root directory.
- After having completed steps 1 through 6, you can now load your blog in your browser. We are almost done — just a few small things left to wrap things up.
- Go to your WordPress admin panel. When upgrading manually after a failed auto-upgrade, you might still get a “failed update” nag message. In order to get rid of it delete the file
.maintenancefrom your WordPress directory using FTP.
- Finally, if a database upgrade is necessary in order to be compatible with the latest code, WordPress will detect it and give you a link to the upgrade page. On that page you will have the choice to do it automatically or manually. This time backup your database, will ya? 😛 You don’t want to have the same problem again!