When a new version of WordPress is released, it’s always a good idea to upgrade as soon as you possibly can. But, don’t just hit that update button as soon as you see the notice pop up in your WordPress dashboard. There’s a few things that we should always do BEFORE updating to the latest WordPress version. Plus, what do we do if our update fails?
Automatically Updating To The Latest Version
Many times we get soooo comfortable updating WordPress that we just click that update reminder and never think about the consequences. I know I’ve done it dozens of times. Admit it, you have, too. Funny thing is, it works about 90% of the time with no issues and we roll on to our work and await the next update.
Featured Plugin - WordPress Newsletter Plugin
What Should We Do?
Before we update anything in our WordPress websites, there are a couple of things we should be sure to do. I’ll be the first to admit that I don’t always do these things, but it’s still a good practice.
Check For Reported Errors
The first thing I do (when I remember to) is to perform a quick Google search to see if anyone walked the path before me. In order to filter out results that are years old – or older than the latest update release – I change the time of the search to limit the results to the last week, last month, or even a custom date range that goes back to the actual date of the latest release.
Whenever there’s a WordPress version update and people have problems, they of course post the errors in various places asking for help. We can learn a lot from the experiences of others if we’ll just ask and listen.
Backup Your Entire Website – Database And Files
This is one of those things that everyone says to do, but so few actually do it. Why? Well, we backup our entire website before updating every time for about six, seven, or eight times and nothing fails on an update. So, we determine that it’s not really that important. The very time we don’t backup and click that update button, something goes awry – and then we’re sunk. All of our hard work is no longer of use to anyone – us, our visitors, the search engines, or anyone.
How Should I Back Up My Website?
I will not attempt to restate all the ways that you can backup your WordPress website, so I’ll reference several articles published right here on wpmu.org that you may find helpful.
Backup WordPress With The New PressBackup Express Service by Sarah Gooding
The latest version of our ‘Snapshot’ WordPress backup plugin is amazing – by James Farmer
Additionally, there are several other backup tools available that work very well to accomplish this task but I haven’t found any references to them in our articles here on wpmu.org. If people are interested, I will be happy to provide some reviews of those as well in the future.
WPTwin – a WordPress backup/cloning solution that is NOT a WordPress plugin. This is a PHP script that you install on your WordPress website and run by adding the php script name to the end of your domain where it’s installed. This can be used as both a backup solution and a cloning solution. It ranges in price from $97 to $297 depending upon how many domains you wish to use it on. I own and use this tool.
WPCyteClone – a WordPress backup/cloning solution that installs into your WordPress website as a WordPress plugin. This solution can be used to transfer your WordPress website from one hosting provider (or server) to another, to clone a website to additional domains, to clone a single site to a multi-site network, to clone from one subsite to another subsite in a multi-site network, and even to backup your sites in case something catastrophic goes wrong. This tool costs $97. I own and use this tool as well.
Backup Creator – a WordPress backup/cloning solution that also installs into your WordPress website as a WordPress plugin. This plugin does not work with all hosting solutions and you may need to make some configuration changes to make it work with your hosting. The developer has provided a listing of Supported Web Hosts along with those changes that may need to be made. This tool ranges in cost from $7 to $47. I own this tool as well.
O.K. that’s probably enough potential solutions for you to choose from. Choose one, use it religiously, and update quickly without worry.
Featured Plugin - WordPress Membership Site Plugin
I’ve Backed Up And Now I Have An Error After Updating
It’s gonna happen – no matter how many precautions we take, no matter how much research we do, an update is going to fail at some point. But, don’t freak – you did make your backup didn’t you? Whether you did or not, don’t try anything just yet.
Before you go any further, highlight and copy the error that you are getting – assuming you are getting an error. Open up a quick Google search and paste that error into the Google search window. You may be surprised to find that your specific error returns some search results that can help you troubleshoot and fix your problem.
Recently a local business contacted me because when they were posting to their website, they noticed the update for WordPress v3.5 and just clicked the Update button – no backup, no checks, nothing. Their WordPress update failed miserably and they had no admin access OR visitor side – just an error. After researching their specific error, I determined that the most probable solution was that I would need to manually update their WordPress installation. I reassured them that in all likelihood, their data was probably intact.
How Do You Manually Update WordPress
Initially, the thought of manually updating WordPress may seem to be a daunting task, especially after a failed automatic update. But, it’s really not as hard as it may seem. I guess I’m a little crazy, or just plain stupid, but in my opinion, if your website is completely broken and all you have is an error showing, then you don’t have much to lose, so go ahead and give it a shot.
Step #1 – Backup everything that is in your database
Even though your website is completely down, as I said earlier, your data is probably still intact. To minimize any future damage, we should make a backup of your database and store it off of your server. To do that, I use Navicat to backup the database. But, some hosts do not let you remotely access your MySQL database, so you’ll need to use their method of MySQL backup. The client I noted above hosted with FatCow and they only allow you to use their backup system in their control panel. If you can remotely access your MySQL Database, then you can refer to the list of tools at the end of this recent article on Portable phpMyAdmin. Once you have your backup, download it and store it off the server.
Step #2 – Backup all files for your domain
Nothing fancy here. Just log in to your hosting for the domain affected using your favorite FTP program and copy EVERYTHING in your hosting account for your domain to a folder on your local computer. For many hosts, this is everything located in your public_html folder, but not all hosts use that same configuration. Regardless, it will the folder that contains the wp-admin, wp-content, wp-includes folders. Be sure to copy all the other files including your wp-config.php file.
Step #3 – Delete the original wp-includes and wp-admin
While you are logged in with your FTP program, and after you’ve made copies locally, go ahead and delete both of those directories. We’ll be replacing the contents of them soon.
Step #4 – Get the latest WordPress version
Get the latest WordPress zip file (or tar.gz file if you can work with them) and download it to your local machine.
Step #5 – Unzip the file you just downloaded
Unzip either the zip or tar.gz file you just downloaded so that all the files and folders are available individually on your local machine.
Step #6 – Upload the folders to your server
Using your FTP program again, upload the wp-includes and wp-admin folders (and all content in them) to replace the folders you deleted earlier.
Step #7 – Upload the contents of the new wp-content folder
Upload all of the contents of the new wp-content folder (individual files not the folder itself) to the wp-content folder on your server overwriting the existing files on your server. Don’t delete the existing wp-content folder before you do this or you will lose all your theme customizations. We just want to overwrite the core files that we need. Also, if you’ve customized any of the theme files for the default themes, don’t overwrite them or you will lose those customizations as well.
Step #8 – Upload the individual files in the “root” of your unzipped files
When you unzipped the package, there are numerous individual files that are not in the three directories noted above. Using your FTP program, upload these files to the root directory of your WordPress installation overwriting the existing files. Don’t worry about the wp-config.php file as it doesn’t exist in the extracted packed that you downloaded earlier.
Step #9 – Remove the “failed update” nag message
You may or may not have the .maintenance file in your WordPress directory depending upon whether the file was left after the failed update. In my client’s situation, it did not exist, but if it does, use your FTP program to delete the .maintenance file from your WordPress directory. Then, you will no longer see the “failed update” nag message.
Step #10 – Login and check your WordPress Update
At this point, simply visit your http://domain.com/wp-admin screen, login, and allow the system to update your database (remember the backup of your database we did earlier?) – if needed. If all goes well, then you will be able to login and work on your WordPress website without any issues. If you have an error (either in the front end or the back end), copy the error information to the clipboard, go back to Google, and paste that information into a search box to resolve the issue.
Featured Plugin - WordPress Infinite SEO Plugin
So far, I have been able to fix any issues that I or clients have created by following these steps. As long as my database is still intact, and my theme modifications are not compromised, then there’s always a good chance that I can get a website back up and operating without issues. The main thing it will take is time and patience. Since I have multiple computers and a fast internet connection, I can set up a lot of these steps to run while I’m working on my laptop and double up on my time.
Have you experienced any issues with the latest WordPress update? If so, post them in the comments. If you’ve fixed the issues, be sure to share them with us as well. This thread could quickly become a “go to” post for quick checks of WordPress update errors.