Skip to content

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.

  • 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 secret no 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.

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.
  • 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_MULTIBLOG and BP_ROOT_BLOG. Set them in wp-config.php if 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.

Open a private browsing window so you are logged out, then check:

  1. A locked page shows the members-only screen, not its content.
  2. Searching for a word that appears only on a locked page returns nothing.
  3. Under Full Protection, /wp-json/, /feed/ and /wp-sitemap.xml refuse the request.
  4. A whitelisted page still opens, and so do your login, registration and account activation pages.
  5. Each whitelist and locked-URL rule still matches the pages you meant it to (see the update note about path segments).
  6. If you use Redirect to Another Page, the redirect page opens without a loop.
  7. 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_routes filter if it must stay open.
  • Removed: the bplock_register AJAX action, the bp_lock_after_register_form action, the bplock_register_success_message filter, the bplock-register-form.php template, and the Bp_Lock_Globals class with the $bplock global.
  • Added filters: bplock_filter_search_results, bplock_get_all_pages_limit, bplock_redirect_page_limit. The REST filters bplock_rest_allowed_routes and bplock_restrict_rest_route and the feed filter bplock_restrict_feeds are listed in Hooks and filters.
  • The bplock_get_all_pages AJAX 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() on pre_get_posts was replaced by bplock_filter_search_results() on the_posts. Code that removed the old hook to disable search exclusion should use the bplock_filter_search_results filter.
  • All allow and deny matching runs through the Bp_Lock_Url_Matcher class.