How to integrate Discourse Forum with WordPress

Integrate Discourse Forum with WordPress

Learn how to integrate your Discourse forum with WordPress blog using the recently released official Discourse WordPress plugin in this tutorial. 

Many websites maintain a forum for their support issues and other general community discussions.

For websites powered by WordPress, integrating forums can be a challenge. Although there are dozens of WordPress plugins to help set up discussion forums, it can be difficult maintaining a huge community forum.

Plugins like bbPress and BuddyPress are often the go-to solutions for adding forums within WordPress websites, but they are way behind some of the modern platforms solely dedicated to discussion forums.

Discourse is one such popular forum software that is quickly becoming the favourite choice for several websites. The software’s integration with WordPress was one of the widely requested features.

Keeping such requests in mind, Discourse has recently released an official WordPress plugin that makes the integration really easy.

Discourse WordPress Plugin

WP Discourse is the official Discourse WordPress plugin and is available to download for free from the repository. The plugin has been available for a while on Github and gone through several updates finally to publish a polished version on the official WordPress repository.

WP Discourse WordPress Plugin WordPress Discourse

Discourse WordPress plugin lets you use Discourse to power your community and in this tutorial, I will go through installing the plugin and the features that are available to integrate Discourse forum with WordPress.

Features of WP Discourse Plugin

The WP Discourse plugin enables you to use Discourse as a community engine for your WordPress blog.

As you install and configure the settings for WP Discourse plugin, you will explore several features of the plugin but here’re the main highlights of what you can achieve with the plugin.

  • Ability to publish selected posts as Forum topics on Discourse
  • Use Discourse for comments and discussions for WordPress posts
  • Define category and format of posts on Discourse
  • Set author of published posts on Discourse
  • Ability to configure which comments from Discourse can be displayed on the WordPress posts
  • Enable SSO to use your WordPress blog as the Single Sign-On provider for your Discourse forum

Installing Discourse WordPress Plugin

You can easily install the plugin by searching for WP Discourse within your WordPress dashboard. Follow the quick instructions below.

  • From your WordPress dashboard, navigate to Plugins > Add New
  • Search for ‘WP Discourse'.
  • Install and activate the WP Discourse plugin.
Discourse WordPress Plugin Search

Alternatively, you can download and upload the ‘wp-discourse' folder to your ‘/wp-content/plugins/' directory and activate the plugin from your WordPress dashboard.

Configuring WP Discourse Plugin

Once you have installed and activated the WP Discourse plugin, head over to Settings > Discourse where you will need to configure settings to connect your WordPress blog with your Discourse forum.

Discourse WordPress Plugin settings

Common Settings

