Multisite error: wp_options’ doesn’t exist
-
Hello iThemes team,
thanks for your great plugin.
We have experienced an error which has been flooding the debug.log file. Apparently there’s no functional issues, only the issue of the debug.log file.A sample of the error:
WordPress database error Table 'wp_options' doesn't exist for query INSERT IGNORE INTO
wp_options(
option_name,
option_value,
autoload`) VALUES (‘itsec-lock-cron_test_fail_safe’, ‘*****’, ‘no’) /* LOCK */ made by require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), WP_Hook->do_action, WP_Hook->apply_filters, itsec_cron_test_fail_safe, ITSEC_Lib::get_lock
`
Apparent “root-cause”: the plugin code has a bug to get the prefix for multisite options table. There’s no ‘wp_options’, only options table for each site (eg. wp_1_options = main site options table).Workaround found by us: After some technical investigation, we could fix it by changing the follow file and lines:
/wp-content/plugins/better-wp-security/core/lib.php
Changing:
$main_options = $wpdb->base_prefix . 'options'; // wrong: //--> wp_
By:
$main_options = $wpdb->prefix . 'options'; //--> wp_1_
It’d be great if you can fix it, because every time we need to update the plugin, we lose this customization.
Thank you,
Rafael
- The topic ‘Multisite error: wp_options’ doesn’t exist’ is closed to new replies.