# Convertir foro público a privado solo para clientes de pago

**URL:** https://meta.discourse.org/t/convert-public-forum-to-private-for-paid-clients-only/116845
**Category:** Support
**Created:** [4 Mayo, 2019 16:17 UTC](https://meta.discourse.org/t/convert-public-forum-to-private-for-paid-clients-only/116845 "2019-05-04T16:17:36Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![PTKen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ptken/32/139213_2.png) [@PTKen](https://meta.discourse.org/u/PTKen)
#### Post date: [4 Mayo, 2019 16:17 UTC](https://meta.discourse.org/t/convert-public-forum-to-private-for-paid-clients-only/116845/1 "2019-05-04T16:17:36Z")

</div>

Hello. I originally set up my Discourse forum as a public forum. I also have included some Private categories that I was using for private discussions with clients.

However, I am changing my strategy for the forum. I now want the forum to be for paid clients only. I will eliminate the public component. (I don’t have any content that needs to be saved in the conversion.)

What is the best way to change this to a Private forum without starting from scratch? Is there some way to simply convert it to private, or will I need to re-install Discourse from scratch? I’m trying to avoid having to set up all of my admin settings and integrations again. I don’t have any users or posts that need to be kept, but I would like to hold on to the structure of the categories, etc. if that’s possible.

Thank you!  
Ken

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [4 Mayo, 2019 16:18 UTC](https://meta.discourse.org/t/convert-public-forum-to-private-for-paid-clients-only/116845/2 "2019-05-04T16:18:44Z")

</div>

Yes, just enable ‘Login Required’ under Settings/Login:

 ![59%20AM](https://global.discourse-cdn.com/meta/original/3X/1/d/1d9a6de9a9f48543c72e13a9ef885604f480e02f.png)

---

<div class="post-metadata">

### Author: ![PTKen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ptken/32/139213_2.png) [@PTKen](https://meta.discourse.org/u/PTKen)
#### Post date: [4 Mayo, 2019 16:19 UTC](https://meta.discourse.org/t/convert-public-forum-to-private-for-paid-clients-only/116845/3 "2019-05-04T16:19:45Z")

</div>

> [@Stephen](#):
>
> Yes, just enable ‘Login Required’

That’s too easy. I want something harder! 😉

Thank you. I was hoping for an answer like that…

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [4 Mayo, 2019 16:21 UTC](https://meta.discourse.org/t/convert-public-forum-to-private-for-paid-clients-only/116845/4 "2019-05-04T16:21:27Z")

</div>

Ok:

1. spin up a new VM
2. buy a new domain, the old one is dead to you
3. configure DNS
4. configure MailGun
5. follow the [standard install guide](https://github.com/discourse/discourse/blob/master/docs/INSTALL.md)
6. reconfigure your community
7. realise you got the header the wrong shade of teal, return to step 1.

---

<div class="post-metadata">

### Author: ![PTKen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ptken/32/139213_2.png) [@PTKen](https://meta.discourse.org/u/PTKen)
#### Post date: [4 Mayo, 2019 16:22 UTC](https://meta.discourse.org/t/convert-public-forum-to-private-for-paid-clients-only/116845/5 "2019-05-04T16:22:23Z")

</div>

Actually, I guess my question is a little more complicated. @Stephen answered part of it for me.

What I did not state is that I have set up SSO with my WordPress site to share the login. On WordPress, my users will be tagged to indicate that they should have access to the forum.

So, how can I control who gets to log in based on my WordPress tags (because that will indicate that they have paid)? Do I have to do this manually inside of Discourse (as I did for my clients previously)? Or is there a better way to accomplish this?

Thanks.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [4 Mayo, 2019 16:24 UTC](https://meta.discourse.org/t/convert-public-forum-to-private-for-paid-clients-only/116845/6 "2019-05-04T16:24:51Z")

</div>

If your WordPress users are a mixture of paying customers and registrants who aren’t allowed access then a common apporach is to use a plugin such as PaidMembershipsPro. By adding code to your themes functions.php your WordPress site can send group memberships over to your Discourse site.

Then in addition to ‘Login Required’ you can secure your categories behind groups which are populated by the WordPress plugin and SSO process.

The example code is in this post:

> [@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…

It’s not perfect, I believe @dfriestedt was working with @justin to clean it up and make the code more widely available:

> [@Integration between paidmembershipspro.com and Discourse](https://meta.discourse.org/t/integration-between-paidmembershipspro-com-and-discourse/112369):
>
> What would you like done? I’m looking to integrate [paidmembershipspro.com](http://paidmembershipspro.com) with discourse so when a member signs up to a recurring subscription they are added to a private member group in discourse. when that member stops paying for the membership they are removed from the discourse private group. When do you need it done? No rush. What is your budget, in $ USD that you can offer for this task? What ever is fair. However, I would like to make it open source so others can use it too for fre…

You’ve not elaborated on how you’re managing users or selling memberships on the WordPress side, so that’s the best I can do for now.

---

<div class="post-metadata">

### Author: ![PTKen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ptken/32/139213_2.png) [@PTKen](https://meta.discourse.org/u/PTKen)
#### Post date: [4 Mayo, 2019 16:29 UTC](https://meta.discourse.org/t/convert-public-forum-to-private-for-paid-clients-only/116845/7 "2019-05-04T16:29:35Z")

</div>

Thank you. I will take a close look at the links you provided.

I am managing my membership with MemberPress.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [4 Mayo, 2019 16:30 UTC](https://meta.discourse.org/t/convert-public-forum-to-private-for-paid-clients-only/116845/8 "2019-05-04T16:30:20Z")

</div>

In which case check out this topic:

> [@Memberpress: how to add users to groups upon Sign up](https://meta.discourse.org/t/memberpress-how-to-add-users-to-groups-upon-sign-up/83478/2):
>
> The easiest approach is to use the Discourse WordPress plugin: [WP Discourse – WordPress plugin | WordPress.org](https://wordpress.org/plugins/wp-discourse/) and enable Single Sign On between WordPress and your forum. This will make your WordPress site responsible for all user authentication on Discourse. To automatically add users to groups will require a bit of custom code. The [WP Discourse](https://github.com/discourse/wp-discourse) plugin has a couple of functions that can be used when SSO is enabled for automatically adding and removing users from Discourse groups. The functio…

---

<div class="post-metadata">

### Author: ![PTKen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ptken/32/139213_2.png) [@PTKen](https://meta.discourse.org/u/PTKen)
#### Post date: [4 Mayo, 2019 16:30 UTC](https://meta.discourse.org/t/convert-public-forum-to-private-for-paid-clients-only/116845/9 "2019-05-04T16:30:57Z")

</div>

Thank you. I’ll take a look. I expect this will be enough to close this topic. I appreciate your help…

Ken

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [28 Agosto, 2022 04:24 UTC](https://meta.discourse.org/t/convert-public-forum-to-private-for-paid-clients-only/116845/11 "2022-08-28T04:24:05Z")

</div>


