Domain-Based Role Assignment for WordPress
User Guide
Table of Contents
Introduction
The Domain-Based Role Assignment plugin automatically manages user roles in WordPress based on email domains. When new users register on your site, they are automatically assigned specific roles based on their email domain.
Key Features
- Automatic role assignment based on email domains
- Simple domain rule management
- Works with existing WordPress roles
- Bulk user management capabilities
- Clean, user-friendly interface
- Integration with Restrict User Access and User Role Editor
- Advanced access control capabilities
Requirements
Required Plugins
- Restrict User Access
- Version: 2.4 or higher
- Download: WordPress Plugin Repository
- Purpose: Manages content access levels and restrictions
- User Role Editor
- Version: 4.63 or higher
- Download: WordPress Plugin Repository
- Purpose: Advanced role management and capability control
Installation Order
- Install and activate User Role Editor
- Install and activate Restrict User Access
- Install and activate Domain-Based Role Assignment
System Requirements
- WordPress 5.0 or higher
- PHP 7.2 or higher
- MySQL 5.6 or higher
Getting Started
Plugin Configuration
- Install Required Plugins
- Configure User Role Editor
- Navigate to Users → User Role Editor
- Review and customize available roles
- Set up any custom roles needed for domain assignments
- Configure Restrict User Access
- Go to Access Levels → Add New
- Create necessary access levels
- Define content restrictions
- Access Domain Assignment Settings
- Navigate to Settings → Domain Role Assignment
- Begin setting up domain rules
Plugins → Add New → Search for each required plugin: - "Restrict User Access" - "User Role Editor" Install and activate both plugins
Initial Setup Checklist
- Install and activate all required plugins
- Configure User Role Editor settings
- Set up Restrict User Access levels
- Create initial domain rules
- Test with sample user registration
Integration with Required Plugins
User Role Editor Integration
Creating Custom Roles
- Navigate to Users → User Role Editor
- Click “Add New Role”
- Define role name and capabilities
- Save the new role
- The role will be available in Domain Role Assignment
Managing Capabilities
- Open User Role Editor
- Select the role to modify
- Adjust capabilities as needed
- Updates automatically reflect in domain assignments
Example Role Configuration:
Role Name: Company Editor
Based On: Editor
Additional Capabilities:
- manage_categories
- upload_files
- edit_published_posts
Restrict User Access Integration
Setting Up Access Levels
- Go to Access Levels → Add New
- Create level name and conditions
- Define content restrictions
- Associate with domain-assigned roles
Access Level Configuration
- Create new access level
- Set conditions:
- User role(s)
- Content types
- Taxonomy terms
- Define redirect rules
- Set duration/expiry if needed
Example Access Level:
Level: Premium Content
Conditions:
- Role: Company Editor
- Content: Posts, Pages
- Categories: Premium, Internal
Redirect: Login page
Linking Domains to Access Levels
- Create domain rule
- Assign appropriate role
- Configure access level for role
- Test access restrictions
Advanced Integration Features
- Role Hierarchy
- Configure in User Role Editor
- Affects domain-based assignments
- Cascading permissions structure
- Access Level Groups
- Create in Restrict User Access
- Associate with domain rules
- Manage bulk access settings
- Capability Management
- Define through User Role Editor
- Apply to domain-assigned roles
- Granular permission control
[Previous sections remain the same: Managing Domain Rules, Best Practices, Troubleshooting]
Additional FAQs
Q: How do domain rules interact with Restrict User Access levels? A: Domain rules assign roles, which can be associated with specific access levels in Restrict User Access.
Q: Can I use User Role Editor to modify domain-assigned roles? A: Yes, any changes made in User Role Editor automatically apply to users with domain-assigned roles.
Q: How do I set up tiered access based on domains? A:
- Create roles in User Role Editor
- Set up corresponding access levels
- Create domain rules assigning appropriate roles
- Configure access restrictions
Q: Can I combine multiple access levels for a single domain? A: Yes, by:
- Creating a custom role with User Role Editor
- Assigning multiple access levels to that role
- Using that role in your domain rule
Support
Plugin-Specific Support
- Domain-Based Role Assignment
- Review this documentation
- Check WordPress forums
- User Role Editor
- Restrict User Access
Troubleshooting Integration Issues
- Role Assignment Issues
- Verify User Role Editor configuration
- Check role capabilities
- Confirm domain rule settings
- Access Restriction Problems
- Review Restrict User Access settings
- Verify level assignments
- Check content restrictions
- Plugin Conflicts
- Update all plugins
- Check compatibility versions
- Verify installation order
Remember to always backup your WordPress site before making significant changes to roles, access levels, or domain rules.