WP HTTP Error: cURL error 28: Connection timed out
WP HTTP Error: cURL error 28: Connection timed out WordPress cURL Error 28: Connection Timed Out Error
What This Error Means
The cURL error 28 in WordPress signifies that the server attempted to establish a connection with another server (often for API calls, plugin updates, or external resource access) but failed to do so within the pre-defined time limit. This typically implies a problem with network connectivity or server performance preventing successful communication.
Common Causes
- Server is overloaded or has insufficient resources to handle requests promptly.
- Firewall is blocking outgoing connections to the target server.
- The target server is down or unreachable.
- DNS resolution issues preventing the server from resolving the target server's IP address.
- Slow internet connection or network latency between the WordPress server and the target server.
How to Fix It (For Users)
- 1 Check your internet connection to ensure it's stable.
- 2 Temporarily disable plugins and themes to rule out conflicts that might be causing delays.
- 3 Try again later, as the target server might be temporarily unavailable.
For Site Owners / Developers
- Increase the 'timeout' value for HTTP requests in your wp-config.php file using `define('WP_HTTP_BLOCK_EXTERNAL', false);` and `define('WP_HTTP_CONNECT_TIMEOUT', 30);` (adjust the timeout value as needed).
- Investigate server resource usage (CPU, memory) to identify potential bottlenecks. Optimize server configuration or upgrade resources if necessary.
- Review firewall rules to ensure outgoing connections to necessary external servers are permitted.
- Use a DNS lookup tool to verify that the server can resolve the target server's domain name correctly.
- Check server logs for more detailed error messages related to the failed connection.
When It Is NOT Your Fault
This error can occur due to issues on the target server's end. If the target server is experiencing downtime, high traffic, or network problems, your WordPress site will be unable to connect to it, resulting in the cURL error 28.
Is the website actually down?
Sometimes the issue is just on your end. Check if the website is down for everyone or just you.
Check Website Status →Recommended Tool to Prevent This Error
Prevent server timeouts and resource exhaustion with scalable cloud infrastructure.