About this plugin
This WordPress plugin allows users to mark a file in the Media Library for secure download.
If protection is toggled on, you can specify which user roles should have access to the file.
Note that the user role guest is used by this plugin to represent users who are not logged in.
This role is not a default WordPress role and created on-the-fly by the plugin.
Features
- A simple checkbox allows you to toggle protection on or off for any (non-image) file.
- When toggled on, you can specify which user roles can download the file. Admins always have access.
- If a user is not allowed to download a file, you can optionally redirect them to a different page.
- The plugin provides an overview of all protected files in a sortable table.
Important note
htaccess to allow or disallow access to the specified file(s).
htaccess file!
The plugin will also add new rewrite rules to WordPress and use the URL /secure-download/ to serve files.
htaccess, such as nginx, need equivalent rules in their own configuration. Without them, files are not protected.
Only files in the Media Library are served through /secure-download/. Other files of a protected type return a 404 for everyone except administrators.
While PDF is a protected file type, WordPress no longer creates preview images for newly uploaded PDFs. Previews of existing PDFs are not removed.
Developed and maintained by Resonanz Digital, a web agency in Vienna building WordPress sites and custom web applications.
Instructions
- Install the plugin via the WordPress plugin repository or by uploading the plugin files to your server.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- Go to the Media Library and select a file you want to protect.
- In the file’s attachment details, towards the bottom of the page, you will see a section titled “Protect this file?”, with a checkbox “Enable protection”.
- Check the box to enable protection for the file.
- Below the checkbox, you can select which user roles should have access to the file. Admins always have access.
You can manage the settings for the plugin by selecting “Resonanz Secure Downloads” in the sidebar menu.
You can select which file extensions should be protected. You can also specify a redirect page for users who are not allowed to download the file.
If a user lacks permission to download a file, they will be redirected to the specified page.
On the page “Protected Files”, you can see an overview of all files that are protected by the plugin.
This allows you to easily manage and review the files that have been marked for secure download.