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.


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.


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);

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


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


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

Looking for something?

Privacy laws apply to businesses that collect personal information. Since no personal information is collected by the MainWP plugins, no privacy laws apply to the MainWP plugins. This includes GDPR, UK DPA 2018, PIPEDA, Australia Privacy Act 1988, LGPD, PIPL, and other privacy laws.
Donata Stroink-Skillrud
Donata Stroink-Skillrud
President of Agency Attorneys