Descrição
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
The plugin works by (re)writing .htaccess to allow or disallow access to the specified file(s).
Please make sure that the server is configured to allow modification of the .htaccess file!
The plugin will also add new rewrite rules to WordPress and use the URL /secure-download/ to serve files.
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.
Perguntas frequentes
-
The plugin does not work, what should I do?
-
The most important thing to check is whether the server is configured to allow modification of the
.htaccessfile.
If the plugin is unable to write to the.htaccessfile, it will not be able to protect files. -
We believe that the plugin should work correctly on most WordPress websites regardless of which plugins are installed.
However, there are no guarantees. If you do encounter issues, please let us know. -
Where can I find further help?
-
If you require assistance or experience technical problem, feel free to contact us
Avaliações
Este plugin não tem avaliações.
Contribuidores e programadores
“Resonanz Secure Downloads” é software de código aberto. As seguintes pessoas contribuíram para este plugin:
ContribuidoresTraduza o “Resonanz Secure Downloads” para o seu idioma.
Interessado no desenvolvimento?
Consulte o código, consulte o repositório SVN, ou subscreva o registo de alterações por RSS.
Registo de alterações
1.4.0
Release Date 15th October 2025
- Major performance improvements: removed flush_rewrite_rules() from init hook to avoid overhead on every page load
- Implemented chunked file serving for efficient handling of large files without memory issues
- Added static caching for plugin settings to reduce database queries
- Optimized media library filter queries for better performance with multiple user roles
- Replaced filemtime() calls with plugin version constant for faster asset loading
- Enhanced path traversal security with null byte checks and realpath validation
- Added transient caching (5 minutes) for protected files overview page with automatic cache invalidation
- Optimized .htaccess updates to skip unnecessary file operations when extensions haven’t changed
- Improved cache key uniqueness using cache groups to prevent conflicts with other plugins
- Improved formatting of settings on Media detail pages and embedded modal on page edit
- Fixed duplicate code execution in file permission checking
1.3.2
Release Date 4th June 2025
- Upon plugin activation, we display a helpful notice to inform users about how to get started with the plugin.
- Added links to the plugin’s settings page and the overview of protected files in the admin menu.
- Added instructions on how to secure files on the overview of protected files when no files are protected yet.
- Make sure that the new options are properly deleted when the plugin is uninstalled.
- Improved instructions for the end user on how to use the plugin in this readme file.
1.3.1
Release Date 8th April 2025
- Made several smaller fixes to ensure the plugin complies with WordPress coding standards.
1.3.0
Release Date 11th March 2025
- Ensure that settings are properly sanitized upon saving.
1.2.3
Release Date 25th November 2024
- Rewrote the file access check to make sure it also works correctly on Linux systems.
- Enabled caching for direct database searches to improve performance of the plugin.
- Refactored the code in places to make it a little leaner.
1.2.2
Release Date 30th October 2024
- Made various improvements and fixes to ensure that the plugin conforms to WordPress coding standards.
1.2.1
Release Date 3rd September 2024
- Fixed persistent bug that would prevent files from being served correctly.
1.2.0
Release Date 26th June 2024
- Added the .htaccess rewrite rules back and merged it with the WordPress URL rewrite approach.
- Added the possibility for the user to define which file extensions should be protected.
- Added a link to the selected redirect page with AJAX so the user can quickly verify this is correct.
1.1.1
Release Date 24th June 2024
- Added a page that gives an overview of all protected files in a sortable table.
1.1.0
Release date 20th June 2024-06-20
- Downloading a file is now routed through a permalink to make it more secure: it hides the file’s URL.
- The .htaccess-based rewrite has been replaced by the WordPress URL rewrite system.
- Activating/deactivating the plugin will now flush the rewrite rules to ensure the new permalink is recognized.
- Added a settings page where a user can specify to which page a user will be redirected if blocked.
- Added an
uninstall.phpfile to clean the database when the plugin is completely removed.
1.0.5
Release Date 4th June 2024
- Fixed an issue where deactivating the plugin didn’t clean up the
.htaccessfile as intended.
1.0.4
Release Date 3rd June 2024
- Fixed an issue where the plugin wouldn’t recognize that a file was an attachment with permissions.
1.0.3
Release Date 19th March 2024
- Cleared output buffering before fetching file just to be safe.
1.0.2
Release Date 20th February 2024
- Fixed an issue where downloading a files without attachment meta data would lead to a 404 error.