1. Home
  2. Knowledge Base
  3. Content Protection
  4. Protect Files on Your Site Using WishList Member File Protection
  1. Home
  2. Knowledge Base
  3. Video Tutorials
  4. Protect Files on Your Site Using WishList Member File Protection

Protect Files on Your Site Using WishList Member File Protection

Protect Your Files Using WishList Member File Protection

WishList Member includes the ability to protect files you upload to your WordPress site. Files you add to the media section of your WordPress site can be set as protected or unprotected and you can select which membership levels can access any files you've marked as protected. This allows you to specify which members can access different protected files within your site.

The first step is enabling the Files option in the Content Protection > Files section in WishList Member. Once enabled, the files that have been uploaded using the WordPress media uploader will be displayed.

Protect Your Files Using WishList Member File Protection

Access to these files can be set as protected or unprotected (or inherited) similar to any post or page you might protect using WishList Member.

File protection can be used to prevent users who don't have the assigned membership level(s) from accessing the protected file. It is possible for a member with the correct membership level to download the file once they have logged into the site.

File Protection General Settings

You will find general settings for File Protection by clicking the blue Settings button on the top right.

Protect Your Files Using WishList Member File Protection - General Settings

The Settings popup will appear with two sections.

  • File Protection Ignore List. This is a list of file extensions WishList Member will ignore in regards to file protection. You can add file extensions or remove file extensions from this list. By default a list of image, CSS and JavaScript file extensions are ignored as these are typically necessary for WordPress themes, etc.
  • Nginx Information. The instructions that can be followed to ensure File Protection will work with Nginx servers.
Protect Your Files Using WishList Member File Protection - General Settings

Set Protection and Access for Files

There are three status options that can be assigned to a file.

  • Protected. The file is protected and can only be accessed by logged in members with the assigned membership level(s).
  • Unprotected. The file is unprotected and can be accessed by any users.
  • Inherited. The file takes on the protection status of the page or post it appears on. As an example, if the page or post the file has been added to is protected, the file will inherit that protection status.
Protect Your Files Using WishList Member File Protection - Protection Status

You can use the Select an Action dropdown to manage the protection and access settings of your files.

The following three options are available in the Select an Action dropdown:

  • Edit Content Protection Status. You can select between protected, unprotected and inherited.
  • Add Level(s) to Content. Add the membership levels that have access to the selected posts, pages or custom post types.
  • Remove Level(s) from Content. Remove the membership levels that do not have access to the selected posts, pages or custom post types.
Protect Your Files Using WishList Member File Protection - Protection Status

Select the checkbox to the left of the file(s) you want to configure and select the corresponding action you want to apply to the file(s) from the Select an Action dropdown. A popup will appear for the selected action. Adjust the setting within the popup and click the provided button to apply the action. An example is provided below for each of the three options available in the Select an Action dropdown.

Edit Content Protection Status

In this example, the checkbox to the left of the “member-level-status” file is checked and Edit Content Protection Status has been selected from the Select an Action dropdown.

Protect Your Files Using WishList Member File Protection - Edit Content Protection Status

The Edit Protection Status popup appears and the protection status dropdown can he used to set the desired protection status.

Protect Your Files Using WishList Member File Protection - Edit Content Protection Status

In this case, the Unprotected status option is selected and the Update Protection button is clicked.

Protect Your Files Using WishList Member File Protection - Edit Content Protection Status

The status of the “member-level-status” file has now been updated and shows as Unprotected.

Protect Your Files Using WishList Member File Protection - Edit Content Protection Status

Add Level(s) to Content

In this example, the checkbox to the left of the “member-level-history-01” file is checked and Add Level(s) to Content has been selected from the Select an Action dropdown.

Protect Your Files Using WishList Member File Protection - Add Levels to Content

The Add Level(s) to Content popup appears and the membership levels dropdown can he used to add levels to the file. This will result in members with the applied membership level(s) being able to access the protected file.

Protect Your Files Using WishList Member File Protection - Add Levels to Content

In this case, the Platinum and Gold levels are selected and the Add Level button is clicked.

Protect Your Files Using WishList Member File Protection - Add Levels to Content

The Platinum and Gold levels are now added to the “member-level-history-01” file.

The “member-level-history-01” file already had the Silver and Bronze levels applied so those levels were retained when the new Platinum and Gold levels were added.

Protect Your Files Using WishList Member File Protection - Add Levels to Content

Remove Level(s) from Content

In this example, the checkbox to the left of the “member-level-history-01” file is checked and Remove Level(s) from Content has been selected from the Select an Action dropdown.

Protect Your Files Using WishList Member File Protection - Remove Levels from Content

The Remove Level(s) from Content popup appears and the membership levels dropdown can he used to remove levels from the file. This will result in members with the removed membership level(s) not being able to access the protected file.

Protect Your Files Using WishList Member File Protection - Remove Levels from Content

In this case, the Silver and Bronze levels are selected and the Remove Level button is clicked.

Protect Your Files Using WishList Member File Protection - Remove Levels from Content

The Silver and Bronze levels are now removed from the “member-level-history-01” file.

The “member-level-history-01” file had the Platinum and Gold levels applied previously so those levels were retained when the Silver and Bronze levels were removed.

Protect Your Files Using WishList Member File Protection - Remove Levels from Content

Toggle File Status Using the Icons

You can quickly change the file protection status for a specific file by clicking the icon that appears to the left of that file. One click will toggle to the next status and so on.

  • Click the Unprotected icon and the status will be changed to Protected.
  • Click the Protected icon and the status will be changed to Inherited.
  • Click the Inherited icon and the status will be changed to Unprotected.

The three statuses will cycle through each option in the order mentioned above when clicked.

Protect Your Files Using WishList Member File Protection - Toggle File Status Using the Icons

WP Engine – Cache Exclude and Redirect Rule

If your site is hosted with WP Engine and you find the files are not being protected as expected, there are some adjustments WP Engine can make on their side.

You will just need to ask WP Engine to Not cache files with the following prefix in the file name:

protected-

Example: Caching should not be applied to a file named like the following (it includes the protected- prefix)

protected-integration-instructions.pdf

Please also ask WP Engine to cache exclude ^/wp-content/uploads/? and for the redirects, put in:

source: ^/wp-content/uploads/(.*)/(.*)/protected-(.*)

This should resolve potential issues with files protected on a site hosted with WP Engine.

File Protection Video Tutorial

WishList Member also includes a Folder Protection option. More details can be found in the Folder Protection Knowledge Base entry.

Was this article helpful?

Related Articles