WordPress Download Manager has always been the go-to solution for managing and distributing digital files. Today, we’re excited to announce Media Protection – a powerful new feature that brings enterprise-grade security to your WordPress Media Library files.
By default, every file you upload to WordPress is publicly accessible. Anyone who knows (or guesses) the URL can download your images, PDFs, audio files, and other media – completely bypassing any access controls you’ve set up.
This creates serious problems for:
Until now, protecting these files required complex server configurations or expensive third-party solutions. Media Protection changes everything.
Media Protection integrates directly into the WordPress Media Library, allowing you to protect any uploaded file with just a few clicks. When you protect a media file, it becomes inaccessible via direct URL – all access requests are routed through WordPress, where your access rules are enforced.
For each protected file, you can configure:
We understand that every hosting environment is different. That’s why Media Protection offers five different delivery methods, each optimized for different server configurations:
The most compatible option that works on any hosting environment. Files are served through PHP, ensuring complete access control regardless of your server setup.
Best for: Shared hosting, managed WordPress hosts, or when you’re unsure about server capabilities.
Leverages Apache’s mod_rewrite to redirect protected file requests through WordPress. Offers excellent performance while maintaining full access control.
Best for: Apache servers with mod_rewrite enabled (most common setup).
Uses Apache’s mod_xsendfile for high-performance file delivery. PHP handles authentication, then hands off file delivery to Apache for maximum speed.
Best for: High-traffic sites on Apache servers with mod_xsendfile installed.
The Nginx equivalent of X-Sendfile. Provides blazing-fast file delivery with full access control through WordPress.
Best for: Nginx servers or Nginx reverse proxy setups.
The most secure option. Files are physically moved outside the web-accessible directory, making them completely inaccessible via direct URL – even if someone discovers the file path.
Best for: Highly sensitive content, financial documents, or any situation requiring maximum security.
Navigate to Downloads → Settings → Media Protection in your WordPress admin panel.
You’ll see your server information and available protection methods. The system automatically detects your server type (Apache, Nginx, LiteSpeed, etc.) and recommends the optimal method.
Select your preferred method and click Save Settings.
Open the WordPress Media Library and click on any file you want to protect. In the attachment details panel, you’ll see a new “Protect Media” button.
Click it to open the protection settings:
Click Apply Restrictions to save your settings.
Try accessing the protected file’s direct URL while logged out. Instead of seeing the file, you’ll see either:
Add this configuration to your Nginx server block:
location /__wpdm_protected {
internal;
alias /path/to/wp-content/uploads;
}
Add this to your Apache configuration or .htaccess:
<IfModule mod_xsendfile.c>
XSendFile On
XSendFilePath /path/to/wp-content/uploads
</IfModule>
The settings page provides the exact configuration snippet for your server.
For maximum security, Private Storage moves your files completely outside the web root. Here’s how it works:
The settings page shows you:
You can also Restore All Files if you ever need to disable private storage and return files to their original locations.
When a user accesses a password-protected file:
The password form is fully responsive and supports your site’s color scheme (including dark mode).
When role restrictions are in place:
Consider creating a dedicated folder in your Media Library for protected files. This makes management easier and helps you track what’s protected.
Always test your protected files after setup:
Media Protection works seamlessly with:
We’ve optimized Media Protection for minimal performance impact:
Q: Will this slow down my site?
A: For most setups, the impact is negligible. Using X-Sendfile or X-Accel-Redirect actually offloads file delivery to your web server, which is more efficient than standard WordPress downloads.
Q: Can I protect existing files?
A: Yes! You can protect any file already in your Media Library. Just click on the file and enable protection.
Q: What happens to embedded images?
A: Protected images will require authentication to view. For public-facing pages with images that should be visible, either don’t protect those images or ensure your page viewers have the required access.
Q: Can I bulk-protect files?
A: Currently, protection is applied per-file through the Media Library. Bulk protection is planned for a future update.
Q: Is this compatible with CDNs?
A: Protected files should bypass CDN caching to ensure access control is enforced. Most CDNs can be configured to exclude specific paths.
Media Protection is available now in WordPress Download Manager. Update to the latest version and start securing your media files in minutes.
Have questions or feedback? Join our support community or reach out through our contact page.
Media Protection is included in WordPress Download Manager Pro. Get your license today and take control of your digital content.