Protect Paid Content on Your WordPress Site Using a Free Membership Plugin

In this post, we’re going to explore the Simple Membership plugin, which allows you to set up different kinds of memberships for your WordPress site. With this plugin, you can create free and paid memberships and restrict content access based on rules for each type of member.

If you've ever wanted to sell premium content on your WordPress website or to create rules to restrict access to certain kinds of content based on user roles, this is the article for you! I'll show you how to create different membership levels for your website that you can use for content restriction and just about anything else you can think of.

In fact, "free" and "paid" are just two broad categories that may themselves contain hierarchies of different membership levels, where each level may have a separate set of rules.

As a site owner or a seasoned WordPress developer, you already know that WordPress provides a lot of plugins for almost every feature one could think of, and it can be hard to choose which one to use. For this post, I’ve picked one of the best in the category—Simple Membership—and I'll show you how to use it throughout the course of this tutorial.

For this post, I’ve used WordPress 5.1 and Simple Membership plugin version 3.7. I recommend that you install it if you want to follow along with this post. To install the Simple Membership plugin, you need to follow the standard installation process.

In the next couple of sections, we’ll explore the basics of the Simple Membership plugin along with the setup process. Then, we’ll build a real-world example which will demonstrate use of this plugin. Meanwhile, we’ll also go through a few important aspects of this plugin that allow you to create different levels of memberships.

What Is the Simple Membership Plugin?

The Simple Membership plugin is a flexible and easy-to-use plugin which can be used to create different membership levels that can offer free and premium content. Thus, you could restrict premium content of your website to paid members. It allows you to set up unlimited membership levels according to your requirements.

Let’s have a quick look at the features it provides:

free and paid memberships

unlimited membership access levels

API support for developers

built-in member login widget

compatible with any WordPress theme

and more

As you can see, it provides a lot of useful features that you could use to build a flexible system offering different kinds of memberships. And it’s also extendable, which is an important feature, since it provides developers an opportunity to alter certain aspects and even the core behavior of the plugin.

In the next section, we’ll discuss a couple of core elements of this plugin that are important to understand if you want to use this plugin effectively.

Explore Plugin Settings

Once you install the Simple Membership plugin, it will add a link in the left sidebar. Let’s go through each section briefly.

Members

This is a member listing page which lists all the members registered by using this plugin so far. You can also create new members.

Apart from that, it also allows you to perform a few bulk operations. For example, you could bulk update the membership level of users who belong to the silver level to the gold level.

Membership Levels

This is a membership levels listing page which lists all the membership levels you’ve created so far in your website. You can add as many levels you want to add in this section. Apart from that, you can bulk protect existing categories, posts and pages in this section. We’ll get back to this later in detail.

Settings

In this section, you can configure settings that are globally applicable. You can configure different aspects of this plugin like:

general settings

payment settings

email settings

tools settings

advanced settings

Configuring proper settings in this section is critical to the workings of this plugin. I’ll go through a couple of important and must-have settings later in the post to demonstrate how to use this plugin to create and use free and paid memberships.

Payments

This section shows all the payments received so far by using this plugin.

It’s also one of the important sections of this plugin because it allows you to create payment buttons that will be used to collect payments for paid memberships. As of now, it supports creating PayPal, Stripe and Braintree payment buttons. We’ll get back to this section when we create the PayPal button for the paid membership.

So that was a brief introduction to the features provided by this plugin. In the next section, we'll build a real-world example as a demo.

Build a Real-World Example

In this section, we’ll build a real-world example to demonstrate how to use the Simple Membership plugin to create free and paid memberships on your WordPress site.

Before we proceed, make sure that you’ve installed the Simple Membership plugin in your WordPress site if you want to follow along.

Create Free and Paid Memberships

Firstly, we need to create free and paid membership levels from the back-end. So let’s go ahead and set it up.

Go ahead and access the WP Membership > Membership Levels link in the left sidebar on the back-end. That should list all the existing membership levels in your system. Click on the Add Level button to create a new membership level, and that should open the following UI.

Fill in the necessary details as shown in the above screenshot. As we’re creating a Free Membership, we’ve selected the No Expiry option in the Access Duration field. In the role drop-down box, we’ve selected the Subscriber role. With these settings, you can hit the Add New Membership Level button.

In the same way, let’s add the Premium Membership.

As you can see, everything is the same except the Access Duration setting, and we’ve set it to 1 Year so that the membership expires after a year.

Configure Settings

As we’re going to offer the free membership level on our site, we’ve got to enable it in the General Settings section. In the previous section, we’ve already created the free membership, so now we just need to configure it.

Go ahead and access the WP Membership > Settings > General Settings section. Make sure that the Enable Free Membership checkbox is checked and you’ve configured the correct Free Membership Level ID as shown in the following screenshot.

Create Premium Membership Button

As we’re offering the premium membership level in our example, we’ll have to create a payment button so that users can use that button to pay the membership fee. In our case, we’ll create a PayPal membership button.

Go ahead and access the WP Membership > Payments > Create New Button section, which will ask you to choose one of the following options.

Select the PayPal Buy Now button and click on the Next button.

Fill in the necessary details as shown in the above screenshot. In the Membership Level drop-down, select the membership level for which you want to create this button. It’ll be Premium Membership in our case.

Also, make sure to enter a valid Return URL where the user will be redirected after a successful payment. Finally, click on Save Payment Data to save the settings, and that should redirect you to the Manage Payments Button UI as shown in the following screenshot.

Note down the Button Shortcode as we’ll need it to display the payment button on the Join Us page now.

Include the Payment Button in the Join Us Page

The Simple Membership plugin already creates a few necessary pages so that membership features work smoothly. By default, it creates Registration, Member Login, Profile and Join Us pages.

Among these pages, the Join Us page is something which we would like to change. This is the page which will be displayed when a user clicks on the Join Now button. You can design this page any way you want, but for now we’ll just include the payment button that we’ve already created for the premium membership.

Go ahead and access the Pages section and edit the Join Us page. Replace the payment button placeholder text with the button shortcode which we created in the previous section.

Make the necessary changes as shown in the above screenshot and save it!

So far, we’ve made the necessary changes to set up free and premium memberships on our WordPress site. In the next section, we’ll see how it works in the front-end.

Front-End Testing the Membership Plugin

For testing purposes, we’ll create posts that can be only accessed by members, i.e. those who belong to either the free or paid membership levels.

Go ahead and create a new post in the back-end. In the edit UI, you should be able to see the section titled Simple WP Membership Protection. In that section, select Yes to protect this content. Also, select the membership level that can access this content. For this post, we’ll select the Free Membership.

Repeat the same process to create another post, with the only difference being the membership level: select the Premium Membership for that post.

Now, let’s access these posts in the front-end to see how they look.

As you can see, the content is not visible, and there’s a message which asks you to either log in or join the membership! Click on the Join Us button to get to the Join Us page.

If you want to access the content which is available under the Free Membership, you just need to register and log in, and that should do it. On the other hand, if you want to access the premium content, you need to pay the premium membership fee by clicking on the PayPal button which was created for the Premium Membership.

So that’s how it works altogether. You can create as many membership levels as you want with this plugin. Explore the other settings and have some fun with it!

Conclusion

Today, we discussed how to set up membership features by using the Simple Membership plugin in WordPress. We went through an in-depth overview of this plugin and implemented a real-world scenario for the demonstration purposes.

Feel free to share your thoughts and feedback using the feed below! I would love to hear from you if you want to share your experiences about other membership plugins that you have used on your website.

And while you're here, check out some of our other articles about WordPress membership plugins!