A Security Plugin or WAF Is Blocking the WordPress REST API
A WAF or security rule blocks the specific REST path, method, payload or authentication pattern.
Capture the exact sanitized message, HTTP status and response body without including secrets.
Likely causes
- A WAF or security rule blocks the specific REST path, method, payload or authentication pattern.
- A plugin, filter or server rule restricts the WordPress REST API.
- The hosting stack, reverse proxy, redirect or WAF removes the Authorization header before WordPress receives it.
- The client exceeds a request-rate threshold enforced by the application, host or WAF.
- Another plugin changes HTTPS detection, REST access or Application Password availability.
Diagnostic sequence
- Capture the exact sanitized message, HTTP status and response body without including secrets.
- Review the exact WAF or security-plugin event for the route, method and rule identifier.
- Request the WordPress REST index and confirm that the expected namespaces and authentication metadata appear.
- Verify through sanitized server evidence that the Authorization header reaches WordPress.
- Separate authentication failure from authorization refusal by comparing status, error code and response context.
- Record WordPress, plugin, client, connector and server versions before changing anything.
Apply the smallest correction
- Adjust only the verified false-positive WAF rule, path or method instead of disabling protection globally.
- Restore the required REST route or API availability while preserving authentication and permission callbacks.
- Configure the trusted server or proxy path to pass the Authorization header to WordPress.
- Reduce concurrency and retry frequency, then honor any server-provided retry interval.
- Escalate with sanitized, versioned evidence when the behavior remains specific to the plugin.
Verify the result
- The REST index responds from the canonical HTTPS URL and exposes the expected namespaces.
- Sanitized server evidence confirms that the Authorization header reaches WordPress.
- The approved narrow read succeeds with a reproducible response.
- A deliberately forbidden write remains refused.
What not to do
- Do not disable the WAF or security plugin globally to bypass one request.
- Do not disable or reopen the entire REST API when only one route or policy is involved.
- Do not grant administrator access merely to make a connection test pass.
- Do not place an Application Password, Authorization header, token or cookie in a prompt, ticket, log excerpt or screenshot.
- Do not expose debug logs or diagnostic endpoints publicly.
Related guides
- WordPress Authorization Header Is Missing or Stripped
- WordPress /wp-json/ Returns 404: REST API Diagnosis
- WordPress AI Connection Returns 429 Too Many Requests
- WordPress Application Password Returns 401 Unauthorized
- Troubleshooting Claude Code or Codex Access to WordPress
Sources and verification
This page was checked against the following primary sources. Last source review: .
- REST API Handbook · WordPress Developer Resources
- REST API Frequently Asked Questions · WordPress Developer Resources
- Routes and Endpoints · WordPress Developer Resources
- RFC 9110: HTTP Semantics · RFC Editor