10.3.Set an option

10.3.Set an option

Sets the value of a WAF configuration option. For scalar values (numbers, strings), pass the value directly. For array values (e.g. reasons_nolog, passexp_roles), pass a JSON array string.

wp admintools waf set <key> <value>

<key>

The configuration option key.

<value>

The value to set. Use a JSON array string for array options.

Examples

Enable the IP allow list:

wp admintools waf set ipwl 1

Disable failed login tracking:

wp admintools waf set trackfailedlogins 0

Set an array option using JSON:

wp admintools waf set reasons_nolog '["geoblocking","loginfailure"]'

Sample output

Success: Option 'ipwl' updated.