In this article, we will dive into the world of self-hosted videos. We will show you how you can lock down, hide, or restrict self-hosted videos from non-members. Allowing you to save your best video content for your active members.

restrict self-hosted videos

What are self-hosted videos?

Self-hosted videos are videos that are hosted by you. For a number of years, this was the method that we chose because of the control it gave us when it came to our video content. 

Essentially, we would upload our videos to a cloud web server – we used Amazon S3. We would then embed the video onto our web pages by means of a 3rd party video player plugin. For this we used the MediaElement.js plugin by John Dyer


More about Amazon S3

Costs to host your videos on Amazon S3 are going to vary depending on the file sizes of your videos and how many downloads and views they are receiving per month. A typical site that has about 10 hours of 1080p video which is served in full to 100 members per month might expect to pay $180 per month.

If you use a CDN like Amazon’s own CloudFlare, use small resolutions or bit rates when compressing your videos, or just have fewer hours of video, your prices could be lower. If you have higher quality videos, longer videos, or more members, your prices could be higher.


Why you should not host videos on your WordPress website.

You might be thinking, “Why not upload and store the videos directly onto my WordPress site? Wouldn’t that be cheaper and easier?”

While in the short term this may be the case, you’ll really have to take a look at the web host that you are currently using. Web hosts are not designed to meet the demanding needs that come with video hosting and streaming.

This is especially true if you are running an entry-level or basic package of your local web hosting provider. Hosting your videos directly on your site will undoubtedly slow your site down and cause your videos to buffer really slowly. Generally, we cannot recommend you do this especially if you are looking to host more than a couple of videos on your site.

Getting started with self-hosted videos.

As you can already see, there are a couple of things you need in order to use this method. 

  1. You need to have some budget to rent cloud storage for your videos.
  2. You need a way of connecting those hosted videos to your site. Especially if you want to display them as an embedded video on your webpage.

In a world of many video sharing platforms like YouTube or Vimeo, this method may seem unnecessary. But this method allowed us to have full control over the distribution, streaming and restriction of our videos. If you are determined to have full control over your videos (perhaps in the event that you have sensitive or confidential videos) this method might be just right for you.


How to hide self-hosted membership videos

  1. Find a cloud hosting service provider that specializes in video storage and streaming. For example: Amazon S3
  2. Use a media player to embed the videos into your webpages. Because we have a WordPress site, we found a plugin that could do this for us MediaElement.js by John Dyer.
  3. Once the video is embedded onto your WordPress Membership site you can decide on the PMPro Content Control method you would like to use to hide the video:

    a) If you want to hide the video along with the rest of your web page – Use the Paid Memberships Pro Meta Box method to require the membership level needed to access the page. Noteany embedded videos will automatically be hidden when using this method as the entire page will be restricted.

    b) If you want to hide the video while leaving the rest of the page visible – Wrap the video in our shortcode method or add it to your page via the membership block method

    c) For more technical and rather specific use cases, you can also use the pmpro_hasMembershipLevel() Function

Self-hosted videos can be restricted using the getfile method:

For more information on restricting your self-hosted videos using the getfile method, see our locking non-WordPress files and folders and locking down files with PMPro articles.


More video restriction options

For more information on locking down, and restricting videos with Paid Memberships Pro. Please see our “Restrict Videos with YouTube” and “Restrict Videos with Vimeo” articles.

Comments (2)

As always, excellent article Travis!

I want to point out another great option for secure video hosting is Vimeo.

I have found that Vimeo does a better job and at a much lower price than Amazon S3. Vimeo’s servers are optimized for streaming video.

Plus Vimeo’s $50/month Business plan includes 1T of streaming, which will certainly handle 10 hours of 1080P streaming for 100 users at a much lower cost.

Note that I am a Vimeo customer, but I am not an employee. I just want to share with my fellow PMP users.

Leave a Reply

For faster support related to issues on your specific site please open a ticket in our members support area.

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