WordPress Membership

Easy to use WordPress Membership plugin

  • Documentation
  • WP eMember Plugin
  • Projects
  • Home

How to Limit Access to Video Content on a WordPress Site

In this article and the embedded video I will demonstrate how to prevent access to video content from non-paying members or members without sufficient privileges, on your WordPress site.

There are a few different ways you can limit access to your protected videos and make it only available to your members. In this tutorial I will cover an in-depth method of making videos available to your members only or a customer can buy an individual video and view that video.

You should also check out this other simple option to protect videos.

What Plugins I will Use in This Tutorial

I am going to use the following two WordPress plugins for this tutorial

  • WP eMember
  • WP eStore

These instructions will allow you to provide access to video content in two different ways, for those that are members at the appropriate membership level, and for those who purchased “pay per view” or PPV access. PPV access grants access to one or more videos depending on what was purchased, rather than the “whole lot” which is available to paying members.

Video Tutorial

Setting up the Video Display Page

In the video example you will see that I setup a page that gives visitors a view of all the video courses that are available. Regardless of whether the individual is logged in or not, or what privelegs they have, they will see a thumbnail of the video.

If the visitor is a logged in member with appropriate access, he or she will be able to click the video thumbnail, or the accompanying “Watch Now” link to gain access to the video watch page.

For those that are not logged in, or those that are logged in but aren’t at the appropriate membership level, they will see “add to cart” buttons rather than “watch now” links.

Pay Per View access is not taken into account on this page.

Below is the code, including the shortcodes that could be added to the video display page. Modify the code to adopt it for your needs.

At the top of the page in the sample showed in the video I have a welcome message that changes based on whether the visitor has access to the content or not.

[emember_protected for=2 custom_msg='No access']
If you see this text then you have access
[/emember_protected]

In the above code it checks whether the visitor is logged in and has a membership level of 2. You can determine the appropriate membership level ID to use by going to WP eMember >> Membership Level.

The custom message will accept HTML so you can ask the visitor to “login” or “join” if desired, and link them to the appropriate place. Just be sure to use single quotes to wrap around your custom message and double quotes in your HTML (or vice versa). Also, do not use square brackets in your custom message. I have also found that using more than one break tag in a row generates undesirable results.

Check the partial protection documentation to learn more on the usage of this shortcode.

The other message, the message that shows when the visitor has full access to the content, can explain how to gain access to the content. In my example, I explained to click the “watch now” link to watch the video.

Here is the code used to show either the “add to cart” button or “watch” link below the video thumbnail/description.

[emember_protected for=2 do_not_show_restricted_msg=1]

<a href="#">Watch Now</a>

[/emember_protected]

[emember_protected scope=not_logged_in_users_only]

[wp_eStore_add_to_cart id=1]

[/emember_protected]

[emember_protected not_for=2 do_not_show_restricted_msg=1]

[wp_eStore_add_to_cart id=1]

[/emember_protected]

Here we are again checking for membership level “2” and if found, it links to the video watch page for that particular video. Note: The URL for the video watch page is no secret, the plugins will work to keep the video protected even though the page is publicly accessible.

The next two bits of code may seem redundant but they are checking for two different scenarios even though the results are the same.

One block is displaying content if the visitor is “public” (i.e. not logged in) and the other is displaying content if the visitor is in fact logged in but doesn’t have sufficient privileges. Either way, we are providing an “add to cart” button which will give them access to that individual video.

Somewhere on the page we should also indicate that they can save money (assuming that is the case) if they pay for a full membership rather that buying access to videos on an individual basis. I have seen this scenario where commonly one month of access to all content is slightly less than the cost of two or three individual videos.

Setting Up the Video Watch Page

The video watch page is a public URL but has a section with protected content (the HTML that displays the video). This video HTML can be to YouTube, but in order to keep it really secure it might be best to use a solution such as Amazon.

At any rate, the video watch page checks a few different scenarios before deciding what to display to the visitor.

First off, members with proper access gain access to the video content. Secondly, non-members with pay-per-view access are allowed to view the video content as well. Everyone else sees a thumbnail and a buy button.

Below is the code to grant users who are logged in and have sufficient access (i.e. members), the ability to stream the video. In some cases (when using Amazon AWS for example) you can also provide a download link for the video from within the HTML that is displayed to visitors with sufficient privileges.

[emember_protected for=2 do_not_show_restricted_msg=1]

HTML to display and optionally download the video content

[/emember_protected]

Just like before, we are looking for membership level of 2. If the current visitor’s membership level is not 2, we do nothing. This is why “do_not_show_restricted_msg” is set to 1. This tells the shortocde not to display the default “insufficient access” message for non-privileged users.

After that (below) we have code for logged in users that aren’t at the proper membership level. If you remember, when taking into account pay per view access, this doesn’t necessarily mean that they can’t view the content. For that reason we are using the “wp_eStore_APR” shortcode to check for the cookie that shows that they paid (per view).

We are also considering non logged in users with this code. Non logged in users may very well have access to the video content as well on a pay per view basis. If not, we give them their options (login, pay for a membership, or pay for individual access).

[emember_protected not_for=2 do_not_show_restricted_msg=1]

The code in here is displayed and executed when members ARE logged in but don't have membership level access to ALL content

[wp_eStore_APR expiry=0 status=unexpired]

