The REST API encountered an error
“The REST API encountered an error” in WordPress Site Health: causes and what to check
Site Health shows this critical issue when its test request to the REST API (/wp-json/) returns an error. The block editor and many plugins send requests to the same API, so saving posts often fails at the same time.
Which of these do you see?
The editor saves through the same API, so the same cause stops both.
A rule that blocks the path or the request method makes the test fail.
Pretty /wp-json/ addresses depend on rewrite rules; without them the request returns a 404.
Common causes
References
Rather not fix it yourself? Let WP119 handle it automatically.
When the REST API path is blocked or its response is polluted, the editor cannot save. This is handled automatically: the system fixes the REST path and re-verifies that the editor can save. Fixes are made on a copy of your site in the recovery station and written back only after re-verification passes. In your site’s database, the protected tables (members, comments, orders and form submissions) are copied as structure only. In SSH and FTP mode, the system creates a pre-recovery backup on your host before writing back and restores from it if verification after write-back fails. If the recovery cannot be completed, the recovery fee is refunded in full.
- Initial assessment: Site URL entry
- Copy to the recovery station: Work on a copy
- Diagnosis: Item-by-item checks
- Recovery and verification: Home and inner pages
- Write-back or delivery: Only after verification passes
Use WP119 when Site Health shows this error and the block editor cannot save.
Check my site →