Get The Best PageSpeed Score
For 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.
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.
Page Contents
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.
Get The Best PageSpeed Score
For Your WordPress Website
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
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
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.
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.
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.
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.
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.
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.
Get The Best PageSpeed Score
For Your WordPress Website
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
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.
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:
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.
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.
Get The Best PageSpeed Score
For Your WordPress Website
If you identify the issue with your DNS server, you must contact your WordPress hosting company.
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:
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.
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.
Get The Best PageSpeed Score
For Your WordPress Website
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.