HTML to display and optionally download the video content.
This is displayed for those that have PPV access.

[/wp_eStore_APR]

[wp_eStore_APR expiry=0 status=expired]

This is displayed for those that DO NOT have PPV access.
It is appropriate here to include a "buy now" or "add to cart" button, or a link to get membership access.

[/wp_eStore_APR]

[/emember_protected]

[emember_protected scope=not_logged_in_users_only]

The code in here is displayed and executed when members ARE NOT logged in

[wp_eStore_APR expiry=0 status=unexpired]

HTML to display and optionally download the video content.
This is displayed for those that have PPV access.

[/wp_eStore_APR]

[wp_eStore_APR expiry=0 status=expired]

This is displayed for those that DO NOT have PPV access.
It is appropriate here to include a "buy now" or "add to cart" button, or a link to get membership access.

[/wp_eStore_APR]

[/emember_protected]

Setting up the “Product” for the Video

Now, the above code is really just the first step to getting pay per view to work.

Using eStore we now must setup a product for each video. There are a couple required fields here:

a) product name of course
b) product price naturally

…and in the Digital Content Details section:

a) Digital Product URL: this is the link to the page for the video (created above) – be sure to replace “http” with “aprtp” (or “https” with “aprtps”) in the full URL
b) Uncheck “Downloadable”

Now, when someone purchases individual access (or pay per view access) to a video, they will be given a “download” link in an email. Of course, they will not be downloading the video watch page, but visiting/viewing it instead.

Upon visiting the page, the cookie will be checked, and the individual will be able to watch the video (i.e. view the hidden PPV content, whatever it may be).

Filed Under: Additional Resources Tagged With: video membership site, video protection, WordPress membership

How to create a Video Membership Site with Complete Protection to Your Videos

With General Protection feature of WP eMember you can easily secure your videos from anonymous visitors. Here is how you do it:

  1. Create a post/page in WordPress.
  2. Embed the video on the post/page that you want to offer to the members of a particular membership level. (If you don’t know how to configure the basic membership settings using WP eMember please watch the video tutorial here).
  1. Go to WP eMember->Membership Level->Manage Content Protection section under WP Dashboard. In this section you can set which pages/posts you don’t want the anonymous visitors to see. In this case you can set protection to the post/page you just created and grant access to this post/page for a certain membership level (Detailed explanation can be found here).
  1. Now whenever any member from that particular membership level (the one you granted access to) logs in, the member will be able to view the content of the page (in this case: the video you embedded on that page). Any other anonymous visitors will be asked to log in when they stumble upon that post/page.

This will be good enough for most users but if you want to add another layer of protection for your super secret videos then continue reading.

Ultimate Video Lockdown

The key is to use Amazon S3’s private/protected file option.

To add complete protection to your videos we recommend you use the following two service/product with eMember:

  • Amazon S3 Account
  • WP Lightbox Ultimate Plugin

Amazon S3 has an option where you can make a video file private (If you are selling video content on your site then you should be using Amazon S3). Amazon S3’s private/protected video can only be retrieved by an application using a secure API so there is no way for anyone to go directly to the URL of the file and download it.

The WP Lightbox Ultimate plugin has an option that can use the secure amazon s3 API and allows you to embed private/protected Amazon S3 videos on a WordPress post or page.

The following steps will ensure the complete protection of your videos:

Step 1: Upload your videos to Amazon S3 and make the files private/protected so no one can retrieve the file without the secure API (only you know the API access keys).

Step 2: Embed the private video on your WordPress post or page using the WP Lightbox Ultimate Plugin. You can directly embed the private/protected video on the page (no lightbox) or embed it using the lightbox option (the video will play in a lightbox).

Step 3: Protect the WordPress post or Page using eMember so only members with the correct permission can see the content of the page.

The following video explains how this protected/private Amazon S3 video works with the Lightbox Ultimate plugin:

WP eMember

Another Method of Creating a Video Membership Site

Check the limiting access to video content tutorial to learn another method of offering videos to your members.

Filed Under: Design & Usage Tagged With: online course, video membership site, video protection, WordPress membership

How to Protect a Post or Page From the Editor

WP eMember allows you to protect a post or page while you are editing it. When you are editing or writing a new post simply scroll down to the “eMember Protection Options” section shown in the following screenshot and apply the protection you want (it will display all the membership levels you have configured on your site so you can easily pick which levels you want to give access to):

Protect Post or Page from the editor

Video Tutorial

Filed Under: Content Protection, Design & Usage Tagged With: membership protection, video protection, WP eMember

Get the WP eMember Plugin

Get WP eMember

Categories

  • Additional Resources
  • Content Protection
  • Design & Usage
  • eMember Addon
  • Installation
  • Integration
  • License
  • Testing
  • Uncategorized
  • Video Tutorial

Recent Comments

  • Chris Brown on API – Querying A Member Profile Using HTTP GET or POST
  • admin on API – Updating A Member Account Using HTTP GET or POST
  • Chris Brown on API – Updating A Member Account Using HTTP GET or POST
  • admin on API – Updating A Member Account Using HTTP GET or POST
  • Andrea on API – Updating A Member Account Using HTTP GET or POST

Featured WordPress Plugins

WP Express Checkout Plugin
wordpress_estore_icon
wordpress membership plugin icon
wordpress_affiliate_plugin_icon

Copyright © 2025 | WP Membership Plugin