Formidable Forms

Formidable Forms

  • Features
  • Pricing
  • Resources
    • Docs & Support
    • Blog
    • Community
  • Solutions
    • Web Applications
    • Calculators
    • Surveys
    • Directories
    • Payments
    • Contact forms
  • Login
  • Get Formidable Forms

Ryan Cordoni / Last Updated August 18, 2022

4 Ways to Protect WordPress Media Files

Looking for the best way to protect WordPress media files? We’ll show you how to protect media files with WordPress features & plugins!

4 Ways to Protect WordPress Media Files

Approximate read-time: 5 minutes

Looking for ways to protect WordPress media files? We’ll show you how to protect media files with WordPress features & plugins!

File sharing is one of the best ways to grow a business or expand an online audience. But sometimes you don’t want to share all your files with everyone. This is where you need to use WordPress to protect media files from being shared in ways you don’t want.

Maybe you have gated content that is for paid users or members? Maybe you want to use WordPress to password protect media files on your site? Well, today we are going to show you 4 ways to protect file access on your WordPress site.

Formidable Forms is the best WordPress Form Builder plugin. Get it for free!

The good news? You’ll just need one plugin to do it all: a WordPress form builder called Formidable Forms. Using these methods, you can use WordPress to protect PDF files & more. Actually, you can protect uploaded PDF documents, audio files, images - anything in your media library!

You can even convert these to a PDF if you want another record of your files using our PDF add-on!

How does Formidable Forms protect your files?

Protect WordPress media files with Formidable Forms

Before we show you a few ways to protect your files using WordPress, we want to tell you a bit about how file protection works in Formidable Forms. Although we’ve always been big on file protection, our September 2020 update has taken things to the next level!

Prior to this update, Formidable had an option to protect your files already, but it only worked for users running WordPress on an Apache server. That would cover most WordPress websites, but left out those sites using NGINX servers, which includes WPEngine sites for example.

Besides adding NGINX support, this update enhances file protection by locking direct file access to everyone (by creating URLs that aren’t guessable). It also adds an option to add role restrictions so a file can only be downloaded by specific user roles.

Formidable Forms also prevents files from being indexed by Google (and other search engines). This means your files will never appear in any web search.

Now that we’ve got that out of the way, we’re going to show you four different ways to use WordPress & Formidable to protect your media files.

1. Use WordPress to password protect files

Did you know you can password protect media files in WordPress without any extra plugins? This method is really simple, but it won’t prevent anyone from simply sharing the URL of the file you want to share.

Wordpress password protect media files

Still, this is a very quick way to restrict access to a post or page contains a link to the files you want to protect. Here’s how it works:

  1. Create a new WordPress post or page
  2. Copy and paste a link from your media uploads directory
  3. Edit the page or post Visibility to Password protected
  4. Choose a password and update

That’s it! Now users can simply enter the password to access the page & files.

Since this will just be a direct link to your wp-content/uploads directory, it won’t be very secure. If somebody can guess the password to the page, or if somebody shares the link, your files could be at risk.

2. Use WordPress to protect files based on user roles

Another way to use WordPress to restrict access to media files? Only allow certain user roles to access them. This can be useful in a variety of ways:

For example, you could only allow administrator roles to view all uploaded media files. You could also prevent users from viewing/editing their own file uploads. The most simple option would be to prevent direct access to everyone except logged in users.

limit form visibility based on user roles

By default, WordPress has the following user roles: Administrator, Editor, Author, Contributor, and Subscriber. Of course, restricting file access based on user roles is kind of tricky unless you have a plugin like Formidable Forms to help!

Not only can you choose which users can access which files, but Formidable also includes an advanced user registration add-on to make the WordPress user system much more dynamic.

3. Restrict content for members only

Of course, you can take the previous concept to the next level by using a WordPress membership plugin (like MemberPress for example). If you’re not sure about using one of those, check out our article on the topic: How to Know When You Need a Membership Plugin.

protect WordPress media files with plugins like memberpress

A membership plugin will allow you to protect pages, posts, individual files, and more, based on a user’s membership level. The only downside is that membership plugins are often expensive. Usually, you’d only use one if you are running a dedicated membership website.

4. Create a form to protect WordPress files

With Formidable, you can create a form to and upload your files with our file upload field. Then you can use WordPress to prevent direct access to uploads with the “protect all files” feature in Formidable.

Simply put, every file you upload with this form will be virtually invisible to all users, members of search engines (unless you choose otherwise).

And if you want to provide the most secure access to these protected files, a download button won’t cut it. But the guide to require email to download protected files will help. It shows how to check if a user has access to the files.

