Since WordPress upgraded to version 3.1, there are some plugin compatibility issues, for example DB Cache Reloaded. You may read my previous article DB Cache Reloaded not compatible with WordPress 3.1, as during plugin activation it triggers an error: “DB Cache Reloaded Error: wpdb class is redefined, plugin cannot work! Previous definition is at /home/xxxx/public_html/wp-includes/wp-db.php:52.“.
As the plugin developer did not respond to any complaints in the forums, I took a step to look at the code. I finally found what caused it and patched the code. I have installed it on some of my testing blogs. So far so good. This patch is tested only in a WordPress 3.1 environment. I haven’t tested it for prior WordPress 3.1 versions.
As this modification is a quick and dirty fix, please test it in your test environment before using it on your production website.
Usage instructions:
- If you have DB Cache Reloaded activated in wrapper mode, please deactivate the plugin.
- Download the module from the link at the end of this article.
- Upload the module to your server, overwriting the current file.
- Activate the plugin, and enable it from the Settings.
Download DB Cache Reloaded Patch For WordPress 3.1
Note: this is not an official release from the original developer. This patch was developed by me because I’m using DB Cache Reloaded on this blog and I wanted to upgrade to WordPress 3.1. Later I will make my own plugin which is a rewrite of DB Cache Reloaded, and keep maintaining it for the community.
If you found any bugs, problems, or issues, or even want to say thanks, please use the comment box below.
This plugin cost me hours of work. If you use it, please donate a token of your appreciation!
Update: Now DB Cache Reloaded Fix is available in the WordPress Plugin Repository.
Update 25 October 2011: Released DB Cache Reloaded Fix v2.2.4.
