Skip to content

Fix WordPress cURL error 28 and 60 on outbound requests

Fix WordPress cURL error 28 (operation timed out) and cURL error 60 (SSL certificate problem) when plugin updates, license checks or payment APIs fail on a cPanel server. You will replay the failing request from the server, see which step stops it, and repair that step without switching off certificate checks.

Your plugin update stops with “Update failed: Download failed. cURL error 28: Connection timed out after 10001 milliseconds”, or a license check or payment gateway logs “cURL error 60: SSL certificate problem: unable to get local issuer certificate”. Both messages come from cURL, the library PHP uses to make web requests. Error 28 means something on the way stayed silent until a time limit ran out. Error 60 means the server reached the other host but could not verify its certificate. The fix is to replay the same request from the server, read which step fails, and repair that one step.

What you’ll accomplish

  • Reproduce the failing request from the server with WP-CLI and curl, so you see the same error WordPress sees.
  • Tell a DNS, firewall, network route or slow-remote timeout apart from the wording of the error.
  • Fix error 60 in the right trust store, which for WordPress core is not the one set in php.ini.
  • Give one slow vendor API more time without raising every timeout on the site.
  • Confirm the result with the Site Health check that talks to WordPress.org.

Prerequisites

You need SSH or cPanel Terminal access as the account user, and WP-CLI (the wp command) in the account’s path. The resolver, firewall and clock fixes need root on the server or a WHM login, and each step says so.

The steps assume WordPress 6.x or 7.x on PHP 8, on AlmaLinux, Rocky Linux or CloudLinux 8 or 9 with CSF (ConfigServer Security & Firewall). Paths differ slightly on older systems. CSF’s original developer stopped work on it in August 2025. Maintained forks carry it on with the same csf.conf settings.

This article covers requests to other hosts, such as api.wordpress.org, downloads.wordpress.org or a vendor’s API. When the failing request goes to your own domain, as in the Site Health “REST API” and “loopback” items, the path is different. Our guide on clearing Site Health critical issues on cPanel covers that case.

How it works

WordPress sends every outbound call through its HTTP API, the wp_remote_get() family of functions. That API hands the request to PHP’s cURL extension. Before any data comes back, the request passes the checkpoints in the diagram, and each one fails with its own wording.

Path of an outbound WordPress request. On your server it goes from WordPress through a DNS lookup to the firewall and route, then on the internet through the TLS handshake to the remote reply. DNS failure gives cURL error 28 Resolving timed out, a firewall or route failure gives cURL error 28 Connection timed out, a certificate failure gives cURL error 60 SSL certificate problem, and a slow remote gives cURL error 28 Operation timed out. Success is 200 OK with a body.

Error 28 is always a time limit. WordPress gives most requests 5 seconds, the default of the http_request_timeout filter. Update checks from the admin get about 3 seconds (30 when they run from cron), and package downloads get 300. Separately, the Requests library inside WordPress allows 10 seconds to open the connection. The phrase after the number tells you where the time ran out:

  • “Resolving timed out” means the DNS lookup never finished.
  • “Connection timed out” means the TCP connection never opened. A firewall silently dropping packets or a dead network route causes this.
  • “Operation timed out … with 0 bytes received” means the connection opened, but the remote host did not answer in time.

Error 60 happens during the TLS handshake, the setup of the encrypted connection. cURL checks the remote certificate against a CA bundle, a file listing the certificate authorities your side trusts. WordPress core passes its own file, wp-includes/certificates/ca-bundle.crt, and ignores the server’s store. Plugins that call cURL directly, or ship a vendor’s software development kit (SDK), use the server’s store or a bundle of their own. The words after “SSL certificate problem:” name the reason.

Step-by-step

1. Write down the exact error text. The message appears on the Plugins or Dashboard → Updates screen, in a plugin’s own log, or under Tools → Site Health. There, a failure shows as “Could not reach WordPress.org” with a line like this:

Your site is unable to reach WordPress.org at 66.6.42.251, and returned the error: cURL error 28: Connection timed out after 10003 milliseconds

Note the error number, the phrase after it, and the address. The address is what your server’s DNS returned for api.wordpress.org.

2. Reproduce the request from WordPress itself. As the account user, run the request from the site folder through the same HTTP API.