Protect File Upload - Workflow

Why use a dedicated file protection plugins for WordPress when you could use Formidable Forms?

Finally, you can protect content by requiring a form submission before viewing. We call this the show page content feature. You can mark the page as Private, making it inaccessible to users, but the content from that page can still be used in the success message. So you would just need to put your files there for another layer of protection!

protect files with Show Page Content

Wrapping up

If you want to use WordPress for private media file management, we hope this article has left you inspired! For more tips on file uploads & WordPress, stay tuned to the Formidable blog. Until next time, have a great day!

Read more of our file upload posts

  • How to Set Up a Google Drive File Upload Form How to Set Up a Google Drive File Upload Form in WordPress
    Read More
    How to Upload Files to Dropbox from Your WordPress Forms How to Upload Files to Dropbox from Your WordPress Forms
    Read More
    Best WordPress file upload plugins 7 Best Multi-Purpose WordPress File Upload Plugins
    Read More

If you haven’t tried Formidable Forms, our users love it for its range of features. It’s much more than just a drag and drop form builder. See for yourself - try one of our premium plans risk-free for 14 days with our 100% money-back guarantee!

Using WordPress and want to get Formidable Forms for free?

Get Formidable Forms Lite Now

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

Comments

  1. Abdullah says

    November 19, 2020 at 8:27 am

    Thanks for sharing the benefits of Formidable form.
    Yes, it would be much helpful to get all this functionality instead of using extra plugins on a website. Nice & attractive feature. Much beneficial. +1
    This is available in PRO version only or available in the FREE version too?

    Reply
    • Steve Wells says

      November 19, 2020 at 11:03 am

      File upload fields are available in all premium versions of the plugin, Basic through Elite.

      Reply
  2. horo says

    April 15, 2021 at 9:10 pm

    is it possible to protect the media files but not require an email, but just have a download button instead?

    pretty much to use the plugin to protect the direct access to the file, but not require any forms filled out to access it?

    Reply
    • srwells says

      April 20, 2021 at 9:42 pm

      Hi Horo,

      Thanks for your question. I'm not sure I understand you 100%, but this sounds like something Formidable Forms could handle. If you would like to create a new support ticket with more information so our support team can confirm, that would be great!

      Reply
  3. Abby Buzon says

    November 15, 2021 at 8:28 am

    Hi Wells fam,
    I just discovered that Google indexed all of my clients' PDFs, "Indexed, not submitted in sitemap". While that's not an issue right now, I could see that being an issue.
    Your article stated "Formidable Forms also prevents files from being indexed by Google". How does it do this? I assume it's only if a file is uploaded to the site through a Formidable form?
    I thought there would be an option in Yoast, but apparently if there was an option for Media Library files it was removed in an update.

    Reply
    • srwells says

      November 15, 2021 at 12:09 pm

      Hi Abby,

      Please take a look at the file protection section here: https://formidableforms.com/knowledgebase/file-upload/#kb-file-protection

      If you have additional questions, please create a ticket for our support team so we can help you with this.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Get Email Updates

Popular Resources

    • How to Create a Searchable Database on a WordPress Site
    • Create a WordPress Custom Calculator: Easy, Powerful Results
    • How to Create a Fitness Tracker in WordPress
    • Formidable Views: The Best WordPress Custom Application Plugin
    • How To Require Email To Download Files in WordPress
    • How to Create Conditional Drop Down Lists in WordPress Forms
    • Best Gravity Forms Alternative for WordPress: Formidable Forms vs. Gravity Forms
    • How to Make a Quiz in WordPress
    • WPForms Alternative: Formidable Forms vs. WPForms Compared

Take on bigger projects Right Now

Get the tools you need to revolutionize your workflow and architect a masterpiece. Build the most advanced WordPress forms and actually use the data you collect in meaningful ways.

Get the most advanced WordPress form plugin and the only form builder with integrated Views.

Get Formidable Forms Now

Resources

  • Community
  • Affiliates
  • Contact
  • Free Online Form Builder

Top Features

  • Application Builder
  • Calculator Forms
  • Surveys & Polls
  • Quiz Maker
  • Form Templates
  • Application Templates
  • Directories
  • Donation Plugin

Company

  • About Us
  • Giving Back
  • Careers
  • Newsletter
  • WP Tasty
  • Nutrifox

Copyright © 2023 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.
Privacy Policy | Terms of Service | Sitemap

Join 300,000+ using Formidable Forms to create form-focused solutions fast. Get Started See User Reviews