First, you will need to fill in the values for common settings that establish the connection between two platforms. You will need to fill in the settings for ‘Discourse URL', ‘API Key', and ‘Publishing username'. You should also have already set up your Discourse forum at this point.

  • Discourse URL: The base URL of your Discourse forum
  • API Key: Found under Admin/API of your Discourse forum – (Go to /admin/api to locate the key)
  • Publishing username: Any administrator username on your Discourse forum. (The default administrator username on your Discourse forum is system and if you haven't changed that you should be fine with leaving system as username here.)

See the screenshot above for common settings.

Publishing Settings

Next, Publishing Settings allow you to choose your category and the ability to publish all new posts to Discourse.

Discourse Publishing Settings WordPress Plugin

You can also opt to publish the full post for content rather than the default excerpt and define post types to publish to Discourse in this section.

Comments Settings

You can choose to replace WordPress default comments completely or add Discourse forum discussions in addition to your WordPress comments for Discourse published posts.

The settings in this section also allow you to define and configure other comments related features.

SSO Settings

SSO Settings allow you to enable single sign-on between your WordPress site and your Discourse forum. Check the box next to Enable SSO and fill in the SSO Secret Key for the single sign on to work.

Single Sign on SSO settings for Discourse WordPress Plugin

You should also configure the SSO settings for your Discourse forum available under – Admin\Settings\Login section.

Then SSO Secret Key settings here at WordPress blog should match the value for SSO Secret that is entered on your Discourse forum settings.

Final Words on Discourse WordPress Integration

Discourse has definitely made it easy to build a modern and extensive forum. Besides, easy integration with WordPress will be helpful for many users that are finding it difficult to manage their community natively on WordPress.

This can also be really helpful if you already have a Discourse Forum and are looking to integrate with WordPress.

If you are looking to set up a Discourse forum for your WordPress blog, follow this tutorial to quickly setup Discourse with One-Click Application on DigitalOcean.

Use this link to get $10 in referral credit instantly if you need to sign up for DigitalOcean.

What do you think of Discourse WordPress integration? Let us know if you are using this for your website.

WP Discourse Plugin Review

Discourse has already made it easy to build a modern and extensive forum and with integration with WordPress now, it makes easy to facilitate blog discussions. Download WP Discourse Plugin

Pradeep Singh

Pradeep Singh

Pradeep Singh is the founder and your host here at WPism. He is an entrepreneur and blogger living his startup life based in London and Cambridge. Follow him on Twitter or like his page on Facebook.
Share on reddit
Share This Article
Share on facebook
Facebook
Share on linkedin
LinkedIn
Share on twitter
Twitter

13 Responses

    1. Hi Harsh,
      Thank you for your comment and glad that you found it handy.
      Yes, I love the experience of posting and comments. I am still not comfortable with SSO, mostly because I want to keep the userbase clean on the WordPress side. Although the plugin works well and creates a new user on Discourse after they have entered their credentials on the WordPress site (redirected to the login page if they are signing in for the first time on Discourse).
      You already have a Discourse forum for Shoutmeloud, right? If you have already allowed users to create accounts on the main website, I don’t see the integration as any problem. Otherwise, you might want to take some time to think about it.

  1. This is an amazing forum plugin. I recently deployed on it after having experience it somewhere. I had some little changes installing it, but it is looking pretty good now.

  2. I am installing this plugin for my WP site , plugin installed successfully now for settings it asks discourse URL so what be the document root for this URL off-course DNS entry would be same as site public IP , from where to get the API key it says you can find it under http://discourse.example.com/admin/api

    Please suggest.

  3. This appears to only provide functionality to link discourse for commenting. What I’m hoping to accomplish is to have my entire discourse site on a “community” page of my wordpress site. Is this not possible?

    1. Hi Bryan!
      Yes, this is mostly about taking WordPress posts for conversation on Discourse. It helps you to publish selected posts as Forum topics on Discourse and thus use Discourse for comments and discussions for WordPress posts.

      You can obviously install discourse on community.yoursite.com and have similar design of both WordPress blog and Discourse.

      1. Do I understand this correctly: you can only display discourse comments on a WP blog post if that post is also published on discourse?

        And is it so that even when comments are displayed on WP, users will not be able to post their comments directly from there but are taken to discourse to submit their comment?

  4. Hello. I am considering this plugin mostly to have single login for my users. My WordPress site is very young and the Discourse forum is not yet launched. In the plugin instructions it states,

    “Single Sign On from WordPress to Discourse
    The plugin also comes with optional SSO functionality which lets you use your WordPress site as the
    Single Sign On provider for your Discourse forum.

    This will override Discourse’s native (and powerful) login flow and is only recommended for use cases
    that strictly require such a setup, e.g. a site that is already using WordPress for large scale user management.”

    What is meant by this? What do I lose from Discourse login flow? I really want to make this seamless for my users to have a single login. What are the problems with setting this up.

    I note that I am not necessarily interested in using Discourse for comments on blog posts, or blog posts as topics in the forum, but I might do this anyhow if it is easy and makes sense. My main concern is to enable single login for the user.

  5. Hi. Thanks for the post. You mention that the plugin has the ability to publish selected posts as Forum topics on Discourse, but i only see the option to publish ALL BLOG posts to a SPECIFIC DISCOURSE category. Is there a way to only publish posts from a specific WP Category to a specific Discourse Category?

Leave a Reply

Your email address will not be published. Required fields are marked *

Join our list

Our Exclusive Deals

Share this post

Share on facebook
Share on twitter
Share on pinterest
Share on linkedin
Help us share this post with your network?
Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on email
Email
Want to keep updated with WordPress?

Join our monthly newsletter to receive best curated WordPress resources.

Want to keep updated with WordPress? Join our monthly newsletter.