developer-policy-wp-cliWP 7.0+ & PHP 8.3+Developer Policy-as-Code & WP-CLI Reference
Complete reference for DevOps teams managing firewall overrides via Git-tracked webcare-policy.php and WP-CLI.
Lets developers control firewall settings from code and terminal commands so agency deployments stay repeatable.
Version-controlled security policies prevent manual dashboard drift across staging and production.
Open Directly in Your WordPress Admin
Verify active policy overrides in System Doctor.
/wp-admin/admin.php?page=webcare-pro-settings&tab=doctor
Every Option & Setting Explained
Overrides allowlisted settings from PolicyManager::ALLOWED_SETTINGS_OVERRIDES in code.
| Option / Button | What It Does (Plain English) | Recommended |
|---|---|---|
| wp-content/webcare-policy.php | Overrides allowlisted settings from PolicyManager::ALLOWED_SETTINGS_OVERRIDES in code. | Use for GitOps / managed agencies |
Step-by-Step Setup & Verification
3 Steps- 1Create wp-content/webcare-policy.php returning an array of allowed settings_overrides.
- 2Verify active status via wp webcare waf status.
- 3Compile Preload Micro-WAF updates via wp webcare waf compile.
Reference Configuration / CLI
php<?php
// wp-content/webcare-policy.php
return [
'settings_overrides' => [
'waf_auto_enforce_virtual_patches' => true,
'waf_cloudflare_proxy_trust_mode' => 'strict',
],
];
# Terminal WP-CLI commands:
# wp webcare waf status
# wp webcare waf compile
# wp webcare waf unban 198.51.100.10How It Works & How It Protects Your Website
Safe GitOps Automation
Combine webcare-policy.php with wp webcare waf compile in your deployment pipeline after plugin updates.
Frequently Asked Questions
Can webcare-policy.php override arbitrary WordPress options?
No. PolicyManager restricts overrides strictly to PolicyManager::ALLOWED_SETTINGS_OVERRIDES.