Title: LH Private BuddyPress
Author: shawfactor
Published: <strong>November 6, 2016</strong>
Last modified: July 30, 2022

---

Search plugins

![](https://ps.w.org/lh-private-buddypress/assets/banner-772x250.jpg?rev=1529055)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/lh-private-buddypress/assets/icon-256x256.png?rev=2763877)

# LH Private BuddyPress

 By [shawfactor](https://profiles.wordpress.org/shawfactor/)

[Download](https://downloads.wordpress.org/plugin/lh-private-buddypress.zip)

 * [Details](https://pirate.wordpress.org/plugins/lh-private-buddypress/#description)
 * [Reviews](https://pirate.wordpress.org/plugins/lh-private-buddypress/#reviews)
 *  [Installation](https://pirate.wordpress.org/plugins/lh-private-buddypress/#installation)
 * [Development](https://pirate.wordpress.org/plugins/lh-private-buddypress/#developers)

 [Support](https://wordpress.org/support/plugin/lh-private-buddypress/)

## Description

Protect your BuddyPress Installation from strangers. Only registered users will 
be allowed to view view directory pages, activity and profile pages. Users attempting
to view blog content via RSS are also authenticated via HTTP Auth.

This plugin is inspired by the Private Buddypress plugin by Dennis Morhardt. I rewrote
it to provide a solution that followed the WordPress coding stndards and the decisions
rather than options philosophy. I deploy this on my own multisite environment where
I don’t want public profiles, activity or members directories (and where I don’t
want site admins changing this).

**Like this plugin? Please consider [leaving a 5-star review](https://wordpress.org/support/view/plugin-reviews/lh-private-buddypress/).**

**Love this plugin or want to help the LocalHero Project? Please consider [making a donation](https://lhero.org/portfolio/lh-private-buddypress/).**

## Installation

Use the automatic plugin installation in the backand or install the plugin manuell:

 1. Upload ‘lh-private-buddypress’ to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

## FAQ

### Can I change the URL where non-loggedin users are being redirected?

Yes, currently you need to write a filter function in your functions.php or site
specific plugin.

    ```
    function redirect_nonloggedin_users($current_uri, $redirect_to) {
        // Redirect users to the homepage
        return get_option('siteurl') . '/?from=' . $redirect_to;
    }

    add_filter('lh_private_buddypress_redirect_login_page', 'redirect_nonloggedin_users', 10, 2);
    ```

### Are there other actions or filters?

In LH Private BuddyPress are 4 existing filters:

 * **lh_private_buddypress_is_buddypress_feed**: Boolean value if the current page
   is a BuddyPress feed
 * **lh_private_buddypress_redirect_to_after_login**: Called URI from where the 
   users came from
 * **lh_private_buddypress_display_login_message**: Customise the message when vistors
   try to access a private component
 * **lh_private_buddypress_redirect_login_page**: URI where nonloggedin users are
   being redirected
 * **lh_private_buddypress_login_required_check**: Boolean value if for the current
   page a login is needed

### What components are made private?

Only the members directory, user profile, and activity pages. These can only be 
visited by logged in users. All other components are still public.

### Why this set up?

This is primarily for organisations, they usually want a public presence but may
not want to disclose membership details to non members.

### What if something does not work?

LH Private Buddypress, and all [https://lhero.org](https://pirate.wordpress.org/plugins/lh-private-buddypress/LocalHero?output_format=md)
plugins are made to WordPress standards. Therefore they should work with all well
coded plugins and themes. However not all plugins and themes are well coded (and
this includes many popular ones).

If something does not work properly, firstly deactivate ALL other plugins (except
Buddypress and this on) and switch to one of the themes that come with core, e.g.
twentyfifeen, twentysixteen etc.

If the problem persists please leave a post in the support forum: [https://wordpress.org/support/plugin/lh-private-buddypress/](https://wordpress.org/support/plugin/lh-private-buddypress/).
I look there regularly and resolve most queries.

### What if I need a feature that is not in the plugin?

Please contact me for custom work and enhancements here: [https://shawfactor.com/contact/](https://shawfactor.com/contact/)

## Reviews

![](https://secure.gravatar.com/avatar/8f6e98a0a5c89a78c98bd1704e0fcbbbce830b45656771df909717d26a1f3814?
s=60&d=retro&r=g)

### 󠀁[Perfect](https://wordpress.org/support/topic/perfect-8681/)󠁿

 [soulipsyz](https://profiles.wordpress.org/soulipsyz/) July 30, 2021 1 reply

Just what I needed, very simple to use.

![](https://secure.gravatar.com/avatar/3f5a1c2b366752c9fee959cfc9e2673b97fdbed729e4d51d89c90e22b8095efa?
s=60&d=retro&r=g)

### 󠀁[must have for private BuddyPress sites](https://wordpress.org/support/topic/must-have-for-private-sites/)󠁿

 [andrew55](https://profiles.wordpress.org/andrew55/) January 18, 2018

Was very happy to find this! We have a site which we simply can't have nosy visitors
trolling. I had some issues getting plugin to work (because of bad code in existing
plugins), but the author was very prompt and help at creating a solution. Way to
go!

![](https://secure.gravatar.com/avatar/992f990d7be3f689a638c64c33771a7488b2f803b473efb0b8f5f63e47aab9ec?
s=60&d=retro&r=g)

### 󠀁[Works as advertised](https://wordpress.org/support/topic/works-as-advertised-491/)󠁿

 [digitalstartup](https://profiles.wordpress.org/digitalstartup/) January 17, 2018

Works exactly as expected. I hope this plugin continues to receive compatibility
checks/updates for future versions of Wordpress.

![](https://secure.gravatar.com/avatar/2f2668f8a579b8959a15beafebc538f9ac52248938e7532289149cfbc103a72e?
s=60&d=retro&r=g)

### 󠀁[Worked instantly](https://wordpress.org/support/topic/worked-instantly-5/)󠁿

 [Mwale Kalenga](https://profiles.wordpress.org/mwalek/) February 24, 2017

Amazing! Made my group page private with the click of a button.

![](https://secure.gravatar.com/avatar/99bf237fc6a13537f84344da278698861eb6b1f1119257b26fd04ce0aeb03d1c?
s=60&d=retro&r=g)

### 󠀁[Excellent](https://wordpress.org/support/topic/excellent-3961/)󠁿

 [denizci88](https://profiles.wordpress.org/denizci88/) November 30, 2016

Hello, It is really working. Thank you this excellent plugin 🙂 Best Regards

 [ Read all 5 reviews ](https://wordpress.org/support/plugin/lh-private-buddypress/reviews/)

## Contributors & Developers

“LH Private BuddyPress” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ shawfactor ](https://profiles.wordpress.org/shawfactor/)
 *   [ jomo ](https://profiles.wordpress.org/jonathanmoorebcsorg/)

[Translate “LH Private BuddyPress” into your language.](https://translate.wordpress.org/projects/wp-plugins/lh-private-buddypress)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/lh-private-buddypress/),
check out the [SVN repository](https://plugins.svn.wordpress.org/lh-private-buddypress/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/lh-private-buddypress/)
by [RSS](https://plugins.trac.wordpress.org/log/lh-private-buddypress/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

**1.00 November 02, 2016**
 * First release

**1.01 November 04, 2016**
 * More documentation

**1.02 March 24, 2017**
 * Fixed very minor error in php strict error reporting

**1.03 March 24, 2017**
 * Nest bp_init

**1.04 March 30, 2017**
 * More explicit variable check

**1.05 May 10, 2017**
 * Another explicit variable check

**1.06 July 26, 2017**
 * Added class check

**1.07 December 23, 2017**
 * Made translation ready

**1.08 January 17, 2018**
 * Singleton and did_action

**1.09 March 05, 2019**
 * Minor changes and improvements

**1.10 April 04, 2019**
 * Better Authorisation handling

**1.11 May 16, 2019**
 * Prevent direct access

**1.12 July 29, 2022**
 * code fromatting

## Meta

 *  Version **1.12**
 *  Last updated **4 years ago**
 *  Active installations **100+**
 *  Tested up to **6.0.17**
 *  PHP version ** 5.6 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/lh-private-buddypress/)
 * Tags
 * [buddypress](https://pirate.wordpress.org/plugins/tags/buddypress/)[privacy](https://pirate.wordpress.org/plugins/tags/privacy/)
   [private](https://pirate.wordpress.org/plugins/tags/private/)[protect](https://pirate.wordpress.org/plugins/tags/protect/)
   [protection](https://pirate.wordpress.org/plugins/tags/protection/)
 *  [Advanced View](https://pirate.wordpress.org/plugins/lh-private-buddypress/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  5 5-star reviews     ](https://wordpress.org/support/plugin/lh-private-buddypress/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/lh-private-buddypress/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/lh-private-buddypress/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/lh-private-buddypress/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/lh-private-buddypress/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/lh-private-buddypress/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/lh-private-buddypress/reviews/)

## Contributors

 *   [ shawfactor ](https://profiles.wordpress.org/shawfactor/)
 *   [ jomo ](https://profiles.wordpress.org/jonathanmoorebcsorg/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/lh-private-buddypress/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://lhero.org/portfolio/lh-private-buddypress/)