cURL错误28:在5001毫秒后解决超时

我使用WordPress,最近我将网站从cpanel主机移至具有Directadmin面板的Linux服务器。 转移后立即意识到客户通过EDD插件下载时遇到以下错误。

cURL error 28: Resolving timed out after 5001 milliseconds

我也收到w3_total_cache插件的错误。 服务器信息:Centos 6.8(最终版)cURL 7.54.0(最终版)directadmin

To resolve this you have to set the curl connection time out and time out value at the time of curl initialization.
Just changes this two property value.

CURLOPT_CONNECTTIMEOUT => 30,
CURLOPT_TIMEOUT => 60,

For more details check This.

cURL error 28: Resolving timed out after 5001 milliseconds means DNS resolving failed.

so just change the DNS server list in /etc/resolv.conf.

or maybe we can bind the hostname and ip address in /etc/hosts.

this image shows the demo.

curl resolving timed out