How to fix The REST API is one way WordPress, and other applications, communicate with the server.

WordPress Site Health – cURL error 28 (REST API, loopback)

Recently, I discovered an interesting little problem. I run WordPress on blog website, and naturally, there’s testing that needs to be done to make sure everything is hunky-dory here any changes are introduced to the domain. One such change was the introduction of the Site Health check tool in WordPress 5.2, which tells you of any critical issues and recommended actions for your setup.

On its own, this is fine, but then I noticed a couple of supposedly critical errors showing up with update to 5.4, indicating a sudden new issue with the domain. The errors were: The REST API encountered an error and Your site could not complete a loopback request. The details for both these read: Error: cURL error 28: Operation timed out after 10000 milliseconds with 0 bytes received (http_request_failed). Weird. Let’s debug.

A problem in more detail

Critical issues sound alarming. But then, you need to look at potential problems carefully, to understand what the actual impact is. Quite often, companies are over-stringent with how they treat bugs and problems because no one wants to be accused of being too lax with issues that could lead to security complications. So let’s have a look at the status report:

So what I had to do was manually turn off every single Plug-in, one by one, and then re-run the health check, to see whether any one particular element was at fault.

On my site was the captcha code plugin causing this problem, sow I remove it then the error gone.