Possible to protect Discourse Forum using s2member?

Hey team,

The forum on my website is reserved for members-only and protected by s2member. The general public can view forum topic titles, but they do not have access to the full forum posts.

I would like to start using Discourse for my forum.

Is there a way to protect Discourse content using s2member?

Best regards,

Ryan

How about using URI protections?

Very cool, thanks for the reply :+1:

I have not used URI Restrictions before but I think it might work.

Discourse is not powered by WordPress—it lives outside of WordPress. That means s2Member cannot protect Discourse pages unless you somehow load your WordPress installation on each Discourse page-load, which probably isn’t even possible given that Discourse is written in Ruby (as opposed to PHP, which is what powers WordPress).

For more info on this topic, see Protecting Non-WordPress Content.

On this same topic, I thought I should mention the related GitHub issue that was opened awhile ago, but has since been closed due to lack of any practical solution to the problem of integrating Discourse and s2Member: https://github.com/websharks/s2member/issues/698

Oh, yes, of course, Discourse is SaaS-only (and that’s even without about the Ruby aspect).

Thanks so much.

So if I use the method described in the Protecting Non-Wordpress Content article, do you think it would be possible to implement what I describe in this brief screencast video?

The method described in Protecting Non-WordPress Content assumes your non-WordPress content is PHP-powered. WordPress runs on PHP, so if you try to include the WordPress wp-load.php file in a Ruby-powered app like Discourse, that simply won’t work.

1 Like

Thank you very much.

So just to be crystal clear…it is in no way possible to make a Discourse forum “members only” using s2member?

I think there is a way, but not “direct”, “out of the box”… Can use “fake pages” and internal WP redirect to create URLs “inside” WP, that can be protected by s2M. But also must hide the forum with .httaccess and create some type of “proxy” in WP, and this is not easy. If you really need that, please find me.

1 Like

Thank you all for the helpful replies.

@krumch could you share some more details about your idea for making this work?

Sorry, can’t explain… That really is not an easy solution, even to explain - there is so many cases to consider, and depends of lot of things, include your hosting settings. So just no way, sorry…