WP Discourse plugin - comments are not displaying under posts

AI-generated summary

elenaen reported that while the WP Discourse plugin successfully publishes WordPress posts to Discourse, comments from Discourse aren’t appearing back on WordPress. Despite verifying settings like matching admin usernames, enabling “User Discourse Comments,” and configuring webhooks, the issue persisted. elenaen noticed the webhook URL returned a 404 error, suspecting it might be related to the absence of an SSL certificate — though this was later ruled out. The root cause was found in WordPress’s permalink settings: the site was using the default “Plain” structure, which breaks the REST API webhook URL. elenaen resolved it by switching to “Post Name” permalinks. simon confirmed that while plain permalinks can work, the plugin should auto-adjust the webhook URL accordingly — and acknowledged this was a documentation gap. elenaen suggested adding this to the plugin’s “how-to” docs to help others. simon confirmed the issue is now fixed in version 1.5.9: when plain permalinks are detected, the plugin automatically sets the correct webhook URL (http://yoursite.com/index.php?rest_route=/wp-discourse/v1/update-topic-content).

Hi,
I installed WP Discourse plugin on our Wordpress site, connected to our Discourse forum. When I publish a post in Wordpress, it shows up on our Discourse forum (so the connection is working). However, the comments are not being pulled from Discourse (I added a few comments for the posts via Discourse, these comments are not displayed in Wordpress).
I’ve searched your forum on this issue, and checked / followed all the suggestions, such as to make sure there is an admin user with the same username in Wordpress as in Discourse, and that username is used as a Publishing Username). “User Discourse Comments” is enabled in the plugin settings. I did not touch SSO. I tried configuring webhooks, and that did not fix the issue.

A thought that crossed by mind - does the SSL certificate need to be enabled on Wordpress for this to work? Currently there is no certificate on the Wordpress site, as the site is still in development, but we plan on adding one soon.

If you can offer me any guidance on this issue, I would greatly appreciate it.

thank you!

Also, I noticed that the URL for the webhook (my Wordpress domain + “/wp-json/wp-discourse/v1/update-topic-content” gives me a 404 (not found) error. Could this be part of a problem?

I figured it out - in Wordpress → Settings → Permalinks needs to be set to Post Name. (Mine was the default “Plain” setting). I would imagine most working Wordpress sites would not be set with the “Plain” settings, but this was a brand new site under development without much configured on it).

Thanks for bring this up. The webhook is using the WordPress REST API. It can work with plain permalinks, but the webhook URL needs to be structured differently. The plugin should check if plain permalinks are being used and give the correct webhook URL for those cases.

No problem, it did not take me long to figure this out. But you might mention this in the “how-to” doc for the plugin, so that others don’t stumble on this hurdle.

This has been fixed in the latest release (1.5.9). If the plain permalink structure is being used, the webhook URL in the setting’s description is set to http://yoursite.com/index.php?rest_route=/wp-discourse/v1/update-topic-content.