Domain-Based Role Assignment for WordPress

User Guide

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

  1. Restrict User Access
  2. User Role Editor

Installation Order

  1. Install and activate User Role Editor
  2. Install and activate Restrict User Access
  3. 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

  1. Install Required Plugins
  2. Configure User Role Editor
    • Navigate to Users → User Role Editor
    • Review and customize available roles
    • Set up any custom roles needed for domain assignments
  3. Configure Restrict User Access
    • Go to Access Levels → Add New
    • Create necessary access levels
    • Define content restrictions
  4. 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

  1. Navigate to Users → User Role Editor
  2. Click “Add New Role”
  3. Define role name and capabilities
  4. Save the new role
  5. The role will be available in Domain Role Assignment

Managing Capabilities

  1. Open User Role Editor
  2. Select the role to modify
  3. Adjust capabilities as needed
  4. 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

  1. Go to Access Levels → Add New
  2. Create level name and conditions
  3. Define content restrictions
  4. Associate with domain-assigned roles

Access Level Configuration

  1. Create new access level
  2. Set conditions:
    • User role(s)
    • Content types
    • Taxonomy terms
  3. Define redirect rules
  4. 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

  1. Create domain rule
  2. Assign appropriate role
  3. Configure access level for role
  4. Test access restrictions

Advanced Integration Features

  1. Role Hierarchy
    • Configure in User Role Editor
    • Affects domain-based assignments
    • Cascading permissions structure
  2. Access Level Groups
    • Create in Restrict User Access
    • Associate with domain rules
    • Manage bulk access settings
  3. 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:

  1. Create roles in User Role Editor
  2. Set up corresponding access levels
  3. Create domain rules assigning appropriate roles
  4. Configure access restrictions

Q: Can I combine multiple access levels for a single domain? A: Yes, by:

  1. Creating a custom role with User Role Editor
  2. Assigning multiple access levels to that role
  3. Using that role in your domain rule

Support

Plugin-Specific Support

  1. Domain-Based Role Assignment
    • Review this documentation
    • Check WordPress forums
  2. User Role Editor
  3. Restrict User Access

Troubleshooting Integration Issues

  1. Role Assignment Issues
    • Verify User Role Editor configuration
    • Check role capabilities
    • Confirm domain rule settings
  2. Access Restriction Problems
    • Review Restrict User Access settings
    • Verify level assignments
    • Check content restrictions
  3. 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.

Scroll to Top