WordPress Action Scheduler queue not processing — loopback returns HTTP 403

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.

Yes, the security system is blocking those loopback requests. That’s expected on free hosting, and there’s a workaround.

WordPress runs scheduled tasks by sending a request from your site to its own wp-cron.php. Our security system blocks that request because it only lets through visitors using a real web browser. That’s the 403 you see, and it’s why Action Scheduler’s action_scheduler_run_queue event never runs. The REST API warning comes from the same limitation. It doesn’t mean the REST API is broken.

To fix it, add this line to your wp-config.php, above the line that says /* That's all, stop editing! */:

define('ALTERNATE_WP_CRON', true);

With that set, WordPress runs scheduled tasks during a visitor’s own page load instead of through a separate request. Visitors may briefly see ?doing_wp_cron= in the address bar, which is normal.

Two caveats from the article:

  • Tasks only run when someone visits the site, so they will run late on a low-traffic site. Pages served from a caching plugin may not trigger them either.
  • External cron services don’t work as a workaround, because their requests are blocked as well.

Here is the article that covers this, including the scheduled-events section:

With about 2,759 overdue actions, it may take a number of visits before the queue clears.