• Resolved jakeparis

    (@jakeparis)


    Hello, I am trying to configure Wordfence to use an alternate database for its tables, as described here. I’ve added those constants, with the connection information, to the wordfence-waf.php file. I’ve also added the define('WFWAF_STORAGE_ENGINE', 'mysqli'); line to my wordfence-waf.php file. But no tables are initialized in my alternative wordfence database.

    I tried leaving the wordfence-waf file, and deleting and reinstalling the plugin, but that didn’t change anything. No tables ever show up in the alternative database. Is there something I’m missing? How do I tell Wordfence to write all its data to this other database as defined by the define('WFWAF_DB_... constants?

    Thank you for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support wfmark

    (@wfmark)

    Hi @jakeparis , thank you for reaching out.

    Unfortunately, it is not possible to use a different database for firewall data only as the connection information is pulled from wp-config.php. The tables used are expected to be the same both at the Wordfence Application Firewall level and the WordPress level.

    The option to define WWAF constants should be used when your database settings cannot be read automatically from wp-config.php.

    By default, Wordfence stores firewall data in ~wp-content/wflogs/. The option to use an alternate database makes it possible for sites to store firewall data in the MySQL database instead.

    Please note that we only recommend using this option if your site is unable to read and write to the firewall files consistently, or if your host uses multiple web servers that do not share the same filesystem, since better performance and efficient resource usage are likely when using the default file-based storage on most hosts.

    Let me know in case you have any further questions.

    Thanks,

    Mark

    Thread Starter jakeparis

    (@jakeparis)

    Thank you for the helpful information.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Not able to use alternate database’ is closed to new replies.