One of my clients recently received an notification from their WordPress website that their site had been ‘successfully’ updated to WordPress 4.0-alpha-20140508.
Now, WordPress is a constantly evolving software product, with nightly updates available for technically-minded website owners who want to remain at the leading edge of the product development. However, this is not advisable for typical website owners, because the risk of failure is too high, and this could potentially bring your website down. This is often because of plugins that haven’t yet been updated ready for the new version, but could also be because of bugs in the WordPress code that haven’t yet been fixed prior to a stable release.
Here’s the email my client received…
Why do accidental updates to development releases of WordPress happen?
The puzzling thing for my client is that although minor WordPress updates are happening automatically (since version 3.7), upgrades to development releases should not happen at all and should really remain in the realm of the experts and interested parties. So, what happened?
It seems that WordPress accidentally packaged a development release as a real one, and that sites that some sites picked up this release. Mistakes happen! Automattic (the makers of WordPress) are generally excellent, and considering the size of the project and it’s widespread use, errors are relatively rare.
How to restore to an earlier version of WordPress
The question is – having had my WordPress updated automatically to a version that I don’t want, how can I restore to an earlier version?
I don’t guarantee this approach, but it did work for me.
Step 1 – Backup your WordPress database
Step 2 – Edit the version.php file in /wp-includes/ folder in your WordPress installation and replace the version with 3.9 (see screenshot below)…
Step 3 – Go to your WordPress dashboard and find your ‘Updates’ tab (see screenshot below), and then click ‘Update Now’…
This should have the effect of ‘kidding’ WordPress that it needs to update from an earlier version to the current stable release.
Your site should then be back straight and working normally again. If not… you always have your database backup to restore from… don’t you?
How many WordPress websites?
This is not a widespread problem – it has so far only affected 1 site out of the 70 or so that we manage, but maybe it happened to you too. After all, according to Forbes in 2012 there were 60 million WordPress websites – so if 1-in-70 of those are affected that’s still around 900,000 websites.