2

I'm migrating my site from Drupal to WordPress, and could use some advice about how to handle syncing between CiviCRM groups (not members) and WordPress groups.

I guess the first question is: how do I deal with the leftover user IDs attached to contact records? There are a few hundred contacts that show a user ID, but those user IDs don't exist in WordPress (I'm currently the only actual user on the site):

Can I simply run a SQL query to delete all the user ID values? If so, where are they located? I haven't found them yet.

Once I've cleaned that up, I need to choose a method for syncing groups between WordPress and CCRM. It looks like CiviCRM Groups Sync is the right choice for that, am I correct?

I've been getting a little confused between CiviCRM WP Profile Sync, CiviCRM WP Member Sync, BP Groups CiviCRM Sync, and CiviCRM Groups Sync. I installed CiviCRM WP Profile Sync first, because it was easy to find and install, but I guess that only deals with Members in CiviCRM land?

1 Answer 1

5

how do I deal with the leftover user IDs attached to contact records?

Clear your civicrm_uf_match table except for your own record - i.e. the one that has your User ID and Contact ID. You'll then need to decide how and why you want to create Users from your Contacts...

  1. Do they have memberships in CiviCRM?
  2. Do they need to login for some reason?

Depending on the answer above, you have a couple of options:

  • For membership-based Users, use CiviCRM Member Sync. You can then create your Users from the plugin's "Manual Sync" admin screen.
  • For login-based Users, you can create Users one-by-one with CiviCRM's built-in "Create User Record" option in the Actions menu on the Contact View screen. Or you can use CiviCRM Profile Sync which has a "Create Users from Contacts" Bulk Action in CiviCRM that you can enable by adding define( 'CIVICRM_WP_PROFILE_SYNC_BULK', true ); to your wp-config.php file.

Wordpress groups

WordPress doesn't have groups out of the box, so you need to decide which plugin you want to use to provide them.

BuddyPress can provide them if you're after social media style discussion groups and that's what BP Groups CiviCRM Sync is for - it works in a similar fashion to the Drupal OG Groups Sync module.

The "Groups" plugin can also provide them and that's what CiviCRM Groups Sync is for - these groups are permissions-based groups and don't do anything in and of themselves but can be used to grant (or revoke) access to content.

Your choice of group type depends on your use case.

Hope that helps get you started.

6
  • Excellent, thanks - so to clarify, since I'm not using Memberships or BuddyPress, I should create WP users using CiviCRM Profile Sync, and then keep them up to date using CiviCRM Groups Sync? I'm still a little confused how those two relate to each other. Nov 24, 2023 at 23:54
  • Depends on your use case Ken :-) Why do you need Contacts to have Users? Nov 25, 2023 at 12:43
  • A set of about 70 people (within our CRM of about 3000 people) need to be able to log in to see privileged content. We're a choir, these are the choir members - they need to see names & numbers of other singers, as well as logistical stuff & things that aren't public for copyright reasons. Nov 27, 2023 at 16:25
  • @KenWilliams I'd assign them a free membership (since they are choir "members") and then use CiviCRM Member Sync to create WordPress Users. The sync can be set up such that they get assigned to groups provided by the Groups plugin for capabilities required to view restricted content. Nov 28, 2023 at 11:22
  • I've had a chance to play around with this, and I think CiviCRM memberships aren't a good fit. There's a lot of assumed workflow around memberships that doesn't fit. Is it not possible to get a similar syncing behavior with CiviCRM groups, then? Dec 4, 2023 at 4:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.