Hi @theo38, thanks for reaching out about this.
The contents of the wflogs folder is regularly updated so it’s not uncommon for this folder to update as soon as the plugin is available.
Wordfence does regenerate that folder with fresh data if you delete its contents or the folder entirely within 30 minutes (but usually faster), so there’s no need to include it in a deployment or backup. Logging with these files can be bypassed entirely by switching to the MySQLi storage engine, by adding the following line before the other define(... lines in wordfence-waf.php:
define('WFWAF_STORAGE_ENGINE', 'mysqli');
I hope that helps you out!
Peter.
Yes we already moved to using MySQL. It seems a bit odd to overwrite the config.php though – isn’t the point of that file to store the config on save?
Hi @theo38, ah thanks for clarifying,
In terms of that file in isolation, if the user the site is running as doesn’t have permission to read the file but does have permissions to overwrite it, an update may occur soon after deployment.
As I know you’re using MySQLi already though, the config.php shouldn’t be used at all, which is part of the reason why I suggested using it. If the plugin is still writing it, that often means the MySQLi storage engine isn’t able to run. Maybe your database details aren’t working, or you’re missing one of the constants in wp-config.php?
Many thanks,
Peter.
Sorry, I mean that we realised we could move to using MySQLi just before you said. It’s working, I just wonder if it’s a sub-optimal approach, as you suggest in the docs.
Ah OK, so that would make sense. We could see if there is a way to grant the permissions. Is it the whole folder that is replaced, or the individual files?