Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Restrict WordPress Pages by User Role (3 Easy Ways)

Many businesses need to control which users can access certain pages on their WordPress websites. Certain pages can hold sensitive information, and giving everyone access can be dangerous. Alternatively, some content might only be for paying subscribers.

Over the years, we’ve set up role-restricted pages across our brands. For instance, if you purchase one of our partner products, like WPForms or MonsterInsights, then you will be able to view different pages within the account area as a subscriber.

In this article, we will show you how to easily restrict access to certain WordPress pages by user role.

Restrict WordPress pages by user roles

Why Restrict WordPress Pages by User Role?

When you start a WordPress site, you might want to restrict certain areas and pages based on user role. For instance, if you have a multi-author site, then you can limit access to specific pages for writers and editors.

Restricting pages based on user roles is a common use case for membership sites. You can limit pages on your site based on the user’s membership level. For example, only subscribers can view the video page or the online course page.

By default, WordPress comes with a limited set of tools to restrict content on your website. You can create private and password-protected posts, but these features don’t allow you to limit access by user role.

Luckily, there are several WordPress plugins that allow you to do just that. You can choose one of them to restrict pages to certain users, user groups, or user roles.

Using these plugins, you can create a membership website, pay-per-view websites, or even family blogs. You can also monetize your content by adding paid subscriptions.

That being said, let’s take a look at how to properly restrict WordPress pages by user role. We will show you different plugins so you can choose the one that best suits your needs:

1. Restrict Pages by Membership Using MemberPress

MemberPress is one of the best WordPress membership plugins on the market. It allows you to easily create membership websites with paid subscriptions. You can set up content restrictions and only allow specific user roles to access it.

MemberPress is a premium plugin, and you’ll need to sign up for an account. Simply visit the website and click the ‘Get MemberPress for WordPress’ button.

MemberPress

Next, you will need to install and activate the MemberPress plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, head over to the MemberPress » Settings page to enter your license key. You can find the key in your account area on the MemberPress website.

Adding a license key to your MemberPress plugin

Next, you need to head over to the ‘Payments’ tab to set up payments.

Simply click the ‘+ Add Payment Method’ option to get started.

The MemberPress payment gateway settings

MemberPress supports PayPal (Standard, Express, and Pro), Stripe, Authorize.net, and more out of the box. You can select the payment methods you want to use and provide the required credentials.

Next, you need to visit the MemberPress » Memberships page from the WordPress dashboard and click on the ‘Add New’ button to create a membership plan.

Adding a new membership subscription to WordPress

You will start by providing a title for this membership plan and setting pricing, billing type, and expiration settings.

After that, scroll down to the ‘Membership Options’ meta box below the post editor. This is where you can set up different options for this particular membership plan.

Go ahead and click on the ‘Advanced’ tab under membership options and click the ‘User Roles for this Membership’ checkbox.

Check the user roles option

After that, you can simply choose a user role from the given list.

Be careful when choosing a user role, as each user role in WordPress comes with its own permissions. If you need, you can also create a custom user role for the membership plans on your website.

You can now publish your membership plan.

If you want to add more membership plans, then you can repeat the process to add them.

Once you have created a membership plan, it is time to set up rules to restrict access to the content.

Head over to the MemberPress » Rules page from the WordPress dashboard and click on the ‘Add New’ button at the top.

Adding a new rule to your WordPress membership site

This will bring you to the rules edit page, where you can select different conditions and choose which pages to restrict.

You can click the dropdown menu under ‘Protect Content’ and choose a rule.

Choose content to restrict

For example, you can select all content that matches a particular tag or category to be available only to members with a membership plan you created earlier. Or you can select a single page to restrict access.

If you’re choosing a category or tag to block access, then you’ll need to ensure that the content is added to that particular category or tag.

You can see our guide on how to add categories and tags in WordPress.

That’s all. You have successfully restricted pages in WordPress by user role and membership using MemberPress.

2. Limit Page Access by User Role Using Restrict Content Pro

