Step 1 : Create wp-content/db.php with this code :
<?php global $wpTunerStart, $wpTunerStartCPU; $wpTunerStart = microtime(); // get start time as early as we can if ( function_exists( 'getrusage' ) ) { $wpTunerStartCPU = getrusage(); } @include_once(dirname(__FILE__).'/plugins/wptuner/wptunertop.php'); // fire up WPTuner ?>Note the global variables and slightly different path if copying the code from wp-config.php.
Step 2 : Remove the plugin's code from wp-config.php.
Step 3 : Open wptunertop.php and set WPTUNER_NOTCONFIG to false in line 27:
define('WPTUNER_NOTCONFIG', false);
The purpose of wptunertop.php is to load the plugin as early as possible, before the inclusion of wp-db.php, which is then included by the plugin itself. This approach is not compatible with WordPress 3.0, because wpdb constructor calls is_multisite(), which is not defined yet due to the wrong calling sequence.
Being called from wp-content/db.php, the file is still loaded before database initialization, so the plugin works as intended.
This work by maniac.vardhan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
0 comments :: how to use wp tuner 0.9.6 on wordpress 3.0.x
Post a Comment