Issue with Caching Plugins (WordPress 6.9 Error since 3.9)

Started by Randem, January 16, 2026, 12:21:56 PM

Previous topic - Next topic

Randem

There is a WordPress issue with BotBanish and some caching plugins like LiteSpeed Cache. What happens is when BotBanish is not activated the LiteSpeed Plugin activates / deactivates correctly, well sort of...

When BotBanish is activated:

Deactivation of LiteSpeed generates errors  When it executes a "DESCRIBE" SQL statement on a table that does not exist. WordPress will Fatally fail and one would need to delete the LiteSpeed Cache plugin folder to get the WordPress system operational again.

We needed to change the WordPress class-wpdb.php file to correct this error to make it work properly with BotBanish. We needed to add the try / catch error handling (line 2351) to stop the errors and keep WordPress from Fatally terminating on this condition. Plugin will now deactivate properly when BotBanish is activate.

private function _do_query( $query ) {
if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) {
$this->timer_start();
}

if ( ! empty( $this->dbh ) ) {

try {

$this->result = mysqli_query( $this->dbh, $query );

} catch (exception $f) {

$this->result = $f;
}
}

++$this->num_queries;

if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) {
$this->log_query(
$query,
$this->timer_stop(),
$this->get_caller(),
$this->time_start,
array()
);
}
}
[code]

[b]When BotBanish is not activated:[/b]

On deactivation an error is generated in the log file

"[16-Jan-2026 11:51:49 Pacific/Honolulu] [ERROR] : WP_CACHE constant is not present in wp-config.php"

Even though it was defined in wp-config.php, the constant gets removed upon deactivation of the plugin.

We have reported this issue to WordPress.org on 1/16/2026.