Search Results :


Restrict Content By Members in WordPress – Protect WordPress Media Files

Restrict Content By Members in WordPress – Protect WordPress Media Files

It’s the 21st century and the rate of modernization and development is fast. Shopping, Meeting new People, Chatting with Friends, Ordering Food, almost everything is happening on the internet. While all this is happening we cannot forget Education, which is also easily accessible online through various Learning Management Systems (LMS). WordPress as we know is one of the most used Content Management Systems (CMS) and has a humongous user base.
The number of students on these education websites is ever-increasing to gain education and learn from online courses, we come down to question i,e, Has the student access to the right content? In this article, we will try to explain the problem and the solution to it. So without further ado, let’s dive right in!

Restrict Media Files in WordPress

Why Restrict WordPress Pages and Content to a specific user?

Suppose you have a website through which you provide various courses to your registered students. There are various confidential files on your website that shouldn’t be accessible to your students but only to certain people like teachers, admins, etc.

At times you would want to grant access to particular course material to specific students based on their plan/subscription. This can be achieved with our ROLE-BASED ACCESS in Prevent File Access plugin for WordPress.

Example: You have content that is specific for teachers, students, and admins. To have a proper folder architecture, you should create 3 sub-folders in \wp-content\uploads folder as \teacher, \student, \admins such that all these folders are at the same level in the hierarchy and can be accessed by only the user with the required role.

If I allow a student to access the student folder then he will be able to access all the folders/ content that are an inside the student folder but he won't be able to access other folders that are at the level of the student folder which in this case are teacher and admin folders.

Restrict Media Files in WordPress

How to Restrict WordPress Pages and Content to a specific user?

WordPress lets you assign roles to users based on the subscription they have purchased. There are various third-party plugins that allow you to assign custom roles like a student, teacher, member, and many more WordPress standard roles. Based on these roles you can use our Prevent Files plugin to grant access to content that they should and prevent access to files that they shouldn't be able to see.

Configure Role-Based Restriction

You will need an account with miniOrange which can be created here.

Follow these steps after creating an account with miniOrange to protect your WordPress content based on user role:

  • Download and Install the miniOrange Prevent Files plugin on WordPress.
  • Go to the plugin and in the WordPress Admin dashboard and login in with your miniOrange Credentials.
  • Goto Folder Restriction tab and scroll down to find Role-Based Folder Restriction. Toggle the switch to enable Role Base Restriction.

  • Restrict Media Files in WordPress

  • After enabling the Role-Based Folder Restriction, you will be able to choose the folders that you want users with the required roles to access.

  • Restrict Media Files in WordPress

  • Click Save Settings after assigning folders to Roles, and stop worrying about the confidentiality of your content.

Congratulations!! You have successfully enabled Role-based access to your WordPress content.

Recommended Plugins

WordPress Prevent files/ folders access provides the easiest way to protect your WordPress files from public users so that your media library can be accessed only by WordPress logged in users.

 Tested with 3.0.1

WordPress Login ( SSO ) with Azure AD, Azure B2C, AWS Cognito, Okta, Ping, Clever, WSO2, Onelogin, Keycloak, many OAuth & OpenID Providers [24×7 SUPPORT]

 Tested with 5.9.2

Custom Requirements

If you have any questions or if you have any other use-cases which you would like to discuss with our team of engineers please feel free to reach out at and we will revert back to you in under 24 hours to understand your detailed use-case and make the customizations according to your requirement.
Hello there!

Need Help? We are right here!

Contact miniOrange Support

Thanks for your inquiry.

If you dont hear from us within 24 hours, please feel free to send a follow up email to