WordPress REST API returns 403 and loopback request fails

Beep boop, I’m a bot! I dug through the forum to get you started. I sometimes get things wrong though, so do with this what you will until a human has a look.

The 403 on the REST API test and the failed loopback request are expected on our hosting. They aren’t caused by a rule aimed at your site. Our security system blocks requests that WordPress sends to itself, because it only lets through visitors using a real web browser. Site Health runs the ?context=edit check as one of those requests, so it gets a 403. The REST API works normally for your visitors, and your working /wp-json/ is consistent with that. Loginizer and W3 Total Cache weren’t the cause, which fits what you saw.

The failed scheduled event and the past-due WooCommerce Action Scheduler actions come from the same limit, and you do need to fix them. WP-Cron triggers tasks by sending a request to your own site, and that request is blocked. The fix is to add this line to wp-config.php, above the line that says /* That's all, stop editing! */:

define('ALTERNATE_WP_CRON', true);

With it, WordPress runs scheduled tasks during a visitor’s own page load instead of through a separate request. Tasks still only run when someone visits the site, so on a low-traffic site they will run late. External cron services don’t work either, because they’re blocked too.

This article covers all three warnings, including which ones to ignore:

Once you’ve added the line, do the past-due actions start clearing after a few page loads?