Would you like to restrict WordPress pages by user role? Many WordPress companies need to control which users can access certain pages on their websites. In this tutorial, we'll show you how to easily restrict access to certain WordPress pages by user role.

Restrict WordPress pages by user role

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

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

Using these plugins, you can create a membership site, a website pay-per-view, 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, you can choose the one that best suits your needs.

1. Restrict Content Pro

restrict content pro.png

Download

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

First, you will need to install and activate the Restrict Content Pro plugin. For more details, see our step-by-step guide to way to install a WordPress plugin .

After activation, you must visit the page Restrict »Settings to enter your license key. You can get this key from your account on the Restrict Content Pro website.

license restrict content pro.png

Then you need to switch to the payments tab to select a payment gateway.

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

restrict content pro payments.png

After selecting a payment method, you will be able to add identifying information for each payment method.

Remember to click the Save Options button to save your settings.

Now you need to change the pages or posts that you want to restrict based on user roles.

In the edit screen, scroll down to the “Restrict this content” meta box and select the “Members with a certain role” option.

member with some role wordpress restrict content pro.png

Choose the user role you want to allow, and then update or publish your content.

Restrict Content Pro also allows you to create subscription levels.

2. MembrePress

memberpress plugin wordpress.png

Download

MemberPress is one of the best WordPress space plugins on the market. It allows you to easily create member area websites with paid subscriptions.

First you need to install and activate the MemberPress plugin. For more details, see our step-by-step guide to way to install a WordPress plugin .

After activation, appointment on MemberPress »Activate to enter your license key. You can find this information from your account on the MemberPress website.

memberpress-license.png

Then you need to click on the Add-Ons tab and install the 'WordPress User Roles' add-on.

memberpress.png extensions

After you install the User Role Add-On, you must go to the MemberPress 'Options' page . Click on the "Payments" tab to configure the payments.

memberpress configuration of payment methods.png

MemberPress supports PayPal (Standard, Express, and Pro), Stripe, and Authorize.net. Select the payment methods you want to use and provide the required credentials.

Then you have to visit the page "Memberships" of MemberPress and click the "Add New" button to create a membership plan.

Add a member area

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

After that, scroll down to the "Membership options" section under the post editor. This is where you can configure different options for that particular membership plan.

Wordpress member area option

Click on the "Advanced" tab under the subscription options and choose a user role for this subscription plan.

subscription option.png

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

You can now publish your membership plan.

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

Once you have created a membership plan (s). It's time to put rules in place to restrict access to content.

Meeting on MemberPress »Rules and click the “Add New” button at the top.

This will take you to the edit rules page where you can select different conditions and associate them with a membership plan.

Modification of subscription rules

For example, you can select all content that matches a particular tag or category to be accessible only to members whose membership plan was previously created.

Finally, you need to edit the content you want to restrict and add it to that particular category or tag.

That's it, you've managed to limit access to pages on WordPress by user role and subscription.

3. LearnDash

learndash.png

Download

LearnDash is one of the best LMS plugin on WordPress. It allows you to create and sell courses online.

It comes with built-in subscriptions allowing users to subscribe to a course before they can view its content. This allows you to restrict access to course pages and monetize your website.

The first thing you need to do is install and activate the LearnDash plugin. For more details, see our step-by-step guide on how to way to install a WordPress plugin .

When activating, you must visit the page LearnDash LMS »Settings and click on the LMS License tab. Enter your email address and LearnDash license key, then click the “Update License” button to save it.

Lms license

Next, you need to switch to the “PayPal Settings” tab to enter your PayPal email address.

Paypal settingsBy default, LearnDash only offers the PayPal payment gateway. Stripe and 2Checkout are available as extensions.

Now you can go to LearnDash LMS » page of course and click on the "Add New" button to add your first class.

Add a new lms courseEnter a title and description for your course. The description part will be visible to all users to explain what this course is.

Add a new courseAfter that you need to scroll down to the course options meta box. Under the course price type option, you can select an access option for the course.

The plugin allows you to create open (public) or closed courses, free, buy bows, and recurring prize types.

Course optionsFor free courses, your users will still need to register for a course by creating an account.

You can now save or publish your course and display it on your website.

Preview a course on wordpressNow that you've created a course, it's still empty. To complete it, you will need to add course content like lessons, quizzes, and homework.

LearnDash is a powerful tool for sell courses online while limiting access to content. It works great with MemberPress to create subscription plans that automatically give users access to different courses.

It's all for now. We hope this article has helped you learn how to easily restrict WordPress pages by user role.