Are you looking to limit/restrict access to certain parts of your WordPress site? In this article we’ll show you how you can restrict your site’s content based on who is logged into your website using popular WordPress plugins. In other words how to setup a membership style website with WordPress.
There are many reasons to create a membership website. They include but are not limited to,
Develop a strong community.
Increase Engagement and conversation on your website.
Restrict access to your content by member level.
I must admit there is a lot more to creating a membership website than just restricting access to your content, based on membership. But there are a great many number of websites that operate on a membership or subscription model. The Wall Street Journal is a great example of a website that operates on a subscription model. Once you subscribe to their website’s exclusive content, you’re considered a member and access is granted to premium content.
A membership website not only helps foster a sense of community among readers but it also helps you sell and monetize some or all of your content. You’ll need to decide on how much of your content you want to make exclusive to only paid members, this needs to be looked at on a case by case basis. It also depends a great deal on the industry your website specializes in.
The potential gain for your readers from the subscription needs to be financially quantifiable and significant enough to make it purchasable. People will never buy your content, if they do not think it absolutely necessary. Some hard questions you’ll need to answer,
Can I find a replica of my content or similar content for free anywhere else on the web ?
Does the potential gain for the user outweigh the costs of purchase ?
Pricing it far too high will not only result in less subscriptions but you’ll be in a lot of hot water, if you can not deliver real value to your subscribers. If you perhaps feel that you will not likely make much by introducing a subscription based membership model on your website, you can trade your content’s accessibility for social shares.
Restricting Content by Member Using Code
Before getting into various plugins that can help you restrict content on your site lets first look at some code you can use if you are a developer to check if for the current user type and restrict accordingly (since it’s very easy!). Have a look at the two snippets below which you could use for inspirationg
// Example to restrict entire pages for logged in users only
function wpex_restrict_page_to_logged_in_user() {
// Get global post
global $post;
// Prevent access to page with ID of 2 and all children of this page
$page_id = 170;
if ( is_page() && ( $post->post_parent == $page_id || is_page( $page_id ) ) ) {
// Set redirect to true by default
$redirect = true;
// If logged in do nor redirect
// You can/should place additional checks here based on user roles or user meta
if ( is_user_logged_in() ) {
$redirect = false;
}
// Redirect people witout access to homepage
if ( $redirect ) {
wp_redirect( esc_url( home_url( ‘/’ ) ), 307 );
}
}
}
add_action( ‘template_redirect’, ‘wpex_restrict_page_to_logged_in_user’ );
// Example to restrict specific content by user role
$current_user = wp_get_current_user();
$user_role = $user->roles ? $user->roles[0] : false;
if ( ‘subscriber’ == $user_role ) {
echo ‘Show something here’;
}
Ok, now that we got that out of the way, let’s look at a few plugins that help restrict access to your content.
Restrict Content Pro
Quite possibly the best plugin when it comes to restricting access to content. The reason I recommend this plugin over quite possibly more feature rich plugins is simplicity. You can choose which of your posts/pages or portions of your pages/posts are accessible to different levels of members.
When it comes to subscription levels, you can set any number of subscription levels and assign them different levels of content access. This permits you to work on range of prices for different levels of access. Once you create different subscription levels and allow for public subscription, the payment mechanism comes into play. And the plugin works with Paypal, Stripe and Braintree.
Additionally, the plugin allows for the creation of discounts and reports your earnings effectively. With regard to discounts the plugin produces a shortcode which activates the discounts, this makes it easy for other websites to share your discounts specifically speaking coupon sites.You can set a specific discount percentage and set the expiry date on the discounts as well. If you’d like, you can set a limit on the number of times the discount code can be used.
Data is a very useful asset to any business, especially a web based service or blog. You can export all data generated by the plugin via a CSV file for every member or every payment or both. Alternately, you can import the data into popular newsletter plugins like aWeber or MailChimp. The registration form is rather easy to use and very straight forward.
GET RESTRICT CONTENT PRO
PrivateContent
You can protect pretty much any type of content on your website, including pots, pages, menus and entire categories. There’s even a one click website lock down that prevents any access to content on your website.
The plugin helps organize your users and sort them with internal searches & category filters. An integrated shortcode wizard makes your job of hiding the contents a lot easier.
The restrict feature on this plugin is applicable to every part of your WordPress site including menus. You can block custom post types and taxonomies. You have a few preset templates but the custom skin builder helps with the customizability of the blocked content template.
The registration form with two layout options has been hardened to protect against spam. This plugin has be created like the Contents Restrict Pro plugin, for the primary purpose of restricting access to content on WordPress sites.
Get the PRIVATECONTENT Plugin
CM Restrict User Account Access
What to require users to register, but then automatically delete their account after a specific amount of time or uses? That’s exactly what CM Restrict User Account Access is here for! This premium plugin features options that you can use to restrict the front or back end of your WordPress site, limit access based on the number of times they access your site, automatically restrict or delete accounts after a set amount of time and more.
The plugin is also fully compatible with CM Registration and Invitation Codes as well, for more advanced user registration and management tools as well as invite codes. So you could set up an invite and members only site in no time!
GET CM Restrict User Account Access
MemberMouse
MemberMouse is a powerful membership management system for WordPress websites. This membership management system helps sell digital products, software as a service, act as a portal for an online retail store and also works well when selling subscription content.
It has been created to help you get rid time consuming non value addition processes. While it provides support automation, customer management and reporting & analytics for your business, we’re interested in its ability to protect content.
You can easily create member only areas on your website, password protect pages and other content. The plugin also accommodates the creation of trial offers, discounts and coupons. It works with 8 payment networks, which means pretty much every prospective customer is covered.
MemberMouse may be a bit pricey at $19.95/mo for their most basic plan, but it remains a great option if you want to build a dedicated membership website on the WordPress platform.
GET MEMBERMOUSE
MemberPress
MemberPress is a yet another powerful Membership Management plugin for WordPress websites. Easy to setup and get it started, MemberPress has been engineered to provide fine control over access to content based on membership level. With MemberPress, you can restrict access to pages, posts, child pages, custom posts, tags, categories and every other file or content hosted on your website.
You can create coupons and a premium forum for your community members. It is significantly cheaper than MemberMouse at $99 per year for the Business Plan.
GET MEMBERPRESS
Paid Member (Freemium)
Add paid, recurring memberships fast with Paid Member Subscriptions. This plugin includes easy options to setup your registration page, subscription plans, custom login, restricted content and more. It even integrates with WooCommerce to offer your members exclusive products or discounts.
Get Paid Member Subscriptions
Restricted Site Access (Free)
A simple plugin that limits access to your site to visitors who are logged in or are accessing site content from a specified IP address range. Visitors who lack access can be redirected to a different page including a login page or alternately you can display a message.
Download Restricted Site Access
Ultimate Member (Free)
Ultimate Member is a simple and yet effective plugin to make it possible to create an easy registration form and to build new communities online. You can create custom user roles and also engage in content restriction on a global scale and on a per post/page basis. It discriminates between three categories – logged in users, logged out users and everyone.
DOWNLOAD ULTIMATE MEMBER
I hope the article was helpful and you found a membership driven content restriction plugin that works best for your WordPress site 🙂 Please do subscribe to the WPExplorer blog for more news, tutorials and a lot more from the world of WordPress!