cURL error 28

Want to fix the “cURL error 28” on your WordPress website?

It’s common to encounter errors while operating a WordPress website. The “cURL error 28” occurs when the cURL (a communication tool) operation times out after the server takes too long to respond to a request.

In the following tutorial, you will learn why the server fails to respond to a request, what exactly the cURL is used for, and how to remove the cURL error and get your WordPress website up and running in no time.

Let’s get started.

What is the cURL error 28? Why does it occur?

curl error 28 wordpress

To understand the cURL error 28, you must first understand the role of cURL in your WordPress website.

Short for Client for URL, cURL is a tool used to communicate with external services such as social media platforms, payment gateways, and email marketing services, among other things.

Beyond that, cURL is also used while updating plugins, themes, and the WordPress core. The tool connects with the wordpress.org servers and helps retrieve the latest software version.

In more technical terms, cURL lets WordPress (and other services) send and receive data using URLs.

πŸ‘‰ There are different types of cURL errors and they occur due to reasons like:

  • Failure of SSL certificate verification because it’s outdated or invalid or due to incorrect server configuration.
  • Inability to connect with remote servers (of wordpress.org, email marketing services, payment gateway, and social media API servers) due to slow server response time, network connectivity issues, incorrect server configurations, or firewall restrictions.
  • The remote server returns an HTTP error code, which can be caused due to problems with the database, website code, or server configurations.
  • Outdated versions of WordPress, plugins, themes, and even PHP can cause cURL errors due to incompatibilities with newer versions of cURL.
  • DNS issues like incorrect DNS records, misconfigured DNS servers, or DNS cache issues can also cause the cURL error.

While these are the common causes of cURL errors, the cURL error 28 typically occurs due to the cURL operation timing out happening because the server took too long to respond.

Before we dive 🀿 into the solution, let’s take a look at some of the cURL error variations:

  • CURLE_OPERATION_TIMEDOUT or cURL error: 28 (OPERATION_TIMEOUTED)
  • CURLE_COULDNT_CONNECT
  • CURLE_SSL_CACERT
  • CURLE_HTTP_RETURNED_ERROR

How to fix the cURL error 28

To fix the cURL error 28, you can try the following troubleshooting steps:

  1. Disable the firewall πŸ”₯
  2. Deactivate plugins πŸ”Œ
  3. Check for SSL misconfiguration πŸ”’οΈ
  4. Update PHP & cURL versions πŸ“₯
  5. Verify DNS settings πŸ‘¨β€πŸ’»

Please note that you don’t have to complete all the steps simultaneously. You need to take one step at a time and then check your site to see if the error is gone. If the error persists, then proceed with the next step.

Also, take a backup of your website before trying any of these troubleshooting steps.

In the following solutions, you will be asked to carry out steps like deactivating plugins and updating PHP versions, among other things. These solutions could cause your website to break. The backup will be your safety net. In case things don’t go as planned, you can get your website up and running using the backup.

One more thing: clear your browser cache and check whether the error is still showing.

Browser caching is a technique used by web browsers to temporarily store website data, such as images and stylesheets, to reduce page loading time for subsequent visits to the same page.

Some WordPress errors appear temporarily and get removed within a few minutes. But you may still see the error because you are shown the cached page version. Therefore, clear your cache and make sure the error is still showing on your site before proceeding with the solutions.

1. Disable the firewall πŸ”₯

Firewalls are meant to monitor your site and prevent malicious visitors from accessing it. Sometimes the firewall accidentally blocks legitimate requests causing a delay in the server response and this triggers the cURL error 28.

WordPress websites contain different types of firewalls. Some sites have a dedicated plugin installed, others have a firewall installed as an add-on to a security plugin or CDN (content delivery network).

You can disable the standalone dedicated firewall plugin from your WordPress dashboard (or via FTP if you can’t access your WordPress dashboard).

As for security services, a few of them have dashboards that can be accessed from the WordPress dashboard and others have external dashboards that can be accessed from the security plugin’s website. Wherever the dashboard is located, you need to find it and disable the firewall.

deactivating firewall

CDNs also typically have external dashboards. Access it and disable your CDN’s firewall.

Now check whether your website is still showing the cURL error 28.

If disabling the firewall didn’t work then try the next solution.

2. Deactivate plugins πŸ”Œ

WordPress plugins and themes often make API requests to send and receive data from remote servers. When remote servers take too long to respond to that request, cURL operation times out triggering the cURL error 28.

