How to Fix “cURL Error 28: Connection Timed Out” in WordPress (Complete Guide)

Fix “cURL Error 28: Connection Timed Out
The “cURL Error 28: Connection Timed Out” is a common WordPress issue that occurs when your website fails to communicate with external servers.
This error usually appears in situations like:
- 🔌 WordPress REST API requests failing
- 🛒 WooCommerce payment gateway connection problems
- 🔔 WordPress update checks timing out
- 🌐 Plugin API requests failing
When this happens, some features of your WordPress website may stop working properly.
Fortunately, the issue can be fixed by adjusting server settings and troubleshooting network connections.
⚡ Quick Fix (Try These First)
Before applying advanced solutions, try these quick steps:
1️⃣ Clear WordPress and hosting cache
2️⃣ Disable security plugins temporarily
3️⃣ Check website firewall rules
4️⃣ Restart your hosting server if possible
5️⃣ Update WordPress and plugins
If the error continues, follow the detailed troubleshooting steps below.
⚠️ What Causes cURL Error 28?
This error occurs when a request takes too long to receive a response.
Common causes include:
- Slow DNS resolution
- Hosting firewall blocking requests
- REST API connection problems
- Server timeout limits
- Security plugins blocking outgoing connections
Once the connection issue is fixed, the error disappears.
🔍 Step-by-Step Fix Guide
Follow these solutions one by one.
🔧 1. Check Website Firewall
Some security plugins block external connections used by WordPress.
Common plugins that may block requests include:
- WordPress firewall plugins
- hosting firewall protection
- security plugins with strict rules
To test
1️⃣ Temporarily disable your security plugin
2️⃣ Test the website again
If the error disappears, adjust firewall rules.
🌐 2. Check DNS Configuration
Slow DNS servers can cause request timeouts.
Test your domain DNS using online tools.
If DNS response is slow, consider switching to faster DNS providers such as:
- Google DNS
- Cloudflare DNS
Faster DNS reduces connection delays.
⚙️ 3. Increase cURL Timeout Limit
Sometimes the server timeout value is too low.
You can increase the timeout inside WordPress.
Add this code to your functions.php file:
add_filter( 'http_request_timeout', function( $timeout ) {
return 60;
});This increases the timeout limit to 60 seconds.
🧩 4. Check WordPress REST API
The REST API allows WordPress to communicate with external services.
If REST API is blocked, cURL errors may appear.
Test REST API using this URL:
https://yourwebsite.com/wp-json/
If the page does not load correctly, the REST API may be blocked by security settings.
🧹 5. Disable Plugin Conflicts
Plugin conflicts often cause API connection errors.
To test:
1️⃣ Go to Plugins → Installed Plugins
2️⃣ Disable all plugins except WordPress core features
3️⃣ Test the website again
If the error disappears, re-enable plugins one by one.
🖥️ 6. Check Hosting Server Limits
Sometimes hosting servers block outgoing requests due to resource limits.
Common limits include:
- connection timeout limits
- firewall restrictions
- network connection blocking
If none of the fixes work, contact your hosting support team.
🔐 Prevent cURL Errors in WordPress
Follow these best practices:
✔ Use reliable hosting infrastructure
✔ Keep WordPress and plugins updated
✔ Avoid installing too many security plugins
✔ Monitor server firewall rules
✔ Use a CDN for faster network connections
These steps reduce the chance of API connection problems.
❓ Frequently Asked Questions
💬 What does cURL Error 28 mean in WordPress?
It means a request to an external server took too long and timed out before receiving a response.
💬 Can plugins cause cURL errors?
Yes. Security plugins or poorly coded plugins may block external requests.
💬 Does hosting affect cURL timeout errors?
Yes. Server configuration, firewall rules, and network speed can affect connection requests.
💬 Is this error dangerous for my website?
No. It usually affects background processes like updates or API connections but can be fixed easily.
🔗 Related WordPress Fix Guides
You may also find these helpful:
- Fix “Error Establishing a Database Connection” in WordPress
- Fix “Too Many Redirects” Error After Installing SSL
- Configure SMTP for WordPress (Fix Emails Going to Spam)
These troubleshooting guides solve other common WordPress issues.
The “cURL Error 28: Connection Timed Out” issue usually occurs because WordPress cannot communicate with an external server in time.
By checking firewall rules, DNS configuration, REST API settings, and server timeout limits, most website owners can fix the problem quickly.
Once resolved, your WordPress site will communicate normally with external services and plugins.

