WordPress Could Not Complete a Loopback Request
A loopback is WordPress sending an HTTP request to its own URL from the server. When it fails, WP-Cron, the code editors' safety check and WooCommerce's background queue stop working — usually because of DNS, HTTP auth, a firewall, busy PHP workers or an open PHP session.
"Your site could not complete a loopback request" means the server could not fetch its own wp-cron.php within 10 seconds — and the features that start background work by calling the site from the server have stopped working with it.
Site Health sends a POST to site_url( 'wp-cron.php' ) with a 10-second timeout and certificate verification off. Three outcomes:
| Result | What Site Health shows |
|---|---|
| Passed | "Your site can perform loopback requests" |
| Connection error (critical) | "The loopback request to your site failed, this means features relying on them are not currently working as expected." followed by Error: <message> (<code>) |
| Non-200 response (recommended) | "The loopback request returned an unexpected http status code, 401, it was not possible to determine if this will prevent features from working as expected." |
It rarely appears alone: "The REST API encountered an error" with REST API Response: (http_request_failed) cURL error 28: … is the same server-to-itself request, with the same cause. It does not mean the block editor is broken — the editor calls the REST API from your browser. If the editor is broken as well, see block editor not working and the REST API unexpected result.

What breaks, and what you notice
Each feature calls the site in its own way, so each fails differently:
| Feature | How it calls the site | When the loopback fails | What you notice |
|---|---|---|---|
| WP-Cron | POST to wp-cron.php?doing_wp_cron=… at the end of a page load; fire-and-forget (0.01 s timeout, non-blocking) |
Request never arrives; no error is logged anywhere | Posts marked Missed schedule, update checks and plugin jobs late; Site Health later reports "A scheduled event is late" or a scheduled event has failed |
| Plugin and theme file editors | GET of the editor screen, then the home page, with a 100 s timeout, after saving a PHP file of the active theme or an active plugin | WordPress cannot confirm the change is safe and rolls it back | "Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP." |
| WooCommerce Action Scheduler | POST to admin-ajax.php from admin page loads (at most once a minute), plus the action_scheduler_run_queue cron event every minute |
Neither runner starts | Pending and past-due actions pile up under WooCommerce → Status → Scheduled Actions; Analytics imports sit at "Importing Orders 0 of N" — see Action Scheduler past-due actions |
| Site Health | REST API test, loopback test, page cache test | Tests fail or cannot decide | The critical issues you are reading about |
The cron spawn is fire-and-forget, so nothing records its failure; Site Health is where it becomes visible.
Read the error first
The text after Error: tells you which layer failed. Reproduce the request from the server shell (-k mirrors WordPress skipping certificate checks):
getent hosts example.com
curl -sk -o /dev/null -w '%{http_code} in %{time_total}s\n' \
-X POST -d 'site-health=loopback-test' https://example.com/wp-cron.php
A healthy loopback answers at once; a broken one hangs until the timeout or fails to connect:
200 in 0.000923s
| Message | Where to look |
|---|---|
cURL error 6: Could not resolve host |
DNS on the server — it cannot resolve its own domain |
cURL error 7: Failed to connect |
Wrong IP (old server), firewall, or nothing listening on 443 |
cURL error 28: Operation timed out after 10000 milliseconds with 0 bytes received |
Connection accepted but no answer: busy PHP workers, an open PHP session, or a firewall that drops instead of rejecting — more in cURL error 28 |
| Status 401 | HTTP basic authentication |
| Status 403 or 429 | Security plugin, WAF or rate limit |
| Status 500 or 503 | wp-cron.php itself crashes or the server is overloaded — check the PHP error log |
Certificate problems are an unlikely cause: core loopbacks pass sslverify => false through the https_local_ssl_verify filter, so an expired or self-signed certificate does not fail them unless a plugin turns verification back on.
The causes, in the order to check
1. The server resolves its own domain to somewhere else. After a migration, /etc/hosts or an internal resolver can still point at the old host. getent hosts shows what the server sees. Also confirm Settings → General shows the current domain: the loopback goes to whatever siteurl holds.
2. HTTP basic authentication. Site Health and the file editor forward your credentials when PHP receives them (PHP_AUTH_USER), so they may pass. The WP-Cron spawn and Action Scheduler requests never send credentials, so on a password-protected staging site they are rejected with 401 regardless. Exempt the server's own IP from the password, or run cron from the system scheduler.
3. A firewall or security plugin. Rules against the server's own IP, unusual user agents or repeated POSTs to wp-cron.php and admin-ajax.php stop loopbacks — dropped packets give error 28, rejections error 7 or a 403. Check the block log and allowlist the server IP.
4. No free PHP worker. The request running the test holds one PHP-FPM worker while the loopback needs a second. With pm.max_children exhausted — or a server that handles one request at a time — the loopback queues until the timeout: error 28 with 0 bytes received, coming and going with traffic.
5. An open PHP session. If a plugin calls session_start() and leaves the session open, the loopback carries the same session cookie and waits on the session lock until it times out. Site Health tests for this: "An active PHP session was detected", with "A PHP session was created by a session_start() function call. This interferes with REST API and loopback requests. The session should be closed by session_write_close() before making any HTTP requests." Deactivate plugins one at a time until that test reports "No PHP sessions detected".
Working around what you cannot fix
- Run WP-Cron from the system scheduler. Set
DISABLE_WP_CRONtotrueand callwp cron event run --due-nowfrom crontab every few minutes. This removes the biggest loopback dependency; Action Scheduler keeps working because its queue is itself a cron event. ALTERNATE_WP_CRONruns cron by redirecting the visitor's own request instead of a loopback — a stopgap, since it adds adoing_wp_cronredirect to page loads.- Drain a stuck WooCommerce queue by hand:
wp action-scheduler run, orwp action-scheduler run --group=wc-admin-datafor the Analytics import.
Verify
- Re-run Tools → Site Health after each change, not after all of them, so you know which one fixed it.
- Schedule a draft five minutes ahead and confirm it publishes without showing Missed schedule.
- On WooCommerce, confirm the Past-due count under Scheduled Actions drops to zero on its own.
Frequently asked
- Anything WordPress starts by requesting its own URL from the server: WP-Cron (scheduled posts, update checks, plugin jobs), the plugin and theme file editors' fatal-error check, and WooCommerce's Action Scheduler queue. Visitors see nothing wrong; the symptoms are missed schedules, reverted editor changes and stuck background tasks.
- Your browser reaches the site from outside; the loopback comes from the server itself. If the server resolves its own domain to the wrong address, a firewall drops traffic from its own IP, or every PHP worker is busy (including the one waiting for the loopback), the request hangs until WordPress gives up after 10 seconds.
- Usually, yes — but know what it costs. Site Health forwards your HTTP auth credentials when PHP can see them, while the WP-Cron spawn request never does, so on a protected staging site scheduled events may stop even when the Site Health test passes. Run cron from the system scheduler there.