# Wordpress-discourse plugin not conecting to discourse

**URL:** https://meta.discourse.org/t/wordpress-discourse-plugin-not-conecting-to-discourse/126800
**Category:** WordPress
**Created:** [August 26, 2019, 1:11am UTC](https://meta.discourse.org/t/wordpress-discourse-plugin-not-conecting-to-discourse/126800 "2019-08-26T01:11:26Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![chi\_noti\_info](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@chi\_noti\_info](https://meta.discourse.org/u/chi_noti_info)
#### Post date: [August 26, 2019, 1:11am UTC](https://meta.discourse.org/t/wordpress-discourse-plugin-not-conecting-to-discourse/126800/1 "2019-08-26T01:11:26Z")

</div>

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](http://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?

---

<div class="post-metadata">

### Author: ![jtbayly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtbayly/32/119510_2.png) [@jtbayly](https://meta.discourse.org/u/jtbayly)
#### Post date: [August 26, 2019, 2:15am UTC](https://meta.discourse.org/t/wordpress-discourse-plugin-not-conecting-to-discourse/126800/2 "2019-08-26T02:15:48Z")

</div>

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

---

<div class="post-metadata">

### Author: ![chi\_noti\_info](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@chi\_noti\_info](https://meta.discourse.org/u/chi_noti_info)
#### Post date: [August 26, 2019, 7:02am UTC](https://meta.discourse.org/t/wordpress-discourse-plugin-not-conecting-to-discourse/126800/5 "2019-08-26T07:02:11Z")

</div>

> [@chi\_noti\_info](#):
>
> cURL error 7: Failed to connect to [discourse.mysite.com](http://discourse.mysite.com) port 443: Connection refused

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.

---

<div class="post-metadata">

### Author: ![chi\_noti\_info](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@chi\_noti\_info](https://meta.discourse.org/u/chi_noti_info)
#### Post date: [August 26, 2019, 7:03am UTC](https://meta.discourse.org/t/wordpress-discourse-plugin-not-conecting-to-discourse/126800/6 "2019-08-26T07:03:52Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![jtbayly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtbayly/32/119510_2.png) [@jtbayly](https://meta.discourse.org/u/jtbayly)
#### Post date: [August 26, 2019, 10:27am UTC](https://meta.discourse.org/t/wordpress-discourse-plugin-not-conecting-to-discourse/126800/7 "2019-08-26T10:27:25Z")

</div>

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.
