How to fix a “cURL error 28: Connection timed out” in WordPress
This quick article helps you solve a cURL error 28 in your WordPress site.
cURL error 28: Operation timed out after n milliseconds
or:
cURL error 28: Operation timed out after 30001 milliseconds with 0 bytes received
This problem is a very common server-related issue. In most cases not created by a particular theme or plugin, nor by WordPress.
How to fix it?
The first thing to do is to update your WordPress to the latest version if not already done.
Then if the problem is still there, contact your hosting company and ask the hosting support team to check the following points :
- Make sure your server is running a recent version of PHP and the cURL library.
- Try to increase your Server Memory Limit settings.
- The cURL error can be a DNS related issue. Your hosting company might need to switch DNS configuration to OpenDNS: https://www.howtogeek.com/164981/how-to-switch-to-opendns-or-google-dns-to-speed-up-web-browsing/
- Ask your host if there is some limitation with wp-cron, or if loopback is disabled.
- Ask your host if there a firewall or security modules (e.g. mod_security ) that could block the outgoing cURL requests.
You can also install the Query Monitor plugin and check the status of the HTTP API Calls on the admin page where the error is displayed.