TUTORIAL

How to Restrict Access to WordPress Pages and Post by User Roles?

Last Updated: 4 mins By: Akriti Pant

Whether you’re offering premium content, restricting access to confidential pages, or managing user subscriptions, WordPress makes it easy to restrict content by user roles.

Roles like Administrator, Editor, Contributor, and Subscriber—help you define who has access to certain parts of your website.

This guide teaches you how to restrict access to pages and posts based on user roles and manage content visibility efficiently.

Let’s get started!

How to Restrict WordPress Pages and Content to Specific Users?

Do you know that on a WordPress site, you can assign different roles to your users, such as administrator, author, editor, contributor, subscriber, etc.?

You can even create custom roles, such as customer, member, or student, using plugins. Once users are registered, you can easily restrict content based on their roles.

Let’s look at the steps to restrict WordPress pages and content to specific users.

Step 1: Allow Users to Register on Your Site

Before assigning roles and restricting content to users, you must register them on your site. To do so, you should use a user registration plugin.

User Registration is a plugin that allows users to register on your site. So, go ahead and install the plugin first.

User Registration Plugin
User Registration Plugin by WPEverest

With User Registration, you can easily create registration forms without trouble. Its easy-to-use drag-and-drop form builder feature allows anyone to create registration forms for their site.

Moreover, you can choose which user roles to assign to the user once they have filled out the registration form. To do this, open the form and click on Form Settings.

Now, on the General tab, you’ll see Default User Role, from which you can select a user role.

Form Setting for User Role

Hit on the Update form button after selecting the form’s user role.


Step 2: Install Content Restriction Add-on

To restrict content by user roles, you’ll need to add a Content Restriction Add-on, available in the pro version of User Registration.

Thus, buy the plugin’s premium version, and you’ll be ready. For more details on the pricing, go to our Plans and Pricing page to choose the best plan for you.

Read our guide on installing and setting up the User Registration plugin for an in-depth guide.

After installing and activating the User Registration Pro version, navigate to User Registration >> Extensions. Then, scroll to find the Content Restriction add-on.

Content Restriction Addon Activate Button

Once you find the add-on, Activate it.


Step 3: Full Content Restriction

After installing and activating the add-on, go to the User Registration tab and click Settings. Then, click on the Content Restriction tab.

Navigate to Content Restriction

Now, click on the drop-down option to Allow Access To specific roles. Then, Select the roles you want to restrict access to. Also, don’t forget to add the restriction message that will be shown to restricted users.

Restrict Specific User

Hit the Save Changes button.

After that, go to the post or page that you need to restrict. In the bottom of the page, you can see the Restrict This Content box.

Check the Restrict Full Content option.

restrict content by user roles

You can restrict content by user roles and make any particular page or post accessible only to specific users.

Below the Restrict Full Content option, there is the Override Global Settings option. Check that option.

Then, click on the drop-down menu for the Allow Access To option and select Choose Specific Roles.

After that, simply choose the user roles you want to give access to from the Allow Access To Roles option.

restrict WordPress pages and content to specific user

Partial Content Restriction

Similarly, you can also restrict content by user roles partially. The Content Restriction add-on provides a shortcode for that.

Just insert the content you want to restrict inside the given Shortcode and your job is done!

restrict content by user roles six

After you restrict pages or content by user roles, the user will see the restriction message you set up when they try to access that content or page.

restrict content to specific user

And that’s how you restrict content as per user roles on a WordPress site.


Wrapping up!

User Registration is the perfect solution to restrict content by user roles. Its Content Restriction Add-on allows you to set clear rules for what each user can access, offering exclusive content to different groups.

Using the plugin, you can easily restrict content by user roles, ensuring the right audience sees the right content while protecting sensitive information.

So, start implementing these strategies today and ensure your site delivers the right content to the right users!

If you’re interested in doing more with content restriction, check out this article on how to restrict content to non registered users.

Also, stay connected with us through X (formerly Twitter) and Facebook.

How to Restrict Access to WordPress Pages and Post by User Roles?
Scroll to top

Pin It on Pinterest