Easy WordPress Downgrade
How to downgrade WordPress but keep any content created since last upgrade.
I recently upgraded www.hrc.co.nz from 3.05 to 3.1. All seemed well, and the upgrade was a sweet new version. Unfortunately, 2 weeks later, I discovered it had made subtle, but important changes to my carefully crafted permalink and category structure. There’s a lot of help forums on this topic, particularly relating to the Top Level Categories plugin (which I am using) but none of them restored my custom permalink/category structure properly.
So I had to downgrade from 3.1 to the version I backed up before before applying the upgrade. However, in the 10 odd days between, web content editors had uploaded a large number of new posts, pages and media files.
Rather than downgrade then copy over all the recent content manually, I discovered that you can keep new content quite easily, by using the upgraded MySQL database and just importing the pre-upgrade up wp_options table. Here is how I did it;
In this example, WordPress is installed in a directory of the same name (ie; /public_html/wordpress). It also assumes you have a working knowledge of MySQL and a backup of the WordPress installation directory and SQL database taken before the last upgrade. (If you don’t have a backup, why the hell not?)
1) Move and rename the upgraded wordpress folder (ie; /wordpress -> /wordpress_3.1)
2) Copy or unzip the backup folder (ie; /wordpress_3.0 -> /wordpress)
3) Copy folder /wp-content/uploads from upgraded folder to the backup folder (ie; /wordpress_3.0/wp-content/uploads -> /wordpress/wp-content/uploads)
4) backup the live (ie; upgraded, 3.1) MySQL database (just to be safe)
5) rename MySQL table wp_options -> wp_options_3.1 (or backup or similar)
NOW FOR THE FUN PART
6) import into the live database ONLY the wp_options table from the original, pre-upgrade backup MySQL database
Your site should now be downgraded to the last version of WordPress, but any posts, pages or media created since the upgrade will be intact. Test the site then, when you are happy, drop the wp_options_3.1 (or whatever you named it) table. It worked a treat for me. Provided you back everything up thoroughly, there’s no harm in giving it a go.