WordPress guides

Build a WordPress membership site and manage roles and users

Build a WordPress membership site and manage roles and users

A WordPress membership site rests on three building blocks: user accounts, restricted content and, often, payments. The hard part is not installing it, it is keeping members clearly separate from the people who run the site. This guide compares the plugins that do the job, explains how to organise roles and membership levels, and lists the settings that stop a sign-up form from becoming a way in.

Three kinds of membership site, three needs

  • Community or directory (association, professional network): public profiles, open or approved registration, not necessarily any payment.
  • Paid content (courses, premium articles, resources): membership levels, recurring payments, drip access to content.
  • Client portal (documents, quotes, project tracking): accounts you create yourself, no public registration, content specific to each client.

The third case can often do without a heavy plugin: a dedicated role, protected pages and a login form are enough. The first two justify a specialised plugin.

Which plugin to choose

PluginFree versionEntry-level paid planBest forWatch out for
Ultimate MemberYes: profiles, registration, directory, restriction$276 per year (1 site)Community, directoryPublic directories: watch what data you expose
Paid Memberships ProYes: full, open source core$499 per year (1 site)Paid subscriptionsAdd-ons reserved for paid plans
MemberPressNo$399 per year, $199.50 the first yearCourses, premium contentLaunch plan: 4.9% fee per payment
WooCommerce MembershipsNo€178 per yearExisting WooCommerce storeRecurring payments: WooCommerce Subscriptions on top
UsersWPYes: login, registration, profilesPaid add-onsSimple, lightweight areaNo built-in payments

In practice: for an association that takes no payments, the free versions of Ultimate Member or UsersWP are enough. To sell subscriptions, Paid Memberships Pro lets you start for free and pay only for the add-ons you need, whereas MemberPress aims for a turnkey setup. If you already sell with WooCommerce, WooCommerce Memberships saves you a second payment gateway.

Roles, capabilities and membership levels

WordPress gives every account a role (Subscriber, Contributor, Author, Editor, Administrator), in other words a set of capabilities: read to read, edit_posts to write, manage_options to change site settings. Membership plugins add a second notion, the membership level (Free, Premium, Business), stored separately, which decides what content is visible.

Don’t mix the two up: a Premium member is still just a reader as far as WordPress is concerned. They keep the Subscriber role, or an equivalent “Member” role, with the read capability only. Giving members the Author role so they can “see more” opens up the dashboard and file uploads to them.

Create a Member role and keep members out of the dashboard

This code, to be placed in a custom plugin (mu-plugin), creates the role once, hides the toolbar from accounts that don’t write, and sends them back to their account page if they open wp-admin:

<?php
// "Member" role: read only, created once.
add_action( 'init', function () {
	if ( ! get_role( 'member' ) ) {
		add_role( 'member', 'Member', array( 'read' => true ) );
	}
} );

// No toolbar for accounts that don't write.
add_filter( 'show_admin_bar', function ( $show ) {
	return current_user_can( 'edit_posts' ) ? $show : false;
} );

// wp-admin reserved for the team (AJAX and admin-post still allowed).
add_action( 'admin_init', function () {
	if ( wp_doing_ajax() || 'admin-post.php' === $GLOBALS['pagenow'] ) {
		return;
	}
	if ( ! current_user_can( 'edit_posts' ) ) {
		wp_safe_redirect( home_url( '/my-account/' ) );
		exit;
	}
} );

For the team itself (writers, contractors, agency), apply least privilege: the method, role by role, is in our guide to WordPress roles and capabilities.

A member’s journey, from sign-up to access

A member’s journey and the security checks along the wayA visitor fills in the registration form, which is filtered against bots. They confirm their email address, receive the Member role with the read capability only, then access the content of their membership level. Team accounts go through two-factor authentication and are the only ones with access to the dashboard.Registration formanti-bot, minimal fieldsEmail confirmationaccount inactive until clicked“Member” roleread capability onlyContent for the levelFree, Premium…Team: dashboard accesstwo-factor authentication required by rolewp-admindeniedA member’s journey and the security checks along the wayA visitor fills in the registration form, which is filtered against bots. They confirm their email address, receive the Member role with the read capability only, then access the content of their membership level. Team accounts go through two-factor authentication and are the only ones with access to the dashboard.1Registration formanti-bot, minimal fields2Email confirmationaccount inactive until clicked3“Member” roleread capability onlywp-admin denied4Content for the levelFree, Premium…Team: dashboard accesstwo-factor authentication required by role

Handling registration without opening a hole

  • Default role: in Settings, General, check that “New User Default Role” is Subscriber or Member. A 2023 Ultimate Member vulnerability let people register straight in as administrators (see our analysis of CVE-2023-3460): keep the plugin up to date.
  • Bots: a trap field (honeypot), an unobtrusive anti-bot challenge (Cloudflare Turnstile, hCaptcha) and email confirmation get rid of most fake sign-ups. Approve accounts manually if the area is sensitive.
  • Data collected: ask for the minimum, explain why, set a retention period and delete inactive accounts. WordPress provides personal data export and erasure under Tools.
  • Directories and public profiles: display neither the login username nor the email address. A visible username makes attacks on the login easier (see user enumeration).

Securing the accounts that matter

A membership site multiplies accounts, and with them passwords reused from one site to the next. The risk is not a hacked member, who only sees their own content, but a hacked administrator or shop manager. So protection is set by role:

RoleTwo-factor authenticationwp-admin accessOther measures
AdministratorRequiredYesNamed accounts, few of them, activity log
Editor, shop managerRequiredYesNo plugin installation
Author, contributorRecommendedLimitedControlled file uploads
Member, subscriber, customerOptionalNoLogin limiting, strong passwords

WP Feint Pro handles exactly that: two-factor authentication required for the roles you choose (the accounts concerned are sent back to their profile until they have set it up), login attempt limiting on every login address, and the activity log, which keeps track of role changes and account creation. The free version already moves the login page and hides WordPress traces. It does not replace your membership plugin, nor an anti-spam filter for forms (see our anti-spam page).

Two-factor authentication by role, with no hassle for your members

Make it mandatory for the team, leave it optional for members. WP Feint Pro from €59 excl. VAT per year for one site, or €990 excl. VAT lifetime for unlimited sites.

Frequently asked questions

Can you create a WordPress membership area without a plugin?

For a simple client portal, yes: a dedicated role, pages protected by an is_user_logged_in() condition in the theme, and the WordPress login form. As soon as you need levels, payments or profiles, a plugin is safer than custom code.

Which role should paying members get?

Subscriber, or a “Member” role with the read capability only. The paid level is managed by the membership plugin, not by the WordPress role.

How do you block fake sign-ups?

Combine a trap field, an unobtrusive anti-bot challenge and email address confirmation. Add manual approval if the area gives access to sensitive information.

Should members be required to use two-factor authentication?

Rarely: it slows down registration for little gain. Require it for the roles that run or publish on the site, and offer it to members.

Key takeaways

  • Choose the plugin to fit the need: community, paid content or an existing store.
  • WordPress role and membership level are two different things: members stay read-only.
  • Keep members out of wp-admin and check the default role for new sign-ups.
  • Filter bots at registration and collect as little data as possible.
  • Two-factor authentication mandatory for the team, optional for members.

Sources

  • WordPress.org: Roles and Capabilities (external link, opens in a new tab)
  • WordPress Developer: add_role() (external link, opens in a new tab)
  • Paid Memberships Pro: pricing (external link, opens in a new tab)
  • MemberPress: pricing (external link, opens in a new tab)