• Resolved gmariani405

    (@gmariani405)


    Trying to install Wordfence using WP-CLI and running into errors since it doesn’t seem to initialize properly without the GUI. Could it be patched to at-least not error out like this?

    PHP Warning:  fopen(/chroot/home/USER/DOMAIN/html/wp-content/wflogs/rules.php): Failed to open stream: No such file or directory in /chroot/home/USER/DOMAIN/html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 332
    Warning: fopen(/chroot/home/USER/DOMAIN/html/wp-content/wflogs/rules.php): Failed to open stream: No such file or directory in /chroot/home/USER/DOMAIN/html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 332
    PHP Warning:  include(/chroot/home/USER/DOMAIN/html/wp-content/wflogs/rules.php): Failed to open stream: No such file or directory in /chroot/home/USER/DOMAIN/html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 335
    Warning: include(/chroot/home/USER/DOMAIN/html/wp-content/wflogs/rules.php): Failed to open stream: No such file or directory in /chroot/home/USER/DOMAIN/html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 335
    PHP Warning:  include(): Failed opening '/chroot/home/USER/DOMAIN/html/wp-content/wflogs/rules.php' for inclusion (include_path='.:/opt/remi/php80/root/usr/share/pear:/opt/remi/php80/root/usr/share/php:/usr/share/pear:/usr/share/php') in /chroot/home/USER/DOMAIN/html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 335
    Warning: include(): Failed opening '/chroot/home/USER/DOMAIN/html/wp-content/wflogs/rules.php' for inclusion (include_path='.:/opt/remi/php80/root/usr/share/pear:/opt/remi/php80/root/usr/share/php:/usr/share/pear:/usr/share/php') in /chroot/home/USER/DOMAIN/html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 335
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support wfjanet

    (@wfjanet)

    Hi?@gmariani405,

    Thank you for reaching out.

    I have seen issues similar to yours with customers that host on WPEngine since they don’t allow the use of the file based storage engine for the firewall configuration data. 

    To resolve this, you would need to switch MySQLi storage engine so that sites can store firewall data in the MySQL database instead of using files in “wp-content/wflogs/“.

    You can find the instructions on the link below:

    https://www.wordfence.com/help/firewall/mysqli-storage-engine/

    Let me know how it goes.

    Thanks,

    Janet.

    I bumped into this issue.

    To resolve this, you would need to switch MySQLi storage engine so that sites can store firewall data in the MySQL database instead of using files in “wp-content/wflogs/“.

    Unfortunately this is not applicable in this case as the file wordfence-waf.php where one should declare the constant WFWAF_STORAGE_ENGINE to switch to the MySQLi storage doesn’t exist yet.

    It might be possible to work around the warning using wp-config.php, but there should be a way to activate the plugin with WP-CLI without any issue…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error when using WP-CLI’ is closed to new replies.