img-1

cURL Error 28 Connection Timed Out: 5 Powerful Strategies to Fix cURL Error in Your WordPress Website

If you are running a WordPress site, cURL Error 28 Connection Timed Out is one of the most common WordPress Rest API issues you might have encountered.  

cURL (stands for Client URL) indicates a PHP library that permits your WordPress website to communicate with other WordPress websites. A failed rest api request or cURL Error 28 can harm your website’s performance and user experience. 

cURL error 28

Here, we will explore the reasons behind the cURL error 28 and show you how easily you can fix this cURL Error 28 issue by implementing the solutions mentioned in the article.

What is the cURL Error 28 Connection Timed-Out Error?

cURL is used by WordPress and other web applications to receive and send data requests by using URLs.

cURL error 28, indicating a connection timeout error, is the most common WordPress Rest API issue. It occurs when a cURL request from your WordPress website takes too long to complete the process.

This cURL Error 28 is displayed as “The Rest API encountered an error” in the Site Health status section of your WordPress dashboard.

Document

Get The Best PageSpeed Score

For Your WordPress Website

All in One Optimization Plugin
No Coding Knowledge Required

The 5 Reasons Behind the cURL Error 28 connection timed-out error

Due to several reasons, you can encounter the the cURL Error 28 on your WordPress site. Here we will mainly concentrate on the 5 reasons behind this cURL Error 28.

Check More: http 500 Error

  • cURL error 28 can be triggered for a slow server response time

If your WordPress website is trying to connect with an external server that provides a slow response then you can see the connection timed out message in your WordPress dashboard. Even some external servers are not responding at all. This also encounters cURL error 28

Erron Connection Time out
  • cURL error 28 Happens Due to a Firewall Issues

Sometimes, your hosting provider sets strict firewall rules on your WordPress website that might block or limit outgoing connections. These firewall issues also cause the cURL error 28 in the WordPress website.

  • An Insufficient PHP Server Memory Limit of the WordPress Site Can be the Reason for the cURL error 28
PhP memory limit

By default, the timeout limit for your server is very low on your WordPress site. So it may not be ample to complete the data transfer process. Thus you can see a cURL error in your WordPress dashboard.

  • cURL error 28 Can be Encountered for Incorrect API Endpoints

When your WordPress website is attempting to connect with an external service, ensure that the API endpoint is correct. Because an incorrect API endpoint can lead to a cURL error 28

  • A Misconfigured DNS Can Lead to the cURL error 28
DNS Missmatch

If your Domain Name System (DNS) server is having internal issues or is misconfigured, it can be the reason for encountering cURL error 28 in your WordPress dashboard. This error is caused by failed outgoing cURL requests.

The 5 Strategies to Fix this cURL Error 28 in Your WordPress?

If you see cURL Error 28 on your WordPress website, you need to fix it to ensure smooth operation and enhance your user experience. Let’s explore five effective strategies for fixing this error.

Disable Your WordPress Firewall

A WordPress firewall plugin or security plugin is used to provide an extra security layer to your WordPress site. But sometimes, it prevents the outgoing connection

Document

Get The Best PageSpeed Score

For Your WordPress Website

All in One Optimization Plugin
No Coding Knowledge Required

So, if you are using any WordPress security plugin or firewall plugin, then you need to temporarily deactivate this plugin. If this issue is resolved, then check which API requests have been blocked in your firewall logs. According to that, you need to adjust your WordPress firewall settings.

Check more: Err Too Many Redirects

Deactivate Your WordPress Plugins

A WordPress plugin makes its own API request to transfer data (send and receive the data). When you use too many plugins on your website for better performance, this process takes a lot of time, indicating a cURL error in your WordPress site health report.

Plugin deactivate

By deactivating your WordPress plugins one by one, you can easily find the offending plugins.  

You need to follow the steps to deactivate WordPress plugins:

  • Go to your WordPress admin panel and click on the Plugins then click on Installed Plugins.
  • Click on Deactivate.

After deactivating the plugin, you need to check the site’s health status. If the error message disappears, that indicates this particular WordPress plugin is the culprit. Then, you need to reactivate the rest of the plugins.  

Verify Your DNS Settings

As we previously mentioned, a misconfigured or poorly configured DNS server, can prevent WordPress from processing an HTTP request. This can be also a reason behind a cURL Error 28 in your WordPress site.

Document

Get The Best PageSpeed Score

For Your WordPress Website

All in One Optimization Plugin
No Coding Knowledge Required

If you identify the issue with your DNS server, you must contact your WordPress hosting company.

Check Your PHP Version and cURL Library Version

You must ensure that your web hosting is using the latest version of PHP and cURL library. To check this PHP and cURL library version, you need to follow the below steps:

  •  After logging in to your WordPress admin panel go to the Tool section and click on Site Health.
Tool then site health
  • Click on the Info tab and go to the Server section.
  • Then you can see your PHP version and cURL version.
php and curl version

Your PHP version should be higher than 7.4.13, and the cURL version should be higher than 7.74.0 to avoid a cURL timeout error. Otherwise, to update your WordPress version, you need to contact your web hosting provider. 

Ask for Help From Your Hosting Provider

Finally, you have tried all the strategies and updated everything including your WordPress Theme, but you are still facing cURL error 28 connection timeout. Then, for this purpose, contact your web host company for help. 

Document

Get The Best PageSpeed Score

For Your WordPress Website

All in One Optimization Plugin
No Coding Knowledge Required

Wrapping Up

Dealing with cURL Error 28 Connection Timed Out can sometimes be frustrating. But here, you have understood the reason behind this timeout error and explored powerful strategies to fix it. This can make the process smoother.