Restrict Content Pro is a great option to control who has access to your website content. It also allows you to add paid subscriptions and make money online from your membership website.

To start, you’ll need to visit the Restricted Content Pro website and click the ‘Get Started’ button.

Restricted Content Pro

Next, you’ll need to sign up for an account.

To set up page restrictions based on user roles, you can use the free plan. Simply click the ‘Get Started’ button under the Free plan.

Create a free restricted content pro account

After that, a popup window will open.

You can enter an email address and click the ‘Get Your Free Plugin’ button.

Sign up for a free restricted content pro account

Next, you’ll receive an email from Restrict Content Pro with the download link for the free plugin.

Go ahead and download the plugin onto your computer.

From here, you will need to install and activate the Restrict Content Pro free plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you can visit the Restrict » Settings page from your WordPress dashboard and go to the ‘General’ tab.

Edit general settings for restricted content pro

Here, you can edit different pages that the plugin will automatically set up for your website.

Next, you’ll need to scroll down to the ‘Restricted Content Message’ section and add text that users will see if they’re unauthorized to view a page.

Enter restricted error message

After that, you need to switch to the ‘Payments’ tab to select a payment gateway.

Restrict Content Pro allows you to accept payments through PayPal, Stripe, Braintree, and Authorize.net.

Set up a payment service in restricted content pro

After selecting a payment method, you will be able to add credentials for each Payment method.

Don’t forget to save your settings when you’re done.

Now, you need to edit the pages or posts you want to be restricted by user roles.

Once you’re in the WordPress content editor, simply scroll down to the ‘Restrict this content’ meta box.

Select user role to restrict pages

From here, click the dropdown menu under the Member access options section and select the ‘Members with a certain role’ option.

Next, you can choose the user role you want to allow to view the page.

Choose user roles to limit page access

When you’re done, simply update or publish your content.

Restrict Content Pro also allows you to create subscription levels. For more detailed instructions, see our guide on how to restrict content to registered users in WordPress.

3. Block Access to Online Course Pages Using Thrive Apprentice 

Thrive Apprentice is one of the best WordPress LMS plugins that allows you to create and sell courses online. You can use its drag-and-drop course builder to create lessons, quizzes, and more.

It comes with built-in subscriptions, allowing users to enroll in a course before they can see its contents. This enables you to restrict access to course pages and monetize your website.

First, you’ll need to visit the Thrive Apprentice website and sign up for an account.

Thrive Apprentice

After creating a new account, you can head to the account area.

From here, simply download the Thrive Product Manager plugin.

Install Thrive Product Manager

Next, you can install and activate the Thrive Product Manager plugin on your site. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you need to visit the Product Manager page from the WordPress dashboard and click the ‘Log into my account’ button.

Go to Thrive product manager

On the next screen, you’ll see different Thrive Theme products.

From here, you need to install Thrive Apprentice. Simply check the ‘Install Product’ options and click the ‘Install selected products’ button at the bottom.

Install Thrive Apprentice plugin

Once the installation is complete, you will see ‘Ready to use’ status.

Simply click the ‘Go to the Thrive Themes Dashboard’ button at the bottom.

Go to thrive themes dashboard

On the next screen, you will see the Thrive Dashboard.

Go ahead and click the ‘Apprentice Dashboard’ button.

Head to thrive apprentice dashboard

Next, the Thrive Apprentice course builder will launch, and you’ll see a welcome screen.

Simply click the ‘Get Started’ button to continue.

Get started with apprentice

After that, you’ll need to choose a page where all your course content will live.

You can add a new page or simply choose an existing one. For the sake of this tutorial, we’ll create a new page.

Go ahead and enter a name for your page, and then click the ‘Add page’ button.

Enter a name for new course page

Once that’s done, simply click the ‘Continue’ button.

After that, Thrive Apprentice will ask you to name a new design for your course. Go ahead and enter a name and click the ‘Create new design’ button.

Name your new design