cd ~/public_html
wp eval '$r = wp_remote_get( "https://api.wordpress.org/core/version-check/1.7/" ); echo is_wp_error( $r ) ? $r->get_error_message() : wp_remote_retrieve_response_code( $r ), PHP_EOL;'

A healthy site prints 200. Example output from a failing one:

cURL error 28: Connection timed out after 5010 milliseconds

Swap in your vendor’s API address to test a license server or payment gateway. Any status code, even 401 or 404, means the network path works, because the remote host answered.

3. Replay it with curl and read the timing. This runs outside WordPress, so it separates server problems from WordPress settings.

curl -sS -o /dev/null --max-time 10 -w 'dns=%{time_namelookup} connect=%{time_connect} tls=%{time_appconnect} first_byte=%{time_starttransfer} ip=%{remote_ip} code=%{http_code}\n' https://api.wordpress.org/core/version-check/1.7/

Example output from a healthy server:

dns=0.002010 connect=0.027262 tls=0.062385 first_byte=0.088097 ip=66.6.42.251 code=200

Each value counts seconds from the start, so each field is larger than the one before. A failing request prints an error line as well. Match it to the step that owns it:

curl printsWhere it stoppedGo to
curl: (28) Resolving timed out after 10002 millisecondsDNS lookupStep 5
curl: (6) Could not resolve host: api.wordpress.orgDNS lookupStep 5
curl: (28) Connection timed out after 10001 millisecondsFirewall or routeSteps 6 and 7
curl: (7) Failed to connect to api.wordpress.org port 443: Connection refusedFirewall set to rejectStep 6
curl: (28) Operation timed out after 10001 milliseconds with 0 bytes receivedSlow remoteStep 8
curl: (60) SSL certificate problem: …Certificate checkSteps 9 and 10

4. If curl works but WordPress fails, check the WordPress settings. Two wp-config.php constants can stop outbound requests before they leave PHP. WP_HTTP_BLOCK_EXTERNAL blocks every host except your own site, and WP_ACCESSIBLE_HOSTS lists the exceptions.

wp config get WP_HTTP_BLOCK_EXTERNAL
wp config get WP_ACCESSIBLE_HOSTS

When neither is set, each command answers Error: The constant or variable 'WP_HTTP_BLOCK_EXTERNAL' is not defined in the 'wp-config.php' file., with the matching name. That is the normal result. When the block is on, step 2 prints a message starting with “User has blocked requests through HTTP”. Since WordPress 7.0, the message also names the URL. Add the hosts you need, comma-separated. A * works as a wildcard.

wp config set WP_ACCESSIBLE_HOSTS 'api.wordpress.org,*.wordpress.org,api.vendor.example'

WP-CLI confirms with Success: Added the constant 'WP_ACCESSIBLE_HOSTS' to the 'wp-config.php' file with the value 'api.wordpress.org,*.wordpress.org,api.vendor.example'. Also look for WP_PROXY_HOST, because a proxy that no longer exists produces the same timeouts.

5. DNS: test each resolver. A resolver is the DNS server your machine asks to turn names into addresses. List them and time a lookup.

cat /etc/resolv.conf
dig +noall +answer +stats api.wordpress.org A

Example output:

nameserver 203.0.113.53
nameserver 198.51.100.53
api.wordpress.org.	345	IN	A	66.6.42.251
;; Query time: 2 msec
;; SERVER: 203.0.113.53#53(203.0.113.53)
;; WHEN: Mon Sep 28 09:12:40 EDT 2026
;; MSG SIZE  rcvd: 68

Then ask each nameserver line directly, replacing the address:

dig @198.51.100.53 +time=2 +tries=1 api.wordpress.org A

A dead resolver answers ;; connection timed out; no servers could be reached. Newer dig releases word the first part differently but still end with ;; no servers could be reached. The system tries resolvers in order and waits 5 seconds for each by default. So one dead first entry costs 5 seconds per lookup, which is the whole default WordPress timeout. As root, open WHM → Networking Setup → Resolver Configuration, put working resolvers first, and remove dead ones. Run dig again and expect a query time in milliseconds.

6. Firewall: check CSF’s outbound ports. CSF only lets the server open connections to the ports listed in TCP_OUT, and to TCP6_OUT for IPv6. As root, read the settings.

