Problem

WordPress REST API Error

Diagnose WordPress REST API failures that break the block editor, Site Health, plugins, or app integrations by checking status codes, security rules, permalinks, and loopback behavior.

Problem, cause, fix, verify

Problem

WordPress or a plugin cannot reach a REST endpoint successfully. Use this page to identify the owner, collect evidence, choose a reversible next step, and verify the result before escalation.

Audience

Site owners and support teams troubleshooting REST API warnings or editor failures.

First check

Check the REST response status and body first. A 403, 404, and 500 point to different owners.

Verify

If the error appears only while saving content, check the logged-in request headers, nonce freshness, cookie state, and user capability. A visitor-facing REST check can pass while authenticated editor calls fail behind a cache, security rule, or expired session.

Editorial trust

Published
Updated
Content type
Problems
Review editorial policy

Symptom

WordPress or a plugin cannot reach a REST endpoint successfully. Use this page to identify the owner, collect evidence, choose a reversible next step, and verify the result before escalation.

For: Site owners and support teams troubleshooting REST API warnings or editor failures.

Diagnosis

What to check before changing the site

Quick Diagnosis

Check the REST response status and body first. A 403, 404, and 500 point to different owners.

Editor Impact

The block editor depends on REST responses, so editor symptoms often reveal API problems.

Security Rule Review

REST blocking may come from a firewall, security plugin, basic auth, nonce failure, or host rule. Allow legitimate WordPress routes without opening unrelated private endpoints.

Response Shape

A healthy public REST index should return JSON, not a login page, cached HTML, redirect chain, or branded error screen. Record both status code and response body before changing settings.

Route Scope

Separate the root REST index from the exact failing route. A public index can work while a plugin namespace fails from permissions, a callback fatal error, a stale nonce, or a blocked authenticated request. Test the route the editor or plugin actually calls.

Authenticated Requests

If the error appears only while saving content, check the logged-in request headers, nonce freshness, cookie state, and user capability. A visitor-facing REST check can pass while authenticated editor calls fail behind a cache, security rule, or expired session.

WordPress AdminSeverity: MediumLast reviewed: 2026-09-16

Diagnosis

Symptoms, causes, checks, and fixes

Symptoms

  • Block editor fails to load or save.
  • Site Health reports a REST API error.
  • Requests to /wp-json/ return 401, 403, 404, 500, redirects, or unexpected HTML.

Most Common Causes

  • Security plugin blocking REST routes.
  • Broken permalinks.
  • Authentication or nonce failure.
  • Server rewrite issues.
  • Fatal error in a REST callback.

How To Confirm The Cause

  • Open /wp-json/ in a private browser window.
  • Check browser Network responses for REST requests.
  • Temporarily review security/firewall rules that affect REST endpoints.

Fixes

  • Flush permalinks from WordPress settings.
  • Adjust firewall rules to allow legitimate REST routes.
  • Fix the plugin or theme callback causing 500 errors.

How To Verify The Fix

  • Confirm /wp-json/ returns JSON.
  • Save a test post in the block editor.
  • Re-run Site Health.

When To Contact Support

Escalate to hosting or a developer if server rewrites or PHP fatal errors cause REST failures.

Coverage

Related search intents

Wordpress REST API ErrorHow To Fix Wordpress REST API ErrorWordpress REST API Error Troubleshooting

References

Official references