# Verbindung zwischen Discourse und WordPress nicht möglich

**URL:** https://meta.discourse.org/t/unable-to-connect-discourse-and-wordpress/96350
**Category:** WordPress
**Created:** [4. September 2018 um 18:50 UTC](https://meta.discourse.org/t/unable-to-connect-discourse-and-wordpress/96350 "2018-09-04T18:50:25Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![Arpit\_Gogia1](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@Arpit\_Gogia1](https://meta.discourse.org/u/Arpit_Gogia1)
#### Post date: [4. September 2018 um 18:50 UTC](https://meta.discourse.org/t/unable-to-connect-discourse-and-wordpress/96350/1 "2018-09-04T18:50:25Z")

</div>

I’m facing an issue while connecting Discourse to WordPress using the Discourse Plugin. I’m running Discourse on a Digital Ocean droplet. The setup was performed exactly as mentioned here ([discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md)). The droplet itself sits behind CloudFlare and HTTPS was setup using Let’s Encrypt (using [Set up HTTPS support with Let's Encrypt](https://meta.discourse.org/t/setting-up-https-support-with-lets-encrypt/40709)). The WordPress site is deployed on SiteGround, also behind CloudFlare.

When I add the forum’s root address, API key and administrator username in the plugin settings, in WordPress’ console, it still keeps saying “You’re not connected to Discourse”. Upon further investigating I’ve found that this particular request `/site.json%20?api_key=[FILTERED]&amp;api_username=&lt;username&gt;` is returning 403 Forbidden even with a fresh, valid API Key and a valid administrator username.

---

<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: [4. September 2018 um 20:25 UTC](https://meta.discourse.org/t/unable-to-connect-discourse-and-wordpress/96350/2 "2018-09-04T20:25:19Z")

</div>

The request to `site.json` is checking that an API request can be made with the values supplied for the API Key and Publishing Username that are set on WordPress. If you make the request with curl from your local computer, is it working for you? For example, this request with `$api_key` set to your API key:

```plaintext
curl -X GET 'https://forum.example.com/site.json?api_key=$api_key&api_username=system'

```

If this is woking for you, you could try installing the [WordPress Health Check](https://make.wordpress.org/support/handbook/appendix/troubleshooting-using-the-health-check/) plugin and looking at the Secure communication row on the Site Status tab to see if it’s finding any issues with communicating with external services using secure connections (SSL.)

---

<div class="post-metadata">

### Author: ![Arpit\_Gogia1](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@Arpit\_Gogia1](https://meta.discourse.org/u/Arpit_Gogia1)
#### Post date: [5. September 2018 um 17:17 UTC](https://meta.discourse.org/t/unable-to-connect-discourse-and-wordpress/96350/3 "2018-09-05T17:17:00Z")

</div>

This curl command works perfectly fine

```plaintext
curl -X GET "https://community.worldbrain.io/site.json%20\?api_key\=blabla\&api_username\=bla"

```

Health Check mentions `Your WordPress install can communicate securely with other services.`

Here is what I’m seeing in `HTTP API Calls` section

 ![15%20PM](https://global.discourse-cdn.com/meta/original/3X/c/9/c96f0445c97d0ae16b3dff4eb01028d6b914b680.png)

Of course the forum itself is working so it’s pretty bizarre to see `Could not resolve host`

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [5. September 2018 um 18:29 UTC](https://meta.discourse.org/t/unable-to-connect-discourse-and-wordpress/96350/4 "2018-09-05T18:29:10Z")

</div>

Can I ask how have you installed SSL on your discourse? Is it a generic cloudflare certificate or something?

Edit:  
Indeed it’s cloudflare [https://www.whynopadlock.com/results/df748a55-67d9-4477-9502-c618b69cb38c](https://www.whynopadlock.com/results/df748a55-67d9-4477-9502-c618b69cb38c)

And I’m assuming you’re running their “Flexible” SSL mode. This explains a lot about why the calls are messed up.

---

<div class="post-metadata">

### Author: ![Phuong\_SuSu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/phuong_susu/32/148042_2.png) [@Phuong\_SuSu](https://meta.discourse.org/u/Phuong_SuSu)
#### Post date: [29. Juni 2019 um 18:42 UTC](https://meta.discourse.org/t/unable-to-connect-discourse-and-wordpress/96350/5 "2019-06-29T18:42:33Z")

</div>

Ich habe denselben Fehler bekommen. Bitte hilf mir!

---

<div class="post-metadata">

### Author: ![Phuong\_SuSu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/phuong_susu/32/148042_2.png) [@Phuong\_SuSu](https://meta.discourse.org/u/Phuong_SuSu)
#### Post date: [29. Juni 2019 um 19:20 UTC](https://meta.discourse.org/t/unable-to-connect-discourse-and-wordpress/96350/6 "2019-06-29T19:20:03Z")

</div>

Ich habe das gemacht und folgendes erhalten:

```plaintext
curl -I GET 'https://forum.fususu.com/users/mrsusu.json?api_key=[secretapi]&api_username=mrsusu'

HTTP/1.1 403 Forbidden
Server: CloudFront
Date: Sat, 29 Jun 2019 19:00:27 GMT
Content-Type: text/html
Content-Length: 556
Connection: keep-alive
X-Cache: Error from cloudfront
Via: 1.1 dfb4b390f0fb83a73bab72d387a3e1dc.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: NRT20-C3
X-Amz-Cf-Id: qO_fq0M_GX8wUuqJFCpBDXL6dlJDkKVWJ-BKOSD6qfegOqdNr_837g==

HTTP/1.1 200 OK
Date: Sat, 29 Jun 2019 19:00:28 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Set-Cookie: __cfduid=de8f93857163fcf3bfca002a5af11f38c1561834828; expires=Sun, 28-Jun-20 19:00:28 GMT; path=/; domain=.fususu.com; HttpOnly; Secure
Vary: Accept-Encoding
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
X-Discourse-Username: mrsusu
X-Discourse-Route: users/show
Cache-Control: no-cache, no-store
X-Request-Id: 2a4e74b8-3be0-47cf-81e9-fc5682e678c5
Set-Cookie: __profilin=p%3Dt%2Ca%3Dee922625e907ef0b48cfd16cc80c816b%7C20b0d8cc0a038e5816c59c085fca59e5; path=/; secure; HttpOnly

X-Runtime: 0.114832
Strict-Transport-Security: max-age=31536000
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 4eea24bb28432e07-NRT

```

Meine WordPress-Website [fususu.com](http://fususu.com) ist mit SSL-Flexible (Cloudflare) eingerichtet,  
zusammen mit einer Page Rule für das Forum [forum.fususu.com](http://forum.fususu.com) – Full SSL (Cloudflare).

---

<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: [2. Juli 2019 um 20:20 UTC](https://meta.discourse.org/t/unable-to-connect-discourse-and-wordpress/96350/7 "2019-07-02T20:20:09Z")

</div>

Hast du das zum Laufen bekommen?

---

<div class="post-metadata">

### Author: ![Phuong\_SuSu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/phuong_susu/32/148042_2.png) [@Phuong\_SuSu](https://meta.discourse.org/u/Phuong_SuSu)
#### Post date: [2. Juli 2019 um 20:23 UTC](https://meta.discourse.org/t/unable-to-connect-discourse-and-wordpress/96350/8 "2019-07-02T20:23:16Z")

</div>

Noch nicht… Ich habe es vorübergehend aufgegeben ^^!

---

<div class="post-metadata">

### Author: ![DannyDover](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dannydover/32/116211_2.png) [@DannyDover](https://meta.discourse.org/u/DannyDover)
#### Post date: [30. August 2019 um 06:02 UTC](https://meta.discourse.org/t/unable-to-connect-discourse-and-wordpress/96350/9 "2019-08-30T06:02:22Z")

</div>

Ist es Ihnen jemals gelungen, das zum Laufen zu bringen? Ich habe die gleiche Einrichtung (Discourse auf Digital Ocean, WordPress auf Siteground, beide hinter Cloudflare) und denselben Fehler. Curl funktioniert von meinem lokalen Rechner problemlos.

Irgendwelche Ratschläge?

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [30. August 2019 um 06:10 UTC](https://meta.discourse.org/t/unable-to-connect-discourse-and-wordpress/96350/10 "2019-08-30T06:10:03Z")

</div>

Wie ist Ihr SSL auf Cloudflare-Seite konfiguriert? Nutzen Sie die Cloudflare-Performance-Optimierung für Discourse?

Sie sollten Cloudflare-SSL unbedingt im Full-Modus und nicht im Flexible-Modus betreiben.

Wenn die Cloudflare-Performance-Optimierung für Discourse aktiviert ist, deaktivieren Sie sie, indem Sie eine Page Rule erstellen.

Wenn das nicht hilft, teilen Sie Ihre Discourse-Domain mit.

---

<div class="post-metadata">

### Author: ![DannyDover](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dannydover/32/116211_2.png) [@DannyDover](https://meta.discourse.org/u/DannyDover)
#### Post date: [30. August 2019 um 06:41 UTC](https://meta.discourse.org/t/unable-to-connect-discourse-and-wordpress/96350/12 "2019-08-30T06:41:53Z")

</div>

Die URL lautet [https://discuss.guidery.com](https://discuss.guidery.com)

Für die Subdomain „discuss

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [30. August 2019 um 09:53 UTC](https://meta.discourse.org/t/unable-to-connect-discourse-and-wordpress/96350/13 "2019-08-30T09:53:21Z")

</div>

Blockiert eine Firewall-Regel Verbindungen auf WordPress-Seite?

---

<div class="post-metadata">

### Author: ![DannyDover](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dannydover/32/116211_2.png) [@DannyDover](https://meta.discourse.org/u/DannyDover)
#### Post date: [30. August 2019 um 19:11 UTC](https://meta.discourse.org/t/unable-to-connect-discourse-and-wordpress/96350/14 "2019-08-30T19:11:44Z")

</div>

Wenn ich per SSH auf den gemeinsam genutzten Server (der von SiteGround gehostet wird) verbinde und manuell einen curl-Befehl ausführe, um meine Discourse-Installation abzurufen, erhalte ich dieselbe Fehlermeldung;

> “curl: (6)” Could not resolve host: [discuss.guidery.com](http://discuss.guidery.com)".

Ich habe sogar eine neue WordPress-Seite erstellt, mit einer neuen Domain (obwohl auf demselben SiteGround-Server), ohne dass Cloudflare das DNS betreibt, und erhielt dieselbe Fehlermeldung.

Noch weitere Ideen?

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [30. August 2019 um 19:20 UTC](https://meta.discourse.org/t/unable-to-connect-discourse-and-wordpress/96350/15 "2019-08-30T19:20:49Z")

</div>

Vielleicht solltest du SiteGround kontaktieren, falls sie deine Server-IP-Adresse aus irgendeinem Grund blockieren?

---

<div class="post-metadata">

### Author: ![DannyDover](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dannydover/32/116211_2.png) [@DannyDover](https://meta.discourse.org/u/DannyDover)
#### Post date: [2. September 2019 um 05:02 UTC](https://meta.discourse.org/t/unable-to-connect-discourse-and-wordpress/96350/16 "2019-09-02T05:02:01Z")

</div>

Gelöst. Das war einer dieser nervigen Fälle, bei denen es einfach „plötzlich funktioniert hat“, ohne dass eine klare Lösung bekannt wurde. Ich gehe davon aus, dass es sich um ein Problem mit der DNS-Propagierung handelte und dass der DNS-Resolver von Siteground aus irgendeinem Grund langsam war.

Wenn jemand anderes auf dieses Problem stößt, lautet mein einziger Rat: Warten Sie 48 Stunden und versuchen Sie es erneut. :-/

---

<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: [5. September 2019 um 18:39 UTC](https://meta.discourse.org/t/unable-to-connect-discourse-and-wordpress/96350/17 "2019-09-05T18:39:12Z")

</div>

> [@DannyDover](#):
>
> Das war einer dieser ärgerlichen Fälle, in denen es einfach „plötzlich funktioniert hat“, ohne dass eine klare Lösung bekannt wurde.

Ein weiterer Nutzer mit einem ähnlichen Problem hat Siteground kontaktiert. Sie konnten das Problem lösen. Dieser Beitrag enthält die Details dazu, wie Siteground es behoben hat: [[PAID] Fix cURL error 6 in Discourse WP Plugin - #4 by lucas.bagatini](https://meta.discourse.org/t/paid-fix-curl-error-6-in-discourse-wp-plugin/127593/4?u=simon_cossar).
