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 ??