# Only paid members access to discourse

**URL:** https://meta.discourse.org/t/only-paid-members-access-to-discourse/95157
**Category:** WordPress
**Created:** [8월 20, 2018, 7:25오전 UTC](https://meta.discourse.org/t/only-paid-members-access-to-discourse/95157 "2018-08-20T07:25:48Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![PatrickH](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickh/32/116296_2.png) [@PatrickH](https://meta.discourse.org/u/PatrickH)
#### Post date: [8월 20, 2018, 7:25오전 UTC](https://meta.discourse.org/t/only-paid-members-access-to-discourse/95157/1 "2018-08-20T07:25:48Z")

</div>

At this time i’m testing Wordpress with discourse. This works good.  
Only with SSO i want to have only customers accessing the forum who only have a paid membership with Paid Memberships Pro.

Is this possible ?

---

<div class="post-metadata">

### Author: ![robmc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robmc/32/125900_2.png) [@robmc](https://meta.discourse.org/u/robmc)
#### Post date: [8월 20, 2018, 7:31오전 UTC](https://meta.discourse.org/t/only-paid-members-access-to-discourse/95157/2 "2018-08-20T07:31:17Z")

</div>

Yes, this is possible.

You can make your Discourse site private (see `login required` under admin settings) and only accessible to members, so if you are using SSO from your Wordpress site, they can register / sign-in there, then access your Discourse forum. Otherwise it will be closed.

---

<div class="post-metadata">

### Author: ![PatrickH](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickh/32/116296_2.png) [@PatrickH](https://meta.discourse.org/u/PatrickH)
#### Post date: [8월 20, 2018, 7:43오전 UTC](https://meta.discourse.org/t/only-paid-members-access-to-discourse/95157/3 "2018-08-20T07:43:04Z")

</div>

ok thanks.  
i have done that , but i have different levels of membership, lets say:

Free (1 month) (no access)  
Supporter ( no access)  
Hereo (access)  
Elite (access)

---

<div class="post-metadata">

### Author: ![terraboss](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/terraboss/32/381157_2.png) [@terraboss](https://meta.discourse.org/u/terraboss)
#### Post date: [8월 22, 2018, 7:24오전 UTC](https://meta.discourse.org/t/only-paid-members-access-to-discourse/95157/4 "2018-08-22T07:24:51Z")

</div>

I think, I‘ve seen some membership plugin here at meta before. Unfortunately, I can’t remember the name of it.

---

<div class="post-metadata">

### Author: ![robmc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robmc/32/125900_2.png) [@robmc](https://meta.discourse.org/u/robmc)
#### Post date: [8월 22, 2018, 7:43오전 UTC](https://meta.discourse.org/t/only-paid-members-access-to-discourse/95157/5 "2018-08-22T07:43:23Z")

</div>

There are ways to achieve this without plugins, but if that is what is wanted, then maybe check out: [ProCourse Memberships 💸](https://meta.discourse.org/t/discourse-league-paid-memberships-money-with-wings/57558)

---

<div class="post-metadata">

### Author: ![PatrickH](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickh/32/116296_2.png) [@PatrickH](https://meta.discourse.org/u/PatrickH)
#### Post date: [8월 22, 2018, 7:58오전 UTC](https://meta.discourse.org/t/only-paid-members-access-to-discourse/95157/6 "2018-08-22T07:58:56Z")

</div>

i have **Wordpress** as my SSO and **Paid Memberships Pro** as my payment and membership plugin in wordpress. I’m syncing users. Can i automatically add users to the different groups ?

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [8월 22, 2018, 8:04오전 UTC](https://meta.discourse.org/t/only-paid-members-access-to-discourse/95157/7 "2018-08-22T08:04:06Z")

</div>

Have you already read this guide?

> [@Manage group membership in Discourse with WP Discourse SSO](https://meta.discourse.org/t/managing-discourse-group-membership-with-wp-discourse/74724):
>
> [WP Discourse](https://github.com/discourse/wp-discourse) functions The [WP Discourse](https://github.com/discourse/wp-discourse) plugin has a couple of functions that can be used to associate WordPress users with Discourse groups. These functions are only enabled on sites that are using WordPress as the SSO provider for Discourse. add\_user\_to\_discourse\_group( $user\_id, $group\_names ) [View Code](https://github.com/discourse/wp-discourse/blob/main/lib/utilities.php#L278-L301) remove\_user\_from\_discourse\_group( $user\_id, $group\_names ) [View Code](https://github.com/discourse/wp-discourse/blob/main/lib/utilities.php#L303-L326) Each of these functions take the same two parameters: $user\_id: the WordPress user’s id $group\_names: a comma separat…
