# Unable to connect WordPress site to Discourse

**URL:** https://meta.discourse.org/t/unable-to-connect-wordpress-site-to-discourse/154539
**Category:** WordPress
**Created:** [10 juni 2020 om 21:16 UTC](https://meta.discourse.org/t/unable-to-connect-wordpress-site-to-discourse/154539 "2020-06-10T21:16:58Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![AtakanYildirim1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/atakanyildirim1/32/183154_2.png) [@AtakanYildirim1](https://meta.discourse.org/u/AtakanYildirim1)
#### Post date: [10 juni 2020 om 21:16 UTC](https://meta.discourse.org/t/unable-to-connect-wordpress-site-to-discourse/154539/1 "2020-06-10T21:16:58Z")

</div>

@simon  
I use your plugin but I have a problem. I’m waiting for your help. My problem is this. [Discourse\_topics] running on localhost does not work on my server. [Discourse\_link] works on my server, but [Discourse\_topics] don’t. All settings of my server are the same with localhost. What could be the reason?

localhost ss: [Screenshot by Lightshot](https://prnt.sc/sxhjag)  
my server ss: [Screenshot by Lightshot](https://prnt.sc/sxhj0i)

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [10 juni 2020 om 21:30 UTC](https://meta.discourse.org/t/unable-to-connect-wordpress-site-to-discourse/154539/2 "2020-06-10T21:30:27Z")

</div>

> [@AtakanYildirim1](#):
>
> My problem is this. [Discourse\_topics] running on localhost does not work on my server.

On the [WP Discourse](https://github.com/discourse/wp-discourse) Connection options tab, make sure you have entered your Discourse All Users API Key and set the Publishing Username to ‘system’. Also, make sure the “You are connected to Discourse” message is displayed at the top of that settings page.

Are the topics on your Discourse site in protected categories? If so, have you selected the “Display Private Topics” option from the [WP Discourse](https://github.com/discourse/wp-discourse) Shortcodes options?

---

<div class="post-metadata">

### Author: ![AtakanYildirim1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/atakanyildirim1/32/183154_2.png) [@AtakanYildirim1](https://meta.discourse.org/u/AtakanYildirim1)
#### Post date: [10 juni 2020 om 23:14 UTC](https://meta.discourse.org/t/unable-to-connect-wordpress-site-to-discourse/154539/3 "2020-06-10T23:14:43Z")

</div>

API connection has been successfully established on localhost. But even if I don’t establish api connection, the shortcode works successfully. I was unable to connect to the API on my server. I am writing the correct API code. I am writing Discourse Admin user but connection cannot be established.

Warning I received note: You are not connected to Discourse. If you are setting up the plugin, this notice should go away after completing the form on this page.

I caught the errors in the screenshot with the Querymonitor plugin: [Screenshot by Lightshot](https://prnt.sc/sxjv7d)  
Curl 7.58.0 is installed and running on my Wordpress server. Everything is fine when I run the curl [google.com](http://google.com) command with SSH. But when I run my forum address, I get “cURL error 6: Could not resolve host: [forum.address.com](http://forum.address.com)” error.

@Simon\_Cossar

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [11 juni 2020 om 00:24 UTC](https://meta.discourse.org/t/unable-to-connect-wordpress-site-to-discourse/154539/4 "2020-06-11T00:24:34Z")

</div>

> [@AtakanYildirim1](#):
>
> But when I run my forum address, I get “cURL error 6: Could not resolve host: [forum.address.com](http://forum.address.com)” error.

That will be the problem. The plugin will not work unless you can fix that issue.

---

<div class="post-metadata">

### Author: ![AtakanYildirim1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/atakanyildirim1/32/183154_2.png) [@AtakanYildirim1](https://meta.discourse.org/u/AtakanYildirim1)
#### Post date: [11 juni 2020 om 00:27 UTC](https://meta.discourse.org/t/unable-to-connect-wordpress-site-to-discourse/154539/5 "2020-06-11T00:27:26Z")

</div>

How can I solve it? Can you help with this problem? @Simon\_Cossar

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [11 juni 2020 om 00:32 UTC](https://meta.discourse.org/t/unable-to-connect-wordpress-site-to-discourse/154539/6 "2020-06-11T00:32:29Z")

</div>

> [@AtakanYildirim1](#):
>
> Can you help with this problem?

I can try, but the issue is probably related to your WordPress site’s server. Can you have a look at topics in #Support > WordPress to see if any of them relate to your problem? The advanced search page might be useful. Try starting with a search like this: [Search results for 'curl error #support:wordpress' - Discourse Meta](https://meta.discourse.org/search?expanded=true&q=curl%20error%20%23support%3Awordpress).

---

<div class="post-metadata">

### Author: ![AtakanYildirim1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/atakanyildirim1/32/183154_2.png) [@AtakanYildirim1](https://meta.discourse.org/u/AtakanYildirim1)
#### Post date: [11 juni 2020 om 13:21 UTC](https://meta.discourse.org/t/unable-to-connect-wordpress-site-to-discourse/154539/7 "2020-06-11T13:21:50Z")

</div>

discourse works properly when I make requests to other websites with curl command. I’m just having trouble connecting to my site. Is it because I use the same domain? like this: the forum I want to connect to: [discourse.domain.com](http://discourse.domain.com)  
wordpress: [domain.com](http://domain.com) @simon

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [12 juni 2020 om 00:01 UTC](https://meta.discourse.org/t/unable-to-connect-wordpress-site-to-discourse/154539/8 "2020-06-12T00:01:23Z")

</div>

> [@AtakanYildirim1](#):
>
> Is it because I use the same domain?

That will not cause problems.

I’m fairly sure the issue with the error `“cURL error 6: Could not resolve host` is related to your WordPress site’s configuration. Is your WordPress site on shared hosting, or is it on a server that you have configured yourself?
