> ## Documentation Index
> Fetch the complete documentation index at: https://memberful.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Install the Memberful WordPress plugin

> The Memberful WordPress plugin makes it easy to integrate Memberful with your WordPress website and protect content server-side, for members only. 

The Memberful WordPress plugin connects your Memberful site to WordPress so you can protect content server-side and give members access based on their subscription status.

In this help article, we'll cover how to install the plugin, review the available WordPress settings, and configure role mapping for members.

## Install the Memberful WordPress plugin

**1. Activate the WordPress service**

From your Memberful dashboard, go to **Website** → **WordPress**, then click **Connect your WordPress site**.

![The WordPress page in the Memberful dashboard with the Connect your WordPress site button](https://mintcdn.com/memberful/HQLeGTf6MlMWYHGX/images/wordpress-plugin/setup/install-the-memberful-plugin/install-plugin-integrate.png?fit=max\&auto=format\&n=HQLeGTf6MlMWYHGX\&q=85\&s=363ead07d19dd3fb5ce74abd73fa11c5)

**2. Download the plugin (optional)**

To install the plugin from a file, click **Memberful WordPress Plugin** to download it as a .zip file. In WordPress, you can then go to **Plugins** → **Add Plugin**, click **Upload Plugin**, and choose the Memberful plugin .zip file.

**3. Copy the registration key**

Copy the WordPress registration key.

![The WordPress registration key with the Copy button](https://mintcdn.com/memberful/HQLeGTf6MlMWYHGX/images/wordpress-plugin/setup/install-the-memberful-plugin/install-plugin-registration-key.png?fit=max\&auto=format\&n=HQLeGTf6MlMWYHGX\&q=85\&s=2aad7bda9495c8abdf45253fdaeef3d1)

**4. Install the plugin**

On your WordPress site, install and activate the Memberful plugin.

**5. Connect WordPress to Memberful**

Paste your registration key into the field, then click **Connect to Memberful**.

![Connect your WordPress site in Memberful, copy the registration key, then install, activate, and connect the Memberful plugin in WordPress](https://mintcdn.com/memberful/HQLeGTf6MlMWYHGX/images/wordpress-plugin/setup/install-the-memberful-plugin/install-memberful-wp.gif?s=21bd0e5c6cfecc619562f77171ace1ce)

Once connected:

* members are signed in to WordPress when they sign in to Memberful
* members' plans sync automatically so you can [protect WordPress content](https://memberful.com/docs/wordpress-plugin/protect-content/restrict-access-to-a-single-post.md).

![Integration active](https://mintcdn.com/memberful/M_FwlsoTYDRYJ4EU/images/wordpress-plugin/setup/install-the-memberful-plugin/install-plugin-integration-active.png?fit=max\&auto=format\&n=M_FwlsoTYDRYJ4EU\&q=85\&s=ba6136f2f29d547d04059ded7f513a3b)

## Review the plugin settings

Go to **Settings → Memberful** in your WordPress dashboard to customize how the plugin works.

Options include:

* Keep all WordPress users logged in for 1 year
* Hide the WordPress admin toolbar from members
* Block WordPress dashboard access from members
* Conditionally show *Sign in, Sign out,* and *Account* menu items based on members' signed-in status
* Update display names in WordPress when members change their full name in Memberful
* Show protected content in site search
* Show a banner to members whose membership is expiring soon or has expired

![Memberful WP Plugin Settings](https://mintcdn.com/memberful/3l8BJWZF_MS-6mLE/images/wordpress-plugin/setup/install-the-memberful-plugin/memberful-wp-plugin-settings.png?fit=max\&auto=format\&n=3l8BJWZF_MS-6mLE\&q=85\&s=9a50755ed3e9e1ab2adcec380b20fec5)

Conditional menu items only work with classic WordPress menus. They are not supported in block-based WordPress since that system uses a different menu editor.

### Expiring membership banner

When enabled, members will see a banner at the top of your site notifying them that their subscription is expiring soon or has expired, with a Renew now link. You can set how many days before expiration the banner appears.

![Expiring subscription banner](https://mintcdn.com/memberful/3l8BJWZF_MS-6mLE/images/wordpress-plugin/setup/install-the-memberful-plugin/expiring-membership-banner.png?fit=max\&auto=format\&n=3l8BJWZF_MS-6mLE\&q=85\&s=6c0ebeb6a66b41bcd45a378cb9d2fdd7)

To configure the banner:

**1. Enable the banner**

Check **Show a banner to members whose membership is expiring soon or has expired**.

![Expiring subscription banner](https://mintcdn.com/memberful/3l8BJWZF_MS-6mLE/images/wordpress-plugin/setup/install-the-memberful-plugin/banner-settings.png?fit=max\&auto=format\&n=3l8BJWZF_MS-6mLE\&q=85\&s=5f3e0932f7a58a0417025f4b30e294f0)

**2. Set the timing**

In the *Show the expiry banner this many days before membership expiration* field, enter the number of days before expiration when the banner should appear.

**3. Save the setting**

Click **Save Changes**.

## Configure role mapping

The Memberful WordPress plugin assigns WordPress roles to members based on their subscription status. It keeps those roles in sync as subscriptions start, change, or end.

Role mapping works best when you use custom WordPress roles provided by other plugins.

### How role mapping works by default

By default, the Memberful WordPress plugin can assign roles using a status-based rule:

* members with any active subscription plan receive one WordPress role
* members with no active subscription plans receive a different WordPress role

To enable status-based rules, go to **Settings** → **Memberful** → **Advanced Role Mapping** in your WordPress dashboard. Assign a role for members with an active subscription and a role for members with no active subscription.

![Memberful WP Plugin Settings](https://mintcdn.com/memberful/WfivnbYP0eXvt-IT/images/wordpress-plugin/setup/install-the-memberful-plugin/advanced-role-mapping.png?fit=max\&auto=format\&n=WfivnbYP0eXvt-IT\&q=85\&s=1386e8bd61fcfcbcc43daa300d49d125)

### Enable per-plan roles

Per-plan roles let you override the default active or inactive role mapping and assign roles at the individual plan level. Disabling this setting returns your site to the default role mapping behavior.

To enable per-plan roles, go to **Settings** → **Memberful** → **Advanced Role Mapping** in your WordPress dashboard, then check *Enable Per-Plan Roles*.

Once enabled, additional role options appear for each subscription plan.

![Memberful WP Plugin Settings](https://mintcdn.com/memberful/utYiDR7dnzKVheWx/images/wordpress-plugin/setup/install-the-memberful-plugin/enable-per-plan-roles.png?fit=max\&auto=format\&n=utYiDR7dnzKVheWx\&q=85\&s=d02d474e077c5d4d11c0e19bec1d6c72)

Adding new prices to existing plans does not require updating your role mapping.

### Assign roles to individual plans

After enabling per-plan roles, you'll see a list of your Memberful plans with a WordPress role selector for each one.

For each subscription plan:

* choose the WordPress role members should receive while they have an active subscription to that plan
* optionally select **No specific role (use default)** to fall back to the default active role mapping

Members with no active subscription receive the role configured for *No active subscription plan*.

![Memberful WP Plugin Settings](https://mintcdn.com/memberful/utYiDR7dnzKVheWx/images/wordpress-plugin/setup/install-the-memberful-plugin/assign-role-per-plan.png?fit=max\&auto=format\&n=utYiDR7dnzKVheWx\&q=85\&s=d27108391fea5b43c906577accb18849)

### Roles for members with an All Access Pass

Members with an [All Access Pass](https://memberful.com/docs/member-management/payments-and-access/give-free-access.md#comp-access-to-all-plans-and-downloads) count as active on every plan, but these members will receive only one role in WordPress. The plugin gives them the role with the highest WordPress level, such as `level_3` over `level_1`.

If the roles share a level or don't have one, All Access Pass members may receive an unintended role. To choose which role will win, give each role a different level with a role editor plugin. Then click **Save Changes** under **Settings** → **Memberful** → **Advanced Role Mapping** to update existing members.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.