Downgrade WordPress the quick ¿proper? way

If you updated to a new WordPress version and were welcomed with error messages, unaccessible admin interface and isn't worth my time debugging this feelings, these quick steps are for you.

Returning WordPress to a previous version is safe (from a functional perspective) most of the time. You should try to update again once non-compatible plugins get fixed.

Database changes between minor WordPress versions are few, but if you don’t have any kind of disaster recovery plan in place, you’ll be in a safer position if you backup it before restoring WordPress.

We'll download an installation zip without the wp-content directory (this is what WordPress uses when updating itself) from

http://wordpress.org/wordpress-{tag}-no-content.zip

where {tag} is the specific release that we're aiming for. Since we are updating (downgrading) only WordPress core files, our plugins and customizations will be kept in place.


First, we'll backup our WordPress installation
cp -br /home/user/wordpressdir /home/user/wordpressdir.bak

 

cd into our WordPress dir...
cd /home/user/wordpressdir

 

We want to downgrade to WordPress 4.0.1
wget http://wordpress.org/wordpress-4.0.1-no-content.zip

 

Next step will decompress WordPress inside a new wordpress folder
unzip wordpress-4.0.1-no-content.zip

 

We'll overwrite WordPress files the same way an automatic update does
cp -br ./wordpress/* ./

done!


You may need to reload the apache/php process if there is an opcode cache

Did you enjoy this post and find it valuable?

📡 Subscribe and sign the 📜 Guestbook!

Tip the author! Don't know what Bitcoin is yet?

1Mojitovwnpokdo8uLXvG93pEhBF6MNFoo

Tagged as: