What's new in 2.4.0
BuddyPress Lock - Private Community overviewFreeGet BuddyPress Lock - Private Community →
2.4.0 closes places where locked content could still be reached, makes the members-only screen a real login form, and raises the minimum PHP version. Read the update notes and run the short retest below before you tell your members the update is done.
Update notes
Section titled “Update notes”- PHP 8.1 or later is required. A site on older PHP cannot activate 2.4.0. Check your hosting PHP version before updating.
- WordPress 5.9 or later and BuddyPress are required, as before.
- Page IDs you locked in older versions are converted once into Protected URL rules and appear in the Protected URLs box with a “Migrated from old page settings” comment. Pages that earlier versions had left public by mistake are locked again.
- Rules now match whole path segments. A whitelist or locked-URL rule such as
secretno longer matches/secret-area/payroll/. Check any rule that relied on matching part of a path. See How URL rules match. - Deleting the plugin no longer removes its options, because the uninstall routine was removed. See Where settings are stored.
- The members-only screen no longer has a Register tab. It shows a Create an account link to the BuddyPress registration page instead, so activation emails, required profile fields and anti-spam or captcha checks apply.
What is protected now
Section titled “What is protected now”For a logged-out visitor:
- A locked page, post or custom post type is also refused when read through the REST API or oEmbed.
- Locked pages and posts are removed from site search, feeds, XML sitemaps and REST lists.
- BuddyPress activity RSS feeds (site-wide, member, group, favourites and mentions) are blocked while Activity is locked, and always under Full Protection unless whitelisted.
- The users sitemap is closed while Members is locked.
- With Site Wide Activity locked, activity no longer shows on group pages, profiles or widgets.
- A whitelist entry of
/no longer exposes your feeds and sitemaps; it covers the front page only. - The members-only screen no longer names the locked member, group or page in the browser tab, the meta description or link previews.
Behaviour fixes
Section titled “Behaviour fixes”- Saving the Partial Protection tab no longer switches Full Protection off, and the tab warns you when Full Protection is on and its rules are not being applied.
- Locking Groups or Activity no longer locks members whose username contains “groups” or “activity”. Locking Members no longer locks a group’s Members tab.
- Protecting a page now works even when that page is also saved as the redirect page.
- On a fresh install the Partial Protection tab shows the components the site actually locks.
- Upgrades from versions before 2.0 no longer lose the locked-page list.
- Multisite installs are no longer pinned to root blog 1 with multiblog disabled; the plugin stopped defining
BP_ENABLE_MULTIBLOGandBP_ROOT_BLOG. Set them inwp-config.phpif your network relied on the old behaviour. - The login form on the members-only screen is a real form: Enter logs you in, password managers fill it, and you return to the page you asked for.
- Failed logins on the lock screen are counted per IP address and per username, and the login request always needs a valid security token. See Brute-force protection for what this means on shared networks.
Retest after updating
Section titled “Retest after updating”Open a private browsing window so you are logged out, then check:
- A locked page shows the members-only screen, not its content.
- Searching for a word that appears only on a locked page returns nothing.
- Under Full Protection,
/wp-json/,/feed/and/wp-sitemap.xmlrefuse the request. - A whitelisted page still opens, and so do your login, registration and account activation pages.
- Each whitelist and locked-URL rule still matches the pages you meant it to (see the update note about path segments).
- If you use Redirect to Another Page, the redirect page opens without a loop.
- If a plugin or app of yours reads your content over the REST API while logged out, confirm it still works, and add its route with the
bplock_rest_allowed_routesfilter if it must stay open.
For developers
Section titled “For developers”- Removed: the
bplock_registerAJAX action, thebp_lock_after_register_formaction, thebplock_register_success_messagefilter, thebplock-register-form.phptemplate, and theBp_Lock_Globalsclass with the$bplockglobal. - Added filters:
bplock_filter_search_results,bplock_get_all_pages_limit,bplock_redirect_page_limit. The REST filtersbplock_rest_allowed_routesandbplock_restrict_rest_routeand the feed filterbplock_restrict_feedsare listed in Hooks and filters. - The
bplock_get_all_pagesAJAX action now returns{ urls, truncated, limit }instead of a bare array. The bundled script accepts both shapes; update any custom script that reads it. bplock_exclude_search()onpre_get_postswas replaced bybplock_filter_search_results()onthe_posts. Code that removed the old hook to disable search exclusion should use thebplock_filter_search_resultsfilter.- All allow and deny matching runs through the
Bp_Lock_Url_Matcherclass.