Next, the Apprentice School Wizard will launch. You can use it to customize the design of your online course.

Simply click the ‘Get Started’ button and follow the onscreen instructions to edit the appearance.

Customize your online course

For example, the wizard will ask you to upload a brand logo, choose a brand color, select a header for your school, edit the school homepage, select a navigation bar, choose templates for different sections of your course, and more.

After you’ve customized the design, you can then head to the ‘Course’ tab from the menu on the left and then click the ‘+ Add course’ button.

Add new course

On the next screen, you can enter a course name at the top.

Besides that, there are also options to change the URL, enter the course overview, cover image, and more.

Enter course name and details

Next, you’ll need to switch to the ‘Content’ tab.

Here, you can enter different components of your course, like lessons, assessments, chapters, and modules.

Enter course contents

For example, if you want to create a lesson, then simply click the ‘+ Add Lesson’ button.

When a popup window opens, go ahead and enter a lesson title, URL, lesson summary, and more.

Enter lesson details

After entering these details, click the ‘Save’ button.

Your lesson will now appear under the Content tab. You’ll need to click the ‘Publish’ option for the lesson you just created.

Publish your lesson

Next, you’ll need to switch to the ‘Access restrictions’ tab.

From here, simply click the ‘+ Create a Product based on this course’ button.

Create a product based on course

After that, enter a product name and select the course you want to include.

Simply click the ‘Done’ button after entering these details.

Enter new product details

Next, you will see more options for your product on the left-hand side. Go ahead and switch to the ‘Access requirements’ tab.

From here, you can select the WordPress user roles that can access this course.

Restrict course based on user roles

When you are done, simply click the ‘Save’ button.

Now, you can publish your course so users with specific roles can access it. To do that, you can go back to the ‘Course’ tab.

Next, you can click the ‘Unpublished’ dropdown option at the top right corner of your course. From the dropdown menu, simply select the ‘Publish’ option.

Publish your new course

That’s all for now. We hope this article helped you learn how to easily restrict WordPress pages by user role. You may also want to see our ultimate step-by-step how to add an SEO editor role in WordPress and how to share users and logins between multiple WordPress sites.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

11 CommentsLeave a Reply

  1. Olaf

    For multi-user websites, it makes perfect sense to influence content based on user roles. This is especially great for anyone considering a certain type of website monetization. I would like to try the membership plugin, but it’s quite expensive and doesn’t offer a trial version (or am I mistaken?). The second plugin does have a free version available, so I would definitely like to give that one a try. It’s good that you included an alternative to MemberPress in the article, which can be tested for free.

  2. Mrteesurez

    While restrict contents pro offer this feature but based on what I have read about Memberpress, it’s more suitable for this kind of function as it comes with a full membership features. Thanks.

  3. Jiří Vaněk

    Thank you for the tutorial. I have a blog that also deals with technical guides, and I’m considering how to set up a paid section. Today, many people go the route of Patreon or HeroHero, but I would like to have everything completely under the control of my website. It’s great what WordPress can do now with the help of plugins.

  4. Konrad

    using a plugin like those mentioned is definitely the easiest and safest way to do this :D
    Remember, always back up your site before making any changes!

  5. Ralph

    This is really good tutorial for membership sites. I plan on doing website with mix of free and paid articles and this is great way of doing that. Free basic articles for everybody and more advanced are only for paying members. Didn’t think this could be so easy.

    • WPBeginner Support

      Happy to hear we could simplify the process for you :)

      Admin

  6. Moinuddin Waheed

    Memberpress is the best choice when it comes to making a website where you can restrict the content based on certain users criteria.
    it is specially good when it comes to making courses to sell and at the same time having some of them as free resources.
    it has all the features that is required to make a good course selling website and restricting the content to the paid subscribers only.
    subscription based website can easily made with this plugin.

  7. Mike Shannon

    I am setting up a webpage for a club. I want to develop a blog page in which only I and the club president can post to but which all users can see. How can I do this? Or can I?

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.