Title: Resonanz Secure Downloads
Author: Resonanz Digital
Published: <strong>July 1, 2025</strong>
Last modified: November 2, 2026

---

Search plugins

![](https://ps.w.org/resonanz-secure-downloads/assets/icon-256x256.png?rev=3323416)

# Resonanz Secure Downloads

 By [Resonanz Digital](https://profiles.wordpress.org/resonanzdigital/)

[Download](https://downloads.wordpress.org/plugin/resonanz-secure-downloads.1.6.0.zip)

 * [Details](https://srd.wordpress.org/plugins/resonanz-secure-downloads/#description)
 * [Reviews](https://srd.wordpress.org/plugins/resonanz-secure-downloads/#reviews)
 * [Development](https://srd.wordpress.org/plugins/resonanz-secure-downloads/#developers)

 [Support](https://wordpress.org/support/plugin/resonanz-secure-downloads/)

## Description

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. Servers that ignore .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](https://resonanz-digital.at/), a 
web agency in Vienna building WordPress sites and custom web applications.

### Instructions

 1. Install the plugin via the WordPress plugin repository or by uploading the plugin
    files to your server.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. Go to the Media Library and select a file you want to protect.
 4. 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”.
 5. Check the box to enable protection for the file.
 6. 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.

## FAQ

### 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 `.htaccess` file.
 If the plugin is unable to write to the `.htaccess` file,
it will not be able to protect files.

### Does this plugin work with other plugins related to pages and posts?

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](https://resonanz-digital.at/kontakt/?betreff=Plugin%20Support:%20Secure%20Downloads)

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Resonanz Secure Downloads” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Resonanz Digital ](https://profiles.wordpress.org/resonanzdigital/)

[Translate “Resonanz Secure Downloads” into your language.](https://translate.wordpress.org/projects/wp-plugins/resonanz-secure-downloads)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/resonanz-secure-downloads/),
check out the [SVN repository](https://plugins.svn.wordpress.org/resonanz-secure-downloads/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/resonanz-secure-downloads/)
by [RSS](https://plugins.trac.wordpress.org/log/resonanz-secure-downloads/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.6.0

_Release Date 29th October 2026_

 * Admin screens reworked in the look of Resonanz API Sync: white cards, a page 
   header with version and links, notes as callouts, the file extensions as a grid,
   and an “Unsaved changes” hint next to the Save button.
 * Protected Files: the table sits in a card with a file count, allowed roles show
   as badges with their names, and the empty state explains the first steps.

#### 1.5.0

_Release Date 21st October 2026_

 * Security: fixed a bypass that served protected files when the URL contained “./”
   or “//”.
 * Security: fixed a bypass that served protected files directly when the URL carried
   a `resonanz_file_url` parameter. Existing .htaccess rules are rewritten automatically.
 * Security: `/secure-download/` now only serves protected file types from the Media
   Library. It no longer serves other files from the uploads folder, including folders
   other plugins lock.
 * Security: downloads are sent with `Cache-Control: private, no-store`, so CDNs
   and proxies cannot cache protected files.
 * Security: PDF preview images are no longer created while PDF is a protected file
   type, because they showed the first page publicly.
 * Security: the AJAX page link lookup now requires the manage_options capability
   and has a prefixed action name.
 * Fixed a fatal error under WP-CLI and on servers where the document root is not
   the WordPress root.
 * Fixed the first save of the settings not writing the .htaccess rules.
 * Fixed users being sent to the wrong page, or a blank page, when no redirect page
   was selected.
 * Fixed paging on the Protected Files overview failing with “Security check failed”.
 * Saved settings are now validated against the list of supported extensions.
 * The settings page warns when the server does not appear to be Apache.

#### 1.4.3

_Release Date 16th June 2026_

 * Verified that the plugin works under WordPress 7.0.

#### 1.4.2

_Release Date 17th December 2025_

 * Verified that the plugin works under WordPress 6.9.

#### 1.4.1

_Release Date 2nd December 2025_

 * Verified that the plugin works under WordPress 6.8.3.

#### 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.php` file 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 `.htaccess` 
   file 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.

## Meta

 *  Version **1.6.0**
 *  Last updated **1 week ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.0 or higher **
 *  Tested up to **7.1.4**
 *  PHP version ** 8.0 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/resonanz-secure-downloads/)
 * Tags
 * [access](https://srd.wordpress.org/plugins/tags/access/)[downloads](https://srd.wordpress.org/plugins/tags/downloads/)
   [permissions](https://srd.wordpress.org/plugins/tags/permissions/)[roles](https://srd.wordpress.org/plugins/tags/roles/)
   [secure](https://srd.wordpress.org/plugins/tags/secure/)
 *  [Advanced View](https://srd.wordpress.org/plugins/resonanz-secure-downloads/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/resonanz-secure-downloads/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/resonanz-secure-downloads/reviews/)

## Contributors

 *   [ Resonanz Digital ](https://profiles.wordpress.org/resonanzdigital/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/resonanz-secure-downloads/)