During the last few years, we received a question lots of times from users of the most popular PDF viewer for WordPress plugins, how someone can restrict a PDF file to a specific user or a group of users, or limit a particular user/role from accessing a file or file type. We understand this it is really important to have control over any files you share with your visitors. So, we started working on it and finally came up with a solution. This post is going to give you all the details about the solution. Here I will demonstrate 3 best ways to restrict WordPress PDFs to specific users/roles
On April 20, 2020, we released a new WordPress plugin “WP File Access Manager” which allows you to achieve this functionality. This plugin has a very simple, clean and easy-to-use interface for managing restrictions for each and every file uploaded to your WordPress Media Library.
There are 3 types of restrictions currently available in the plugin.
- Restrictions by Single File
- Restrictions by File Type
- Restrictions for All Uploaded Files.
I am going to leave some quick notes on each of those restriction types.
Restrictions by Single File:
This is Useful when you want to upload a file that should be available to only a particular user or a particular role or only to logged-in users.
Restrictions by File Type:
This option is helpful if you don’t want to go for every single file individually but restrict files of a specific file type. For example, as we’re talking about PDF Files, You can set up restrictions for all PDF files from this tab. What you need to do is just Go to Restrict by File Type tab, check to Require Login checkbox, select roles/users to allow/disallow and then Save Changes.
You’re all set. All PDF Files will now follow the rules you’ve just set!
Restrictions for All Uploads
This option is to set restrictions for all the files. It’s not recommended for most sites as it will apply to every file uploaded to Media Library. This is only suitable for completely private sites. This option works the same way as the other two above, Just go to this tab, select settings and save. The new settings will apply to all the files of your Media Library.
Let’s Come back On Topic:
Ok, Enough intro. Now the question is, Does it work with PDF viewer for WordPress?
The answer is Obviously Yes.
Suppose you set restrictions using WP File Access Manager and use that file on PDF viewer for WordPress. In that case, The file will only be displayed to authorized users according to what you set in WFAM (WP File Access Manager) settings. Other/unauthorized users will get errors on the PDF Viewer Screen.
How To Set it up to Work with PDF viewer for WordPress?
There’s no extra work required to have it working with PDF viewer for WordPress. It’s already optimized to work with PDF Viewer for the WordPress plugin. So, you just need to install, activate and set up the restrictions on WP File Access Manager & that’s it. Your Files will follow those restrictions on PDF Viewer as well.
The next step is to get the plugin and start taking control of your WordPress PDF Files. WP File Access Manager is available for purchase on CodeCanyon. Go Ahead and get the plugin, install it on your site and start protecting your PDF Files 😉
Download WP File Access Manager Download PDF viewer for WordPress