12.WAF Exceptions

12.WAF Exceptions

The wp admintools wafexceptions commands let you manage WAF Exceptions. Exceptions allow specific request parameters on certain URLs to bypass WAF filtering.

12.1.Add an exception

Creates a new WAF exception.

wp admintools wafexceptions add <at-url> <at-param>    [--description=<description>] [--at-type=<at_type>]    [--at-value=<at_value>] [--published=<published>]
at-url

The URL (relative to site root) for which the exception applies (required).

at-param

The request parameter name to exempt from WAF filtering (required).

--description

An optional description for this exception.

--at-type

How to match the URL: exact (default) or regex.

--at-value

The parameter value to exempt. Leave empty for any value.

--published

Whether the exception is published (1, default) or unpublished (0).

Examples

Exempt the "content" parameter on the post editor:

wp admintools wafexceptions add wp-admin/post.php content

Add an exception with a description:

wp admintools wafexceptions add wp-admin/post.php content --description="Allow HTML in posts"

Use a regex URL match:

wp admintools wafexceptions add "wp-admin/.*" content --at-type=regex

Sample output

Success: WAF exception created with ID 1.