grep -E '^(TCP_OUT|IPV6|TCP6_OUT|DROP_OUT) ' /etc/csf/csf.conf

Example output:

TCP_OUT = "20,21,22,25,37,43,53,80,110,113,443,587,873,993,995,2086,2087,2089,2703"
IPV6 = "1"
TCP6_OUT = "20,21,22,25,37,43,53,80,110,113,443,587,873,993,995,2086,2087,2089,2703"
DROP_OUT = "DROP"

Both lists allow 443, which covers WordPress.org. A vendor API on another port, such as 8443, is still blocked, and DROP makes the request wait until it fails with error 28. With the default DROP_OUT = "REJECT", the same block fails at once with error 7. Add every port your vendors use to both lists. CSF logs blocked attempts to the system log.

grep 'TCP_OUT Blocked' /var/log/messages | tail -n 2

Example output:

Sep 28 09:14:07 host kernel: Firewall: *TCP_OUT Blocked* IN= OUT=eth0 SRC=203.0.113.20 DST=192.0.2.44 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=48213 DF PROTO=TCP SPT=51734 DPT=8443 WINDOW=64240 RES=0x00 SYN URGP=0 UID=1004 GID=1004

DPT is the port that was refused, and UID is the account user that tried. Add the port under WHM → Plugins → ConfigServer Security & Firewall → Firewall Configuration, or edit csf.conf and run csf -r to reload. It finishes with no error. Also run csf -g with the remote address, for example csf -g 192.0.2.44, to see whether it sits in the deny list. A clean result reads No matches found for 192.0.2.44 in iptables. If nothing is logged and connections still time out, suspect a firewall at your provider. Our guide to a baseline CSF configuration on cPanel covers the other settings.

7. Route: compare IPv4 and IPv6. WordPress.org answers on both, so test each one with a 5-second limit.

curl -4 -sS -o /dev/null --connect-timeout 5 -w '%{remote_ip} %{time_connect}\n' https://api.wordpress.org/
curl -6 -sS -o /dev/null --connect-timeout 5 -w '%{remote_ip} %{time_connect}\n' https://api.wordpress.org/

Example output where IPv6 is broken:

66.6.42.251 0.031204
curl: (28) Connection timed out after 5001 milliseconds
 0.000000

cURL tries IPv6 and IPv4 side by side, so a dead IPv6 path alone usually costs only a short delay. Combined with another IPv4 problem, it makes failures look random. The real fix is the route, so send this output to your provider. Meanwhile, you can prefer IPv4 server-wide by adding this line to /etc/gai.conf as root:

precedence ::ffff:0:0/96  100

Or force IPv4 for WordPress only with a must-use plugin, a PHP file in wp-content/mu-plugins/ that loads on every request. Save it as wp-content/mu-plugins/outbound-ipv4.php:

<?php
/**
 * Plugin Name: Outbound HTTP over IPv4
 */
add_action( 'http_api_curl', function ( $handle ) {
    curl_setopt( $handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
} );

Run step 2 again. It prints 200 in under a second.

8. Slow remote: raise the timeout for that host only. Sometimes connect and tls are quick, yet you get “Operation timed out … with 0 bytes received”. The remote host took too long to answer, so check the vendor’s status page first. The http_request_timeout filter only changes the 5-second default, and plugins that pass their own timeout ignore it. The http_request_args filter runs after that, so it works for every caller. Save this as wp-content/mu-plugins/vendor-timeout.php, with your vendor’s hostname:

<?php
/**
 * Plugin Name: Longer timeout for one slow API
 */
add_filter( 'http_request_args', function ( $args, $url ) {
    if ( 'api.vendor.example' === wp_parse_url( $url, PHP_URL_HOST ) ) {
        $args['timeout'] = 15;
    }
    return $args;
}, 10, 2 );

Keep the value at 15 seconds or less. Each waiting request holds a PHP worker, and a page that calls the API waits too.

9. Error 60: find out which trust store fails. Read the reason after “SSL certificate problem:” first.

  • “unable to get local issuer certificate” means the trust store lacks the root, or the remote host left out an intermediate certificate.
  • “certificate has expired” or “certificate is not yet valid” points at the server clock first (step 10).
  • “self-signed certificate in certificate chain” usually means a device on your network is decrypting TLS traffic, such as a filtering proxy.

Now test the remote host against both stores. The first command uses the server’s store, the second WordPress’s bundle.

curl -sS -o /dev/null -w '%{ssl_verify_result}\n' https://api.vendor.example/
curl -sS -o /dev/null -w '%{ssl_verify_result}\n' --cacert ~/public_html/wp-includes/certificates/ca-bundle.crt https://api.vendor.example/

0 means the chain verified. If only the WordPress bundle fails, update WordPress core, because the bundle ships with it. Its date is on one line:

grep -m1 'as of' ~/public_html/wp-includes/certificates/ca-bundle.crt

Example output: ## Certificate data from Mozilla as of: Thu Jul 16 03:12:01 2026 GMT. If both stores fail, look at the chain the remote host sends.

echo | openssl s_client -connect api.vendor.example:443 -servername api.vendor.example -showcerts 2>/dev/null | grep -E '^ *[0-9] s:|^ *i:'

Example output from a correct chain:

 0 s:CN=api.vendor.example
   i:C=US, O=Let's Encrypt, CN=YE2
 1 s:C=US, O=Let's Encrypt, CN=YE2
   i:C=US, O=ISRG, CN=Root YE

A chain that stops at 0 is missing its intermediate, which the vendor must fix. An issuer you do not recognise is the intercepting device from the list above. When the server’s store is old, update it as root with dnf update ca-certificates.

Plugins that use their own cURL code follow PHP’s settings instead. Check them with the PHP version your site runs, for example /opt/cpanel/ea-php83/root/usr/bin/php -r 'print_r(openssl_get_cert_locations());'. Empty ini_cafile means the system default applies. Setting curl.cainfo or openssl.cafile in cPanel’s MultiPHP INI Editor affects those plugins, but not WordPress core requests.

10. Check the server clock. A clock that is off by days makes valid certificates look expired or not yet valid.

timedatectl

Example output:

               Local time: Mon 2026-09-28 09:21:44 EDT
           Universal time: Mon 2026-09-28 13:21:44 UTC
                 RTC time: Mon 2026-09-28 13:21:44
                Time zone: America/Toronto (EDT, -0400)
System clock synchronized: yes
              NTP service: active
        RTC in local mode: no

If you see System clock synchronized: no, start chronyd, the time-sync service, with systemctl enable --now chronyd as root. Then run chronyc makestep to correct the clock at once. It answers 200 OK. Once chronyd has synced, timedatectl shows System clock synchronized: yes.

Validate it works

Run step 2 again for each host that failed: api.wordpress.org, downloads.wordpress.org and your vendors. Every one should print 200 or another status code, never a cURL error. Then run the same test Site Health uses:

wp eval 'require_once ABSPATH . "wp-admin/includes/class-wp-site-health.php"; $r = WP_Site_Health::get_instance()->get_test_dotorg_communication(); echo $r["label"], PHP_EOL;'

The expected output is Can communicate with WordPress.org. Finally, retry the update from Dashboard → Updates and confirm it completes.

Troubleshooting

It works from SSH but still fails in the admin. The website may run a different PHP version from your shell. Compare MultiPHP Manager with php -v, and repeat step 2 with that version’s binary under /opt/cpanel/. A different php.ini can carry a different CA setting.

It fails only some of the time. One dead resolver out of two, or a flaky IPv6 path, is the usual cause. Run the step 3 command ten times and watch which field jumps.

Error 7 “Connection refused” comes back instantly. That is CSF rejecting the port (step 6), or the remote port is closed. It is not a timeout, so raising timeouts will not help.

When this is the wrong approach

Do not switch off certificate checks. Setting sslverify to false, or returning false from the https_ssl_verify filter, hides error 60. It also lets anyone in the path pose as the update server or the payment API. Raising the global timeout to 60 seconds is the other trap. It hides a broken resolver and makes every page that calls out wait longer.

On shared hosting without root, steps 5, 6, 7 and 10 belong to your host. Send them the output of step 3, which names the failing layer. WordPress documents the HTTP API in its HTTP API handbook, and curl lists every error number in its libcurl error codes reference.

Running WordPress that earns real money deserves an operator — Stack Harbor runs that stack under Enterprise WordPress; book an infrastructure consult.