How we fix the wordPress cURL Error 6: could not resolve host?

Hitori Tech
cURL Error 6

cURL Error 6

  1.  First, we log in via SSH and edit /etc/resolv.conf.
vi /etc/resolv.conf
  1. Next, we add Google public name servers and comment on the other nameservers.
nameserver 8.8.8.8
nameserver 8.8.4.4
#nameserver 1xx.1xx.1xx.x
#nameserver 1xx.1xx.1xx.x
  1. Then after making the changes, we restart Apache or Nginx.
service apache2 restart

This fixes the error.

Leave a Comment