cURL Error 28: Operation Timed Out in WordPress
The number is specific and useful: 28 is always a timeout, never a refusal or a certificate problem. What matters next is which request timed out, because a loopback to your own site and a call to a payment provider need opposite fixes.
Error 28 is always a timeout, which rules out a great deal. It is not a refused connection, not a DNS answer that came back wrong, and not a certificate problem — those have their own numbers, such as cURL error 60 for a certificate WordPress will not trust. Something was contacted, the wait began, and no complete reply arrived in time. WordPress prints it as cURL error 28: followed by libcurl's own wording, which comes in three forms:
cURL error 28: Operation timed out after 5001 milliseconds with 0 bytes received
cURL error 28: Connection timed out after 10001 milliseconds
cURL error 28: Resolving timed out after 5000 milliseconds
The first means the server accepted the connection and never finished answering; the second means the connection itself never opened; the third means the DNS lookup did not return. The useful question after that is which request it was, because the two common answers need opposite responses.
Identify the request first
The full message usually names the URL. Sort it into one of two categories:
| The URL is | Category | Meaning |
|---|---|---|
| Your own domain | Loopback | The site cannot reach itself |
| Anything else | External | A remote service did not answer in time |
Tools › Site Health reporting "Your site could not complete a loopback request" is telling you the first. A payment or shipping integration failing intermittently is telling you the second. The fixes have almost nothing in common.
Loopback timeouts
WordPress makes requests to its own address for scheduled tasks, Site Health tests and file-edit checks. The request leaves the server and comes back in through the public address, which means it passes everything a visitor's request passes — DNS, the firewall, the CDN.
Three causes account for most of these:
- DNS pointing elsewhere. A site behind a proxy resolves its own domain to the proxy, which sends the request back, and on some configurations it never lands. A hosts entry mapping the domain to the server's own address resolves it.
- A firewall blocking self-requests. Some security configurations treat a request from the server to itself as suspicious. Allowing the server's own address is the fix.
- Authentication in front of the site. A staging site behind HTTP authentication blocks the WP-Cron request, which carries no credentials. Site Health forwards your own Basic auth header in its tests, so its check can pass while scheduled tasks still fail — the usual situation on a staging site.
The visible consequence is that scheduled tasks stop running. Posts do not publish on schedule, trash does not empty, and update checks go stale — the same outcome as disabling WP-Cron without configuring a replacement, reached by accident. The wider set of loopback failures is in loopback request failed.
External timeouts
Here the remote service is slow or unreachable from this server. Before changing anything, establish whether it is slow for everyone or only from here — a request from another machine to the same URL answers that in one attempt.
WordPress allows five seconds by default for requests made through its HTTP API. For a service that legitimately takes longer, raising the limit for that specific host is reasonable:
add_filter( 'http_request_timeout', 'ti_http_timeout', 10, 2 );
function ti_http_timeout( $timeout, $url ) {
if ( str_contains( $url, 'api.example.com' ) ) {
return 20;
}
return $timeout;
}
Scoping it to one host matters. Raising the timeout globally means every failing request now occupies a PHP process four times as long, and on a site making several per page load that converts a minor fault into pages that hang — which reads as a slow site rather than as a timeout.
Fixes by environment
The same error has a different first step depending on where the site runs:
- Shared hosting with cPanel or Plesk. Outbound connections are filtered by the host's firewall, and you cannot see the rules. Send support the full message with the URL and ask whether outbound traffic to that host, or loopback traffic to your own domain, is blocked. "Resolving timed out" here usually means the host's DNS resolver is struggling, which only they can fix.
- A VPS on Ubuntu or Debian. Reproduce the request from the shell, as the same server, so the result is not filtered through WordPress:
curl -sv -o /dev/null --max-time 10 https://example.com/wp-cron.php
getent hosts example.com
If the first times out and the second prints the public address, add a hosts entry pointing the domain at 127.0.0.1 (or the server's private address behind a load balancer), and check the firewall — ufw status or the cloud provider's security group — allows the server to reach its own public IP.
- Docker. Inside a container, the site's domain often resolves to an address the container cannot reach, or to the container itself on a port nothing listens on. Map the domain to the web server container with
extra_hostsin the Compose file, or point it at the service name on the shared network. - Local development tools. A
.localor.testdomain may resolve on your computer but not inside the PHP process. The tool's own hosts handling, or a hosts entry inside its environment, fixes loopbacks; external timeouts on a laptop are usually the network or a VPN. - Cloudflare or another proxy in front. Loopbacks travel out to the proxy and back. A WAF challenge usually comes back fast as a 403, not error 28; a timeout points at the round trip itself, such as a rate limit or the proxy failing to reach the origin in time. Allow your origin's IP in the proxy's firewall rules, or resolve the domain locally as above so the loopback never leaves the machine; the setup is covered in Cloudflare and WordPress.
Why raising the timeout is the wrong first move
For a loopback that is being blocked, the reply is never coming. A longer timeout means each attempt takes longer to fail, admin pages that trigger one get slower, and nothing is repaired.
Finding what is making the request
If the message names no URL, log the requests. With logging enabled through debug mode, a short snippet records every failed outbound call:
add_action( 'http_api_debug', 'ti_log_http', 10, 5 );
function ti_log_http( $response, $context, $class, $args, $url ) {
if ( is_wp_error( $response ) ) {
error_log( 'HTTP failed: ' . $url . ' — ' . $response->get_error_message() );
}
}
Read the log after a short while. A plugin calling a service that no longer exists shows up immediately, and that is a fault to remove rather than to wait longer for — narrowing it down follows fixing plugin conflicts.
Verify
For a loopback, Site Health is the direct test — it should report "Your site can perform loopback requests", and a scheduled post should publish on time. For an external service, trigger the integration deliberately rather than waiting for it to fail on a customer. Check the error log afterwards: a silent retry can hide a timeout on every first attempt.
Frequently asked
- It means a request WordPress made did not get a complete reply within the time allowed. The connection was attempted and the wait began; nothing was refused and no certificate was rejected. The URL in the message tells you whether the slow party was your own site or a remote service.
- First decide whether the URL is your own domain or someone else's. For your own domain, fix what blocks the site from reaching itself: DNS pointing at a proxy, a firewall rule, or HTTP authentication. For an external service, test it from another machine, then raise the timeout only for that host if it is genuinely slow.
- Only for a genuinely slow remote service. Raising it for a loopback that is being blocked makes each failure take longer without ever succeeding, which turns a fast error into a slow one.