WordPress REST API Error in Site Health: How to Fix It (2026)

Network connections around the globe representing an API

Site Health shows “The REST API encountered an error” when WordPress cannot reach its own REST API. The usual causes are a security or caching plugin blocking requests, a slow server that times out, a login or password protection layer, or a wrong site URL. Read the error code first, then test plugins and your server rules.

The REST API is used by the block editor, many plugins and parts of the admin. When it fails you may see saving problems in the editor or a warning in Tools, then Site Health. Here is a safe way to find the cause.

Step 1: Read the Exact Message

Open Tools, then Site Health, then Status, and expand the REST API item. The message shows a code such as a 401, a 403, a cURL timeout or a not found response. That code decides which fix to try.

Step 2: Test the REST API Directly

Open your site address followed by /wp-json/ in a private window. You should see a block of JSON text. If you get a 404, resave Settings, then Permalinks. Our permalinks 404 guide explains this. If you get a 403, something is blocking the request.

Step 3: Disable Security and Caching Plugins Temporarily

Firewall, security and optimization plugins are the most common cause. Deactivate them one at a time and recheck Site Health. Use our plugin conflict guide for the exact process.

Step 4: Check for Timeouts

A cURL error 28 means the request timed out. Slow hosting or a blocked loopback request can cause this. Ask your host to check that your site can request its own address, and consider raising PHP limits, see our max execution time guide.

Step 5: Check Password Protection and Login Walls

A password protected staging site, a maintenance mode plugin, or a coming soon page can block the REST API. Turn these off temporarily to test.

Step 6: Check Your Site URLs and HTTPS

In Settings, then General, both addresses should be correct and use https:// if you have an SSL certificate. A mismatch can break internal requests. See our mixed content guide.

Step 7: Try Another Browser Profile

A WordPress Trac report describes cases where a large set of cookies from other sites can make the check report a 403 wrongly. Test in a private window or a clean browser profile before changing anything on the server.

Quick Checklist

  • Error code read in Site Health
  • /wp-json/ opens in a private window
  • Security and cache plugins tested
  • No password or maintenance wall in front of the site
  • Site URLs correct
  • Tested in a clean browser profile

Verified Facts and Sources

The causes and steps come from the Hostinger and Tickera troubleshooting guides, the WordPress REST API handbook and a WordPress Trac report on cookies. We did not reproduce a REST API error on a test site while writing this article.

Frequently Asked Questions

What does the REST API encountered an error mean?

WordPress tried to call its own REST API and the request failed, for example because of a block, timeout or wrong URL.

Does a REST API error break my site?

The front end may look fine, but the block editor and some plugins can stop saving or loading correctly.

Which plugins usually cause it?

Security firewalls, caching and optimization plugins, and maintenance mode plugins are the most common.

How do I test the REST API quickly?

Open your site address plus /wp-json/ in a private window. A page of JSON means it works.

Updated December 2, 2026.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *