What to Do When Your WordPress Update Failed [Tutorial]

WordPress logoYesterday 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.

  1. First of all, download to your hard drive the latest WordPress zip (or tar.gz) file from here.
  2. Then unpack the zip file that you downloaded.
  3. On your web host delete the old wp-includes and wp-admin directories through your FTP or shell access.
  4. Using FTP or your shell access, upload the new wp-includes and wp-admin directories to your web host, overwriting old files.
  5. For the wp-content folder 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-content folder to your existing wp-content folder, overwriting existing files, but leaving your own custom files intact.
  6. Upload all new loose files from the root directory of the new version to your existing WordPress root directory.
  7. 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.
  8. 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 .maintenance from your WordPress directory using FTP.
  9. 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!