Title: npanic's Replies | WordPress.org

---

# npanic

  [  ](https://wordpress.org/support/users/npanic/)

 *   [Profile](https://wordpress.org/support/users/npanic/)
 *   [Topics Started](https://wordpress.org/support/users/npanic/topics/)
 *   [Replies Created](https://wordpress.org/support/users/npanic/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/npanic/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/npanic/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/npanic/engagements/)
 *   [Favorites](https://wordpress.org/support/users/npanic/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] MySQLi storage engine](https://wordpress.org/support/topic/mysqli-storage-engine-2/)
 *  Thread Starter [npanic](https://wordpress.org/support/users/npanic/)
 * (@npanic)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/mysqli-storage-engine-2/#post-17137841)
 * Hello, if anyone facing the same issue i finded the fix !
 * By default wordfence will try to get the database information from the wp-config.
   php file, and if you have a custom config, it will not find the DB variables.
 * You need to add CONSTANTS in the wordfence-waf.php file :
 * First add ‘define(‘WFWAF_STORAGE_ENGINE’, ‘mysqli’);’ in a new line under the‘
   <?php’ tag.
 * Then add :
 * define(‘WFWAF_DB_NAME’, ‘db_name’);
   define(‘WFWAF_DB_USER’, ‘db_user’);define(‘
   WFWAF_DB_PASSWORD’, ‘db_password’);define(‘WFWAF_DB_HOST’, ‘127.0.0.1’);define(‘
   WFWAF_DB_CHARSET’, ‘utf8’);define(‘WFWAF_DB_COLLATE’, ”);define(‘WFWAF_TABLE_PREFIX’,‘
   wp_’);
 * And done ! Wordfence firewall will save data in the DB.
 * To check if the config is good go in Wordfence > Tools > Diagnostics > Wordfence
   Firewall Current WAF configuration.
 * If ‘Active WAF storage engine’ is set to ‘mysqli’ your done 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] MySQLi storage engine](https://wordpress.org/support/topic/mysqli-storage-engine-2/)
 *  Thread Starter [npanic](https://wordpress.org/support/users/npanic/)
 * (@npanic)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/mysqli-storage-engine-2/#post-17127303)
 * Hi, thanks for the answer !
 * The firewall is optimized, so i added in the /wordfence-waf.php file the line:
   define(‘WFWAF_STORAGE_ENGINE’, ‘mysqli’); after the <?php.
 * Now on the firewall configuration i have this :
 * **Wordfence Firewall** Current WAF configuration.
    - WAF auto prepend active : Yes
    - Configured WAF storage engine (WFWAF_STORAGE_ENGINE) : mysqli
    - Active WAF storage engine : file system
    - WAF log path : ~/wp-content/wflogs/
    - WAF subdirectory installation : No
    - wordfence-waf.php path : /var/www/html/wordfence-waf.php
    - WAF File Permissions : 0600 – using template
    - Recently removed wflogs files : None
    - WAF Loaded Successfully : Yes*
 * As you can see i still have the ‘Active WAF storage enfine set to file system,
   does it mean that the data is saved in the DB or not ?

Viewing 2 replies - 1 through 2 (of 2 total)