Title: SQLite and WordPress Playground compatibility
Last modified: November 6, 2025

---

# SQLite and WordPress Playground compatibility

 *  Resolved [Jan Jakeš](https://wordpress.org/support/users/janjakes/)
 * (@janjakes)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/sqlite-and-wordpress-playground-compatibility/)
 * Hello!
 * We’re testing the Wordfence plugin compatibility with [the SQLite integration](https://github.com/WordPress/sqlite-database-integration/)
   and [WordPress Playground](https://playground.wordpress.net/). Doing so, we’ve
   encountered the following error:
 *     ```wp-block-code
       PHP Fatal error: Uncaught Error: Call to undefined method WP_SQLite_Driver::prepare() in /wordpress/wp-content/plugins/wordfence/lib/wfConfig.php:883
       ```
   
 * The issue here is that with SQLite, the `$wpdb->dbh` property doesn’t hold an
   instance of `mysqli`.
 * As a hotfix, we can set `WORDFENCE_ALLOW_DIRECT_MYSQLI` to `false`, but for a
   more robust solution, I wanted to suggest adding an `$wpdb->dbh instanceof mysqli`
   check into [the following condition on your side](https://plugins.trac.wordpress.org/browser/wordfence/trunk/lib/wfUtils.php#L3951):
 *     ```wp-block-code
       $useMySQLi = (is_object($dbh) && (PHP_MAJOR_VERSION >= 7 || $wpdb->use_mysqli) && wfConfig::get('allowMySQLi', true) && WORDFENCE_ALLOW_DIRECT_MYSQLI);
       ```
   
 * What do you think?
   Here’s an issue tracking this on the SQLite integration side:
   [#284](https://github.com/WordPress/sqlite-database-integration/issues/284)
 * Thanks!
   Jan

Viewing 1 replies (of 1 total)

 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/sqlite-and-wordpress-playground-compatibility/#post-18710097)
 * Thanks for your detailed suggestion [@janjakes](https://wordpress.org/support/users/janjakes/)!
 * I have forwarded this to our development and QA teams as a feature request, which
   can also be sent directly using **feedback @ wordfence . com**. Topics such as
   this will become marked as “Resolved” in the forum as we are unable to provide
   ongoing updates about development discussions, progress, or release dates.
 * Our internal issue tracking will remain open for anything that is considered 
   for a future plugin version. Our [changelog](https://wordpress.org/plugins/wordfence/#developers)
   will detail the changes made when new versions are released.
 * Many thanks,
   Peter.

Viewing 1 replies (of 1 total)

The topic ‘SQLite and WordPress Playground compatibility’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * Last activity: [6 months, 2 weeks ago](https://wordpress.org/support/topic/sqlite-and-wordpress-playground-compatibility/#post-18710097)
 * Status: resolved