How to fix a “cURL error 28: Connection timed out” in WordPress ?

I recently received this error on a wordpress site update:

cURL error 28: Connection timed out after 10001 milliseconds with wordpress update.

The Fix:

  1. The first thing to do is to update your WordPress to the latest version if not already done.
  2. Then, 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 Limits settings.
  • The cURL error can be a dns related issue. Your hosting company might need to switch dns configuration to Google, Cloudflare or 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.

More information here: https://www.samuelaguilera.com/post/curl-error-28-wordpress