If you use WordPress to publish your blog or as your website CMS, you can create a single sign-on connection with Vanilla Forums. People registered on your WordPress website or blog will be able to register as members and login to the forum without having to go through a separate registration process. The free WordPress plugin, makes it easy to integrate your WordPress website and your Vanilla Community. The following is a guide on how to get started.
Getting The WordPress Plugin
To make WordPress SSO work with Vanilla, you will need the free Vanilla Forums plugin. You can download it here. To install the plugin use the following steps:
- Upload the
- Activate the plugin through the 'Plugins' menu in WordPress
Note: You can also search for the plugin from the backend of your WordPress via the "add new" option in the plugin menu. Look for "Vanilla Forums" plugin created by Todd Burry.
Once you have installed the Vanilla Forums plugin, you will see the following added to your WordPress admin menu
Connecting WordPress To Your Vanilla Forum
To prepare Vanilla Forums for Single Sign-on with your WordPress website, enter the location of your forum. Simply fill in the URL for your forum and click save:
Note: The domain can be at myforum.vanilaforums.com or it can be the custom domain that you create (i.e. community.mysite.com).
If you run into validation issues or get the following error: "Couldn't find a Vanilla Forum at this url :/", the issue is related to where you host your WordPress install. The following checklist should help with the most common issues that cause this error and how to address them:
- Forum is actually not at the url you used. Please recheck the URL.
- DNS isn't updated. If you created a custom domain, give the server some time to propagate.
- Does PHP have cURL enabled? (just *having* cURL isn't enough, it needs to be in the copy of php actually running web requests). If you are not sure if you have CURL, contact the host of your WordPress site to enable this.
- There may be an issue to recognize the forum URL if the admin has been locked down with an .htaccess file. Check the file to make sure it is not.
Configuring Single Sign-On (SSO)
To setup SSO, click on the Single Sign-On menu item to get to the following screen. You will need to copy the values in these fields into the SSO settings on the your Vanilla jsConnect configuration page.
Here are the elements explained and the next steps to follow:
- Enable: If you check this, users to your Vanilla Forum will sign in through your WordPress login page.
- Client ID: This is can be any numeric value or text value you set. Make sure it has no spaces or non-alphanumeric characters. You can use dashes (-) to separate words.
- Secret: Click "Generate" to create a secret key.
- Other Information for Vanilla: These are values generated by your WordPress automatically, that you will need to copy to your Vanilla install. This information lets Vanilla know how to process your members.
The following is an example of how the Client ID you created and a Secret key generated in WordPress will look before you proceed:
Keep your WordPress open and in another tab or window, login into your Vanilla Forum dashboard.
jsConnect in Vanilla Forums
Login into your Vanilla Forums backend, and click the dashboard menu item "jsConnect" found in the User menu group. (Please note SSO is only available on the Advanced plan and greater. You will need to enable the jsConnect Plugin before you continue.)
The first step on the jsConnect screen is to enter the ClientID and Secret into the appropriate fields that you created in your WordPress install. The next step is to copy the url values from the backend of your WordPress install. Just copy and paste the three urls: Authenticate Url, Sign In Url and Register Url into your Vanilla Forum jsConnect configuration form. You can leave the signout url blank. Once complete it will look like the following:
You are almost done. Here are some options to consider in Vanilla Forums backend:
"This is trusted connection and can sync roles & permissions": This ensures roles and permissions sync between the two systems. To make this works properly you need to ensure the WordPress and Vanilla username groups are the same. So for example in WordPress you may have Author or Subscriber roles. You should create these user groups in your Vanilla install as well. You can do this by click on "Roles & Permissions" in the Vanilla Forums backend and "add role". Note: Any user created in the forum prior to jsconnect will not be synced.
"Make this connection your default signin method": This will force people signing into your Vanilla Forum to go through your WordPress login screen. You need to check this for the SSO to work as intended through your WordPress login page.
Advanced section: You can control the hash method and test the connection to ensure it's working.
Change Registration Type
The final step, is to change the way users register with the site. To do this, go to the User menu in the dashboard and select "registration". When using SSO, you will want to change the method to the connect option.
Some Extra Notes
If you are using WordPress, there are some other ways to enjoy a connection between WordPress and Vanilla Forums. Below articles explain more:
- Embedding Vanilla Forums in Your WordPress install.
- How to use the Vanilla Commenting System with WordPress.
- Using WishList Member to Set Permissions in a Vanilla Forum.
If you having trouble or get stuck, you can also use our support forum to help your SSO connection working.
We hope you found this guide handy and in return please rate us on the plugin page at WordPress.org.
Vanilla Forums offers a cloud based solution that can fully integrate into your WordPress.org website. Try Vanilla Forums Cloud Solution for free for 30-days.