Why Role Mapping Matters
When users move between WordPress sites, their roles rarely align perfectly. A "Customer" on your store shouldn't become a "Customer" on your LMS, it should translate to a "Student" role with the correct permissions. Without role mapping, users may land with default permissions, blocking access to content they've paid for or exposing restricted areas.
Role mapping solves this by defining how roles on Site A translate to roles on Site B. For example:
- WooCommerce Customer → LearnDash Student
- MemberPress Silver Member → bbPress Premium Participant
- Corporate Manager → Project Portal Team Lead
This guide covers the most common scenarios and walks you through configuring role mapping using Nexu User Sync.
Step 1: Identify Your Role Structures
Before configuring sync, list the roles on each site. Log in to both sites and navigate to Users → All Users to see active roles. Note custom roles added by plugins like WooCommerce, LearnDash, or MemberPress.
For example:
- Site A (Store): Customer, Subscriber, Shop Manager
- Site B (LMS): Student, Instructor, Subscriber
If a role exists on one site but not the other, you'll need to map it to an equivalent or fallback role.
Step 2: Install and Activate Nexu User Sync
- Install the Nexu User Sync plugin on both sites.
- Activate the plugin and navigate to Nexu User Sync → Sync in your WordPress admin.
- Set up a connection between Site A and Site B by entering the required credentials and saving the configuration.
Each connection is independent, so you can define unique role mappings for different site pairs.
Step 3: Configure Role Mapping
- In the Sync tab, select the connection you want to configure.
- Scroll to the Role Mapping section. Here, you'll see two columns: Source Role (Site A) and Target Role (Site B).
-
Add a mapping rule for each role that needs translation. For a WooCommerce-to-LearnDash setup, you might add:
- Source Role:
customer→ Target Role:student - Source Role:
subscriber→ Target Role:subscriber
- Source Role:
Set a fallback role for unmapped users. This ensures users without a specific rule receive a default role (e.g.,
subscriber) instead of no role at all.
Step 4: Test with a Single User
Before syncing all users, test the mapping with one account:
- On Site A, create or select a test user with a role you've mapped (e.g.,
customer). - Trigger a manual sync for this user via Nexu User Sync → Users → Sync Now.
- Check Site B to confirm the user's role matches your mapping (e.g.,
student).
If the role is incorrect, review your mapping rules and fallback settings.
Step 5: Run the Bulk Sync
Once testing succeeds, sync all users:
- Navigate to Nexu User Sync → Users.
- Select all users or filter by role (e.g., only
customerroles). - Click Bulk Actions → Sync to [Site B] and confirm.
The plugin will process each user, applying your role mappings automatically.
Handling Role Changes in Real Time
Role mapping isn't just for initial syncs. When a user's role changes on Site A (e.g., upgrading from silver_member to gold_member), the update propagates to Site B instantly. This ensures permissions stay current across your network without manual intervention.
To verify real-time sync:
- On Site A, change a user's role (e.g.,
subscriber→customer). - Check Site B within a few seconds. The user's role should update to match your mapping (e.g.,
student).
Edge Cases to Consider
-
Multiple Roles: If a user has multiple roles (e.g.,
subscriber+mp_member_gold), prioritize the most specific role in your mapping rules. - Bidirectional Sync: For two-way sync, configure separate mappings for each direction (Site A → Site B and Site B → Site A).
-
Excluded Roles: Never sync
administratorroles to secondary sites. Map them to a lower-privilege role likeeditoror exclude them entirely.
Final Thoughts
Automated role mapping eliminates the guesswork in multi-site user management. With Nexu User Sync, you define the rules once and let the plugin handle the rest. Whether you're running a membership network, an LMS, or a corporate portal, consistent permissions across sites translate to fewer support tickets and a smoother user experience.
Start by mapping your most critical roles, test thoroughly, and scale as your network grows. The goal is simple: every user lands on every site with the right access, every time.
Top comments (0)