Recovering from Failed WordPress Upgrade

Dec 07, 2023
 — by 
Kris Kratz
 in 

Disaster struck as I was upgrading one of my websites from WordPress 5.9.3 to 6.0. I got the worst version of the WordPress update failed error. Just the white screen of death explaining, technically, nothing was working. Fatal error… publishing failed error

To make things worse, I didn’t have any backups. None. Zip. Zero. Zilch-a-roony.

The notice “Briefly unavailable for scheduled maintenance. Check back in a minute.” was stuck on. Holy crapoly. Sick to my stomach and my site is down! I got the site up and running again in about fifteen minutes with the following steps.

When the automatic update fails, you need to manually update the site. And it’s probably fastest if you have can ssh into the shell to access. Uploading thousands of tiny files with through FTP takes forever and a day, and we need the site up now!

First thing is first, I logged in through SSH and zipped up all of the files into an archive. This created a backup of my existing files:

$ tar -czvf my-site-backup.tar.gz /path/to/public-html/*

Then, I downloaded the latest version of WordPress:

$ wget https://wordpress.org/latest.tar.gz

And unzipped it:

$ tar -xzvf latest.tar.gz

I followed the simple instructions from WordPress on a manual installation, and remember to clear the cache if you are using a caching plugin.

Pro Tip: Use this rsync command to move the files from the new wp-content directory to overwrite the existing one quick and easy:

$ rsync -a wordpress/wp-content/ wp-content/