So in this section, we will figure out whether a plugin or theme is causing the error on your website by deactivating them.

To deactivate your current theme, go to Appearance β†’ Themes and activate any default WordPress themes like Twenty Twenty-Three or Twenty Twenty-Two, etc. Then check if the error is gone.

activating default wordpress themes

Next, deactivate all the plugins by going to Plugins β†’ Installed Plugins. Select all the plugins, choose the Deactivate option, and hit the Apply button.

deactivate plugins from wp-admin - cURL error 28

Check your site to see whether the error is showing. If it’s not then the next step is to find the culprit plugin.

This can be done by activating the plugin individually and then checking your website each time a plugin is activated. The culprit plugin will trigger the error as soon as it’s activated. Remove that plugin from your site and replace it with an alternative.

If you can’t access your WordPress dashboard, you can disable themes and plugins using FTP.

3. Check for SSL misconfiguration πŸ”’οΈ

Improper SSL installation causes web servers to consider certain cURL requests as insecure. This can trigger errors like the cURL error 28 or cURL error 7 (http_request_failed).

To verify whether your SSL certificate is the real culprit, you need to check your SSL installation using the Qualys SSL Labs test. Just insert your URL and hit the Submit button. The tool will run a few tests and show you any misconfigurations it finds in your SSL installation.

SSL misconfigurations can be resolved by reinstalling the certificate.

For reinstallation, you will need to seek help from your SSL vendor which could be your hosting provider or an independent SSL provider.

4. Update PHP & cURL versions πŸ“₯

To check whether you are using the latest versions of PHP and cURL do a quick Google search and note down the latest versions of both software.

Next, open your WordPress dashboard and go to Tools β†’ Site Health β†’ Info β†’ Server.

checking php and curl version in wp-admin

Do your PHP and cURL versions match with the latest versions? If not then you need to update them. We have already covered how to update PHP in a different article. As for updating the cURL, you need to contact your hosting server and ask them to update the software for you.

5. Verify DNS settings πŸ‘¨β€πŸ’»

A DNS misconfiguration can also cause the cURL error 28 to appear on a WordPress website.

DNS misconfiguration can occur on your local computer or your hosting server. We recommend verifying your computer’s DNS settings first. Here’s how:

πŸ‘‰ Windows

Using the Windows start button, go to Settings β†’ Network & Internet, select Wi-Fi or Ethernet, whichever you are using, and check on Properties.

wifi properties windows - cURL error 28

Select the Edit button in the DNS server assignment option. A new window will appear with a dropdown menu. From the menu select Manual and toggle the IPv4 option On.

Then in the Preferred DNS box, enter the following Google Public DNS address: 8.8.8.8.

And in the Alternate DNS box, enter the Cloudflare DNS address: 1.1.1.1.

Hit the Save button and check whether the cURL error is still appearing on your website.

adding preferred and alternate dns in windows

πŸ‘‰ macOS

Go to System Preferences β†’ Network.

Select your current local area connection and hit the Advanced button.

Next, select the DNS tab.

Click on the + button at the bottom of the DNS servers list and enter an IPv4 (8.8.8.8) or IPv6 (2001:4860:4860::8888) address.

Make sure to click OK when you’re finished.

How to edit DNS on macos for DNS_PROBE_FINISHED_NXDOMAIN fix

If the error is still showing, talk to your hosting provider. Tell them about all the steps you have taken to fix this error. They should be able to quickly verify and fix any errors from their end.

Fix cURL error 28 for good 🧰

The cURL error 28 is a common WordPress error that occurs due to reasons like SSL certificate misconfiguration, outdated software, DNS misconfiguration, and inability to connect with remote servers, among other things.

To fix this particular WordPress error, you need to take the following steps:

  • Disable the firewall
  • Deactivate plugins
  • Check for SSL misconfigurations
  • Ensure PHP and cURL are up-to-date
  • Verify DNS settings on your computer and hosting server

πŸ’»οΈ For some other ways to keep your WordPress site working, you can check out our guide πŸ‘‰ on how to fix 20+ common WordPress errors.

If you have any questions about the cURL error 28, let us know in the comment section below.

Free guide

4 Essential Steps to Speed Up
Your WordPress Website

Follow the simple steps in our 4-part mini series
and reduce your loading times by 50-80%.Β πŸš€

Free Access

Or start the conversation in our Facebook group for WordPress professionals. Find answers, share tips, and get help from other WordPress experts. Join now (it’s free)!