I am trying to setup a wordpress xml-rpc with rails:
blog = XMLRPC::Client.new("localhost/blog", "/xmlrpc.php", 80)
However, when I try to call something like
connection.call(
'wp.getCommentCount',
1,
'username',
'password',
1
I get the following error:
getaddrinfo: No such host is known.
This only happens in my localhost (I’m using xampp), on the live website it works fine. What can this be?
If I go directly to localhost/blog/xmlrpc.php I get XML-RPC server accepts POST requests only. which means it’s working fine. I don’t understand what can be messing this up… thanks for any help.
Instead, try
I have this tested on my WordPress site and it works for me.