With our Access Restriction extension, you can restrict access to your entire website and protected files by IP addresses. What’s more, you can allow certain user roles such as “Editors” and “Subscribers” to access each and every protected file.
In this article, we will walk you through the section below:
- Set individual File Access Permission (FAP)
- Set FAP of multiple files at once
- Blacklist certain IP address from accessing private links
- Restrict access to entire website by IP address
How to Set Permission for each Protected File
While you can grant access to all your protected files by user roles under Prevent Direct Access Gold settings page, this extension allows you to do so for each and every protected file.
Grant Access to Specific Roles
Step 1: Once you’ve protected your file, click on “” under “Prevent Direct Access” column on Media page.
Step 2: Switch to the “File Access Permission” tab, select “Choose Custom Roles”. Then simply pick the user roles that you want to grant access to your private file.
Another way to give permission to specific user roles is to select under Grid View or while editing content.
Please keep in mind that the “Choose custom roles” option will become “Use default setting” – getting the default setting value, once the plugin is deactivated. They won’t be reverted to the previous values even if the plugin is re-activated.
Grant Access to Specific Users
From version 1.0.5, our extension supports a new feature that allows you to whitelist specific users from access restriction. It displays right below the “user roles” section and under PDA Gold configuration popup only.
- Use default setting
- Follow the default option on our settings page
- Only available from version 126.96.36.199. In the earlier versions, this option means “no users”.
- No users
- Choose custom users
It’s useful when you want to grant access to not all but specific users belonging to that role.
Please note that:
- You can select users by searching for their specific usernames.
- In a Network, you can only search available users on that particular site, i.e. listed under its Users page, and not all users on your multisite.
- Deleted users are not automatically removed from the select option until you select a duplicate username.
- Unlike User Roles, Users option will disappear when you deactivate the extension. This means selected users won’t be able to access protected files until the extension is re-activated.
- This function only works with PDA Gold version 188.8.131.52 and above. So always update PDA Gold to the newest version and enjoy this feature.
How to Set Permission for multiple Protected Files
In case you need to set permission for multiple files simultaneously, you can do it quickly and easily by using “Assign Permission” bulk. Here is how you do it:
Step 1: Select the files which you need to set permission under Media Library List View.
Step 2: Navigate to Bulk Action field and select “Assign Permission”.
Step 3: Select which user roles you want to give permission and click “Apply”.
Please note that this setting just applies to the protected files.
How to Blacklist Access to Your Protected Files
You may want to share your protected files with certain people only. Apart from expiring the link by date and clicks, you can also restrict its access to certain IP addresses. Similarly, you can blacklist certain IP addresses from accessing your private files instead.
Step 1: Follow the first step mentioned above then click on “IP Restriction” tab instead.
Step 2: Enter IP addresses that you want to white- or blacklist
Step 3: Click “Submit” once you’re done
How to Restrict Access to Your Entire Website
Step 1: Under your WordPress admin, go to “Prevent Direct Access Gold”
Step 2: Click “IP Restriction” tab
Step 3: You can find “Restrict access to the entire website” section at the bottom of the page
Step 4: Simply enter those IP addresses that you want to access your website only. Please note that once you whitelist these IP addresses, the rest of the world won’t be able to access your website. They’ll see this message instead:
Step 5: Click “Save Changes” when you’re done.