Title: CiviCRM Member Sync
Author: Christian Wach
Published: <strong>January 19, 2015</strong>
Last modified: January 30, 2026

---

Search plugins

![](https://ps.w.org/civicrm-wp-member-sync/assets/banner-772x250.jpg?rev=1078376)

![](https://ps.w.org/civicrm-wp-member-sync/assets/icon-256x256.jpg?rev=1078376)

# CiviCRM Member Sync

 By [Christian Wach](https://profiles.wordpress.org/needle/)

[Download](https://downloads.wordpress.org/plugin/civicrm-wp-member-sync.0.6.4.zip)

 * [Details](https://wordpress.org/plugins/civicrm-wp-member-sync/#description)
 * [Reviews](https://wordpress.org/plugins/civicrm-wp-member-sync/#reviews)
 *  [Installation](https://wordpress.org/plugins/civicrm-wp-member-sync/#installation)
 * [Development](https://wordpress.org/plugins/civicrm-wp-member-sync/#developers)

 [Support](https://wordpress.org/support/plugin/civicrm-wp-member-sync/)

## Description

CiviCRM Member Sync keeps a WordPress User in sync with a CiviCRM Membership by 
granting either a Role or Capabilities to a WordPress User who has that Membership.

This enables you to have, among other things, members-only content on your website
that is only accessible to current members as defined by the Membership Types and
status rules that you set up in this plugin’s settings. CiviCRM Member Sync is compatible
with both the [Members](https://wordpress.org/plugins/members/) and [Groups](https://wordpress.org/plugins/groups/)
plugins for managing members-only content in WordPress. See the Installation section
for details.

### Requirements

This plugin requires a minimum of _WordPress 4.9_ and _CiviCRM 5.19_. It is compatible
with the [Members](https://wordpress.org/plugins/members/) and [Groups](https://wordpress.org/plugins/groups/)
plugins. Please refer to the Installation page for configuration instructions.

It is also strongly recommended that you also install [CiviCRM Admin Utilities](https://wordpress.org/plugins/civicrm-admin-utilities/)
and have version 0.6.8 or greater activated. Make sure the checkbox labelled “Check
this to fix the Contact ‘soft delete’ process” is checked so that Contacts that 
have been “soft deleted” have their corresponding WordPress User’s status updated.

### Plugin Development

This plugin is in active development. For feature requests and bug reports (or if
you’re a plugin author and want to contribute) please visit the plugin’s [GitHub repository](https://github.com/christianwach/civicrm-wp-member-sync).

### Shouts Out To…

This plugin builds on the [work](https://github.com/tadpolecc/civi_member_sync) 
done by [Tadpole Collective](https://tadpole.cc) and originally developed by [Jag Kandasamy](https://github.com/jeevajoy).
Kudos.

## Installation

 1. Extract the plugin archive
 2. Upload plugin files to your `/wp-content/plugins/` directory
 3. Make sure CiviCRM is activated and properly configured
 4. Activate the plugin through the ‘Plugins’ menu in WordPress

The first thing to decide is whether you want CiviCRM Member Sync to synchronize
CiviCRM Memberships to WordPress Roles or WordPress Capabilities. If, for example,
you need your WordPress User Roles to be independent of Membership Status, then 
choose Capabilities. The default synchronisation method is Capabilities, because
WordPress has limited support for multiple Roles.

#### Working with Capabilities

 1. Visit the plugin’s admin page at “CiviCRM” –> “Member Sync”.
 2. Select “Capabilities” as the sync method
 3. Click on “Add Association Rule” to create a rule. You will need to create a rule
    for every CiviCRM Membership Type you would like to synchronize. For every Membership
    Type, you will need to determine the CiviMember states that define the member as“
    current” thereby granting them the appropriate WordPress Capabilities. It is most
    common to define “New”, “Current” and “Grace” as current. Similarly, select which
    states represent the “expired” status thereby removing the WordPress Capabilities
    from the User. It is most common to define “Expired”, “Pending”, “Cancelled” and“
    Deceased” as the expired status.
 4. “Current Status” adds a “Membership Capability” to the WordPress User, while “Expired
    Status” removes the “Membership Capability” from the WordPress User. This Capability
    will be of the form “civimember_ID”, where “ID” is the numeric ID of the Membership
    Type. So, for Membership Type 2, the Capability will be “civimember_2”.
 5. **Note:** If you have the [Groups](https://wordpress.org/plugins/groups/) plugin
    active, then all “civimember_ID” Capabilities will be added to its custom Capabilities
    as well as to the list of Capabilities used to enforce read access on Posts. If
    you have Groups 2.8.0 or greater installed, then you will have the option to specify
    one or more “current” and “expired” Groups to which Users will be synced depending
    on whether their Membership is “current” or “expired”.
 6. **Note:** If you have the [Members](https://wordpress.org/plugins/members/) plugin
    active, then the “restrict_content” Capability will also be added.
 7. **Note:** If you have [BuddyPress](https://wordpress.org/plugins/buddypress/) active,
    then you will have the option to specify one or more “current” and “expired” Groups
    to which Users will be synced depending on whether their Membership is “current”
    or “expired”.
 8. An additional “Membership Status Capability” will also be added to the WordPress
    User that is tied to the status of their Membership. This Capability will be of
    the form “civimember_ID_NUM”, where “ID” is the numeric ID of the Membership Type
    and “NUM” is the numeric ID of the “Membership Status”. So, for Membership Type
    2 with Membership Status 4, the Capability will be “civimember_2_4”.

#### Working with Roles

 1. Visit the plugin’s admin page at “CiviCRM” –> “Member Sync”.
 2. Select “Roles” as the sync method
 3. Click on “Add Association Rule” to create a rule. You will need to create a rule
    for every CiviCRM Membership Type you would like to synchronize. For every Membership
    Type, you will need to determine the CiviMember states that define the member as“
    current” thereby granting them the appropriate WordPress Role. It is most common
    to define “New”, “Current” and “Grace” as current. Similarly, select which states
    represent the “expired” status thereby removing the WordPress Role from the User.
    It is most common to define “Expired”, “Pending”, “Cancelled” and “Deceased” as
    the expired status. With ‘roles’ as your synchronization method, also set the Role
    to be assigned if the Membership has expired in “Expiry Role”. This is not needed
    when working with Capabilities.
 4. It may sometimes be necessary to manually synchronize Users. Click on the “Manual
    Synchronize” tab on the admin page to do so. You will want to use this when you
    initially configure this plugin to synchronize your existing Users.
 5. **Note:** If you have the [Groups](https://wordpress.org/plugins/groups/) plugin
    activated and it is version 2.8.0 or greater, then you will have the option to 
    specify one or more “current” and “expired” Groups to which Users will be synced
    depending on whether their Membership is “current” or “expired”.

* **Note:** If you have [BuddyPress](https://wordpress.org/plugins/buddypress/) 
active, then you will have the option to specify one or more “current” and “expired”
Groups to which Users will be synced depending on whether their Membership is “current”
or “expired”.

#### Manual Synchronize

It may sometimes be necessary to manually synchronize Users. Click on the “Manual
Synchronize” tab on the admin page to do so. You will want to use this when you 
initially configure this plugin to synchronize your existing Users.

#### Test Test Test

**Note:** Be sure to test this plugin thoroughly before using it in a production
environment. At minimum, you should log in as a test User to ensure you have been
granted the appropriate Role or Capabilities when that User is given Membership.
Then take away the Membership for the User in their CiviCRM record, log back in 
as the test User, and make sure you no longer have that Role or those Capabilities.

#### Known Issues

Code that used the `civi_wp_member_sync_after_insert_user` hook to send User Notifications
on User Account creation should switch to the newer `civi_wp_member_sync_post_insert_user`
hook to avoid the inadvertent loss of session data.

## Reviews

![](https://secure.gravatar.com/avatar/0834bbc8f633be70e8ea506846aa93626588edb8605217aafc645e4ba02e34d7?
s=60&d=retro&r=g)

### 󠀁[Allowed me to enable member dashboards](https://wordpress.org/support/topic/allowed-me-to-enable-member-dashboards/)󠁿

 [Steven Stern (sterndata)](https://profiles.wordpress.org/sterndata/) February 
23, 2022

With this plugin setting a role based on membership status, I was able to create
a facility for members (or former members) to login and see their history, status,
and groups.

![](https://secure.gravatar.com/avatar/01fdc4c9fa10943a65bf0610338b39314a48e4afeeac135ec9db368edb3cd8fb?
s=60&d=retro&r=g)

### 󠀁[Fantastic plugin – works very well](https://wordpress.org/support/topic/fantastic-plugin-works-very-well/)󠁿

 [sjparker](https://profiles.wordpress.org/sjparker/) June 19, 2019

WordPress users would be lost without this plugin if they want a membership site
that integrates with CiviCRM.

![](https://secure.gravatar.com/avatar/9ac2cf1cdfa9f18e0f1cbdad3d967e4912f717b9633d718a4d74f82ceaf930d0?
s=60&d=retro&r=g)

### 󠀁[So great ! Great for private content !](https://wordpress.org/support/topic/so-great-great-for-private-content/)󠁿

 [tutolex](https://profiles.wordpress.org/tutolex/) June 19, 2019

I can’t believe there is only one rating. This plugin rocks so much! I would not
have been able to use civicrm without it as I needed an approval process before 
user can access private content. Thanks a lot 🙂

 [ Read all 4 reviews ](https://wordpress.org/support/plugin/civicrm-wp-member-sync/reviews/)

## Contributors & Developers

“CiviCRM Member Sync” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Christian Wach ](https://profiles.wordpress.org/needle/)
 *   [ CUNY Academic Commons ](https://profiles.wordpress.org/cuny-academic-commons/)

[Translate “CiviCRM Member Sync” into your language.](https://translate.wordpress.org/projects/wp-plugins/civicrm-wp-member-sync)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/civicrm-wp-member-sync/),
check out the [SVN repository](https://plugins.svn.wordpress.org/civicrm-wp-member-sync/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/civicrm-wp-member-sync/)
by [RSS](https://plugins.trac.wordpress.org/log/civicrm-wp-member-sync/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 0.6.3

 * Deletes BuddyPress and “Groups” group memberships when a CiviCRM Membership is
   deleted

#### 0.6.2

 * Maintenance release

#### 0.6.1

 * Provides a default Domain ID when none is passed
 * Makes sure the CAU URL is rendered when needed

#### 0.6.0

 * Fixes missing hidden inputs

#### 0.5.5

 * Apply username filter when performing dry run
 * Misc codestyle improvements

#### 0.5.4

 * Fix loading of “Add Rule” screens

#### 0.5.3

 * Fix Membership status on CAU listing screen
 * Set default for WordPress pseudo-cron to “off”

#### 0.5.2

 * Introduce actions during “rule_undo” process

#### 0.5.1

 * Introduce “From – To” functionality for Manual Sync
 * Introduce “civi_wp_member_sync_membership_deleted” action

#### 0.5

 * Introduce “Dry Run” functionality
 * Compatibility with CiviCRM Admin Utilities “Manage Users” screen

#### 0.4.7

 * Support for syncing to BuddyPress Groups
 * Fix sync for CiviCRM Memberships that do not require payment.

#### 0.4.6

 * Housekeeping release

#### 0.4.5

 * Fix validation on “Rule Add” screen

#### 0.4.4

 * Allow selection of multiple Membership Types when adding an Association Rule
 * Introduce “civi_wp_member_sync_post_insert_user” action

#### 0.4.3

 * Introduce “civi_wp_member_sync_contact_retrieved” filter
 * Fix references to CiviCRM WP Profile Sync methods

#### 0.4.2

 * Introduce “bulk create association rules” functionality
 * Ask for confirmation before deleting an Association Rule

#### 0.4.1

 * Fix sync for Contacts in Trash – fix requires CiviCRM Admin Utilities 0.6.8+

#### 0.4

 * Support access control based on “Groups” plugin Group Membership

#### 0.3.8

 * Fix fatal error when renewing and changing Membership Type

#### 0.3.7

 * Allow Manual Sync batch count to be filtered
 * Ensure usernames are unique during WordPress User creation

#### 0.3.6

 * Allow sync to be restricted to CiviCRM Contacts of Contact Type “Individual”

#### 0.3.5

 * Fix creation of WordPress User on new Membership

#### 0.3.4

 * Make order of processed Memberships explicit
 * Support renewals dureing which the Membership Type changes

#### 0.3.3

 * Pass CiviCRM Contact ID to “civi_wp_member_sync_auto_create_wp_user” filter
 * Allow limitless API queries where needed

#### 0.3.2

 * Add filter for username prior to creation of WordPress User

#### 0.3.1

 * Fix bug in PHP 7

#### 0.3

 * Support multiple Memberships per Contact
 * AJAX-driven Manual Sync admin page
 * Fix sync when Membership is renewed

#### 0.2.7

 * Disambiguate network-activated and site-activated installs
 * Fix courtesy links to settings pages

#### 0.2.6

 * Fixes scheduled sync

#### 0.2.5

 * Updates compatibility with Civi plugin

#### 0.2.4

 * Adds actions and filters at critical points

#### 0.2.3

 * Adds compatibility with Groups plugin
 * Better uninstallation cleanup

#### 0.2.2

Fixes sync all reference Props EventConsulting.

#### 0.2.1

Fixes current WordPress Role selector. Props EventConsulting.

#### 0.2

First public release

#### 0.1

Initial release

## Meta

 *  Version **0.6.4**
 *  Last updated **3 months ago**
 *  Active installations **800+**
 *  WordPress version ** 4.9 or higher **
 *  Tested up to **6.9.4**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [civicrm](https://wordpress.org/plugins/tags/civicrm/)[member](https://wordpress.org/plugins/tags/member/)
   [membership](https://wordpress.org/plugins/tags/membership/)[sync](https://wordpress.org/plugins/tags/sync/)
 *  [Advanced View](https://wordpress.org/plugins/civicrm-wp-member-sync/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  4 5-star reviews     ](https://wordpress.org/support/plugin/civicrm-wp-member-sync/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/civicrm-wp-member-sync/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/civicrm-wp-member-sync/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/civicrm-wp-member-sync/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/civicrm-wp-member-sync/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/civicrm-wp-member-sync/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/civicrm-wp-member-sync/reviews/)

## Contributors

 *   [ Christian Wach ](https://profiles.wordpress.org/needle/)
 *   [ CUNY Academic Commons ](https://profiles.wordpress.org/cuny-academic-commons/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/civicrm-wp-member-sync/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://www.paypal.me/interactivist)