0 votes
1.2k views
by (1.5k points)

Following error shown while importing demo data for theme.

WordPress function wp_remote_get() test failed. Looks like your server is not fully compatible with WordPress. Contact your hosting provider.
Error: cURL error 6: Couldn't resolve host 'www.example.com'

Fatal error: Cannot use object of type WP_Error as array in /home/username/public_html/site/wp-content/themes/mytheme/functions/importer/import.php on line 503

1 Answer

0 votes
by (10.3k points)

It is clearly indicating that the computer you are using is unable to connect to a destination server. Means Couldn't resolve host 'www.example.com'.

You can try to connect manually to check further using PING command.

  1. Press Windows Key + R to initiate Run Window
  2. Type CMD and press enter
  3. Type Ping www.website-name.com
  4. Check the status
  5. If you get Request timed out message then it is a problem with DNS. Same time it shows 100% loss while getting ping-back 

 Request timed out while Pinging

How to Recover from cURL error 6: Couldn't resolve host Error

  1. Try to restart modem to vanish the previous DNS
  2. Confirm the nameserver (i.e. ns1.server.com) given for domain where it is registered (i.e. GoDaddy, Bigrock)
  3. Some domain registrar take up to 48 hours to apply new nameserver to the domain
  4. Recheck the domain with online Ping service like http://ping.eu/ping/. If 0% loss in communication then there might be a problem with your local DNS. For this follow step No. 1.
    Online Ping Tool
    If you get 100% loss here too. Then this is probably a problem with your server. It might down or nameserver misconfigured.
  5. It might a problem with Firewall. Either of your computer or of server.
  6. Your IP may get blocked by the server (i.e. firewall) due to any technical reason.
...