Question

I'm having trouble reading RSS feeds created by WP3 on the same domain.

When I do a print_r($rss); at the part of my plugin where it does the RSS parsing, I get the following output:

WP_Error Object ( [errors] => Array ( [simplepie-error] => Array ( [0] => WP HTTP Error: couldn't connect to host ) ) [error_data] => Array ( ) )

The RSS feed address being supplied validates and everything, btw.

It seems to me the issue has something to do with the webserver being unable to grab its own RSS feeds. This is all very confusing. There's a blog post that seems to identify the issue at: http://www.ajaykumarsingh.com/wordpress/rss-error-wp-http-error-couldnt-resolve-host.html

...Alas, it does not contain any solutions.

Any ideas for a workaround would be much appreciated.

Was it helpful?

Solution

Anyone with a similar issue:

First off, try the following after connecting to your webhost via SSH:

ping <yourwebsite>

If you get a "cannot connect to host" issue, there's a firewall or NAT problem blocking traffic for RSS. Contact your server admin.

OTHER TIPS

Further to this, if you have access to the server and not the firewall or are unsure of how to configure it, you can try adding the url of the site you're having trouble with and the local ip of the server into your hosts file. (C:\WINDOWS\system32\drivers\etc)

e.g.

(server IP) www.yourdomain.com

the server will then look at itself on the local network before connecting to its own external IP (which it currently cant)

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top