So you’re trying to use your favorite WordPress plugin but an ugly cURL error 28 is being displayed in your screen or error log… Something like
cURL error 28: Connection timed out after X milliseconds
or
cURL error 28: Operation timed out after X milliseconds with 0 out of 0 bytes received
What’s going on? If you search in Google you will find that in fact it’s a very common issue and it’s not tied to any plugin or WordPress itself, it’s something directly related with a server component, the cURL library, so it can affect to any web software using cURL.
In this article I’m going to explain you a few things that hopefully will help you to understand what’s the issue and things that you may check in order to fix it.
But what the hell is cURL?
When talking about WordPress, cURL is a PHP library that helps WordPress to communicate with other sites. Being a PHP library means that if you’re using an obsolete PHP version (anything older than PHP 7.0) you’re for sure also using an obsolete cURL version. So the first thing you need to do if you’re having issues with cURL is to upgrade your PHP version to at least 7.0.x or the latest PHP 7.x stable release.
Note that on some server setups (e.g. cheap shared hosting) selecting a newer PHP version to run your site doesn’t necessarily means that you’re going to use a recent cURL version.