WordPress is a flexible tool that can be used to create and display content of all kinds. This post explains how to restrict access to WordPress. Keep reading to learn how to lock down ANY piece of content, feature, or download you might have on your WordPress site.
All of the instructions below assume that you are running the latest versions of WordPress, Paid Memberships Pro, and any other plugins mentioned.
If we missed something or you still have questions about protecting any specific kind of content on your site, let us know.
To restrict a single post in WordPress, look for the “Require Membership” box in the right sidebar of the edit post page. Check any level that should have access to the post.
The Block Editor (Gutenberg) is the default builder for WordPress. To show or hide blocks from members, just insert a Membership Required Block, set the required levels, and place any protected blocks inside.
Elementor is a popular page builder natively supported in the core Paid Memberships Pro plugin. With PMPro you can protect access to Elementor Sections or Controls. Click here to learn how to lock down Elementor content for members only.
Divi is a popular page builder natively supported in the core Paid Memberships Pro plugin. Click here to learn how to lock down Divi content in WordPress.
Beaver Builder is another page we support in the core Paid Memberships Pro plugin. With PMPro you can protect access to Beaver Builder Modules. Click here to learn how to lock down Beaver Builder content for members only.
You can set which categories members have access to from the edit membership level page in the dashboard. See here for more information on how to set access at the category level.
Restrict access to a post tag or any other built-in or custom taxonomy. Post tag protection is built into PMPro, but if you have a custom post taxonomy, check out this companion code recipe to set up membership restrictions for other custom taxonomies and terms in your WordPress site.
To hide a shortcode from non-members, wrap it in the membership shortcode and set which levels have access. You can also use the membership shortcode to show content to non-members and logged-out users only.
To restrict a single page in WordPress, look for the “Require Membership” box in the right sidebar of the edit post page. Check any level that should have access to the post.
PDF or Other Files
To host members-only PDFs and other downloadables on your WordPress site, simply upload those files to post or page, then mark that post or page to require membership. Only members will be able to view the page.
To further restrict access to the file itself, see our guide for locking down files with PMPro. Or, if you have many files or large files hosted offsite, consider our integration for the Download Monitor plugin.
To restrict access to a video on WordPress, simply embed that video into a post or page, then mark that post or page to require membership. Only members will be able to view the page.
For more details, see our guides on how to sell videos online, including tutorials for restricting YouTube, Vimeo, Bunny.net, or Amazon S3 hosted videos. For a general overview, refer to our complete guide on private video membership sites with PMPro.
If your course is just a post, page, file, video, or other piece of content listed here, follow the instructions in this guide to protect that kind of content.
If you would like to organize your course content into Courses and Lesson custom post types (CPTs), try our Courses Add On for Paid Memberships Pro. The Courses Add On is also our preferred way to restrict access to courses built with LifterLMS, LearnDash, TutorLMS, or Sensei LMS.
Learn more about selling courses with PMPro.
Newsletter & Email
Choose one of our email marketing integrations or use Zapier to add members to your email newsletter. With segmentation and membership level as a profile field, you can target specific member groups in your newsletter or email. Learn more about selling paid newsletters with PMPro.
To protect events made with the Events Manager, The Events Calendar, Sugar Calendar, or All-in-One Event Calendar plugins, use our Events Add On for Paid Memberships Pro.
Paid Memberships Pro can protect forum access for three popular forums plugins or third-party apps:
- bbPress: Protect your bbPress forums with our bbPress Add On.
- PeepSo: Protect your PeepSo forums with the Paid Memberships Pro Integration Plugin for PeepSo.
- phpBB: Restrict access to phpBB forums using the BridgeDD Connect plugin.
To restrict access to your BuddyPress or BuddyBoss community, use our BuddyPress Integration Add On.
To restrict access to your Discord channel, use the Discord Integration Add On for Paid Memberships Pro.
To keep non-members from posting comments, use our recipe.
Directory & Profile
If you offer a public or members-only searchable directory, PMPro can restrict access to view the directory, individual profiles, and even control who can view specific profile fields.
Ads are a classic method of monetizing your blog. For membership sites, you have to consider which ads to display for non-members, per-level, or completely hide for an “ad-free” experience. Read our guide on how to control and display ads to non-members and per level for your PMPro-powered membership site.
To restrict access to a form on WordPress, simply embed that form into a post or page, then mark that post or page to require membership. Only members will be able to view the page.
If you are using Gravity Forms specifically, you can use the Gravity PMP plugin by Ristretto Apps.
If you are using Contact Form 7, here is a tutorial on how to add a form to the member directory page.
To charge for access to your podcasts, you can use Castos Private Podcasting for Paid Memberships Pro or the Member RSS Add On for Paid Memberships Pro.
The WooCommerce Integration plugin for Paid Memberships Pro can be used to set member prices for products and otherwise link your WooCommerce shop to PMPro.
Here is a guide on how to require a membership level to purchase a specific category of products in WooCommerce.
Another option to restrict access to a WooCommerce product or product from any other WordPress ecommerce plugin is to use the Custom Post Type (CPT) Membership Access Add On for Paid Memberships Pro. Add the product CPT via the settings, then use the “Require Membership” meta box on the edit product page to choose which membership levels can see that product.
Custom Post Types
The Custom Post Type (CPT) Membership Access Add On for PMPro will add the “Require Membership” meta box to any CPT.
There are some rare cases where a URL generated in the WordPress site isn’t a piece of content you can actually edit. In this case, you need custom code to protect access to the specific URL.
This tutorial gives you a very simple-to-edit code recipe that blocks access to a URL in your WordPress site and redirects visitors and non-members to your pricing page.
Maybe you want to restrict access to your entire WordPress site. If so, read our guide on how to lock down everything but the homepage for non-users.
Another WP Site
You can use PMPro on one WP site to restrict access to other WP sites. If you are using WordPress Multisite, you can use our Multisite Membership Add On and set up PMPro on the main site while restricting access to subsites.
To restrict access to a separate WordPress site hosted on a different server, you can use the WP Single Sign On plugin, which is available in beta on GitHub. The WP SSO plugin allows users and members of one “host” site to log into a second “client” site where the SSO plugin is set up.
You can lock down non-WordPress files and entire directories of files using Paid Memberships Pro. Read our tutorial to learn how to route file requests through the PMPro getfile script to protect any file or folder using WordPress.
Paid Memberships Pro adds additional membership endpoints to the WordPress REST API, allowing you to connect any other app to your membership site. For simple integrations, we also have an example of how to build your own RESTful endpoint with WordPress and PMPro.
Zapier is another method to connect your site with third party applications. Checkout our documentation on PMPro’s native support for Zapier.