Fixing the cURL Error 28: Connection Timeout - A Complete Guide

Fixing the cURL Error 28: Connection Timeout - A Complete Guide

cURL mechanism is used to handle API requests. It allows applications to send and receive data from other web applications using URLs. In WordPress, it does the exact same thing. You install it as an extension to your PHP. Overall, it has a big impact on how your WordPress website works. You always need to keep it configured properly, otherwise you’ll run into errors like the Error 28: Connection Timeout error. In this article, we explain what this error is and how to fix it.

What is cURL Error 28 in WordPress?

In most cases, you’d receive this error because your WordPress cannot establish a connection with the server. It cannot respond to the server’s incoming requests. As you might know, WordPress uses REST API for communication with other applications. When they get timed out, you see the error message as “The REST API encountered an error”.


To get the detailed report on the error, you must expand the Site Health. And you’ll get to see the following message:

Error: cURL error 28: Operation timed out after x milliseconds with x bytes received (http_request_failed)

There are a number of reasons why cURL may time out in WordPress. In the subsequent sections, we’ll see some of the reasons and guide you through how to fix this error.

What Causes cURL Timeout Error?

The main reason why people run into this error is because of a WordPress firewall plugin. It blocks the REST API requests made to the WordPress website treating them as hacking attacks.

A poorly configured server is another reason why you may see this error. It may have a low timeout threshold.

Finally, the problem might be with the DNS server. It might not be functioning correctly, which would force the HTTP request to fail.

When diagnosing the problem, you need to test with either of the three. Once you’ve figured out the problem, you can move ahead with fixing it, which is discussed in the next section.

Fixing the cURL Error 28

Here are the ways you can use to fixing the error:

Disable WordPress Firewall

The first thing you should be doing is disabling the Wordpress Firewall temporarily and checking if the problem is resolved. You can do this by going into the health report. If so, then you need to keep the firewall turned off until you find an alternative solution.

If there’s a problem, you can allow legitimate API requests by making the desired changes.

Deactivate the Plugins

Another way to fix the cURL error 28 is to deactivate the plugins. The plugins use API requests to communicate with each other and the WordPress system. If the requests are in excess, then this can result in cURL error because WordPress wouldn’t be able to cope up with so many requests.

So you need to deactivate a few of the plugins and checking if the problem is solved.

Ensure Your Hosting Server is Up to date

Next, you need to check the version of the software your hosting provider is using. Check for PHP, cURL, OpenSSL, and other things your WordPress hosting server is using.

Your Site Health page lists all these things. Navigate into Tools > Site Health > Info for these information.

Fix SSL Insecure Content Problems

Your website must be using a HTTPS or SSL certificate. But if they aren’t configured properly, then you’ll run into cURL 28 among other errors. Likewise, if you don’t have HTTPS in the first place but still making API requests, then the requests will be turned down as well.

For fixing this error, you need to ask your hosting provider to reinstall the SSL certificates.

If the problem persists even after you’ve tried the above-mentioned measures, contact your hosting provider.
First release
Last update
0.00 star(s) 0 ratings

More resources from kumkumsharma