Connect with us

code

Handy Wordfence Constants

Published

on

Handy Wordfence Constants


Wordfence is a commonly used plugin for site security that has a free version and a premium version. Wordfence includes a number of constants that can be added to the site’s wp-config.php file to turn off specific features and change some of the defaults.

MainWP has an easy-to-use code snippets plugin that will allow you to save these constants to any of the connected child sites into the child sites wp-config.php file.

The Wordfence scan results page will show up to 100 results by default this can be increased or decreased by using the following constant and setting the value as lower or higher.

define('WORDFENCE_SCAN_ISSUES_PER_PAGE', 50);

If a scan has timed out and failed with the default being Wordfence checking for missing scan result messages every 5 minutes. You can increase the time to be longer at 10 minutes using this constant.

define('WORDFENCE_SCAN_FAILURE_THRESHOLD', 600);

If the Wordfence Web Application Firewall (WAF) needed to be disabled if the protection level was set as being basic WordPress protection or if the wordfence-waf.php file is missing then the following constant can be used.

define('WFWAF_ENABLED', false);

Manage all your WordPress sites with the MainWP Dashboard

WordPress Management for Professionals

Are you ready to go Pro?

All MainWP Pro Extensions are available through one of our convenient bundled packages.

If you need to disable the file viewer on the scan results page then you can use the following constant.

define('WORDFENCE_DISABLE_FILE_VIEWER', true);

If you need to be able to disable the live traffic feature on a site you can use this constant.

define('WORDFENCE_DISABLE_LIVE_TRAFFIC', true);

If you are using the Wordfence plugin on child sites but need to make specific changes or turn off specific features then it is possible using these handy constants with the MainWP Code Snippets extension. Wordfence also provided a number of other constants which can be used for other changes that made need to be made on any child sites using the Wordfence plugin.

Useful links
https://www.wordfence.com/help/advanced/constants/
https://www.wordfence.com/help/firewall/
https://www.wordfence.com/help/firewall/options/#basic-options
https://www.wordfence.com/help/scan/
https://www.wordfence.com/help/tools/live-traffic/#traffic-logging-mode





Source link

Continue Reading
Click to comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.