Wordpress-discourse plugin not conecting to discourse

I am getting the: You are not connected to Discourse. message from the connections tab in the wordpress plugin panel. Getting this error when posting new entry to wordpress :

cURL error 7: Failed to connect to discourse.mysite.com port 443: Connection refused

Same error when connecting to non ssl, port 80.

The api key is correcttly copied.

It worked when i initially installed but then had to change subdomains of the wordpress and discourse and now it is not working. What am I missing?

I suggest completely removing (disable and then delete) the wp-discourse plugin. Reinstall, re-enter connection info and see if it works.

2 Likes

Ok fixed it. Since I have 2 ips in my droplet i needed to edit /etc/hosts to associate the domain of my discourse to the real ip associated to the discourse, instead of 127.0.0.1.

2 Likes

What I still don’t understand though is whether It is necessary to enable webhooks in order to make discourse comments appear on wordpress or not.

Webhooks allow Discourse to push new posts to Wordpress immediately. I don’t think there is any other polling mechanism, but maybe I’ve forgotten.

1 Like