RoleArchitect Overview
Complete WordPress role and capability management system
wordpress 5.0 or higher | Tested up to WordPress 6.9 | PHP 7.0 or higher
Role Management
Create, edit, clone (PRO), and delete (PRO) custom roles with granular capability control.
Content Permissions
Manage roles' permissions to view, edit, and delete others' posts and pages from a dedicated page.
Menu Control
Hide admin menu items per role with automatic capability detection for ALL plugins.
Content Restriction
Restrict content by roles, capabilities, or login status using shortcodes or per-post settings.
Key Features
- Visual Role Editor - Manage capabilities with categorized checkboxes and search
- User Role Assignment - Assign multiple roles (PRO) to users with visual interface
- Admin Menu Restriction - Toggle visibility of menu items per role with automatic capability detection
- Dynamic Capability Detection - Automatically detects and grants required capabilities for ALL plugins
- Content Permissions Page - Manage roles' content editing permissions from a dedicated page
- Content Shortcodes - [ROAR_restrict] shortcode with role/capability (PRO) based access
- Per-Post Restriction - Set viewing permissions directly in post editor
- Page Access Control - Users cannot access unauthorized pages even with direct URLs
- Debug Tools - Built-in diagnostic tools to identify menu and capability issues
- Export/Import - Backup and restore role configurations
Installation & Setup
Get started with RoleArchitect in minutes
Install the Plugin
Upload the plugin folder to /wp-content/plugins/ or install via WordPress admin.
Activate the Plugin
Go to Plugins → Installed Plugins and activate 'RoleArchitect'.
Access the Plugin
A new 'Role Editor' menu will appear in your WordPress admin sidebar.
Verify Permissions
Only users with 'manage_options' capability (Administrators) can access the role editor features.
Role Management
Create, customize, and manage WordPress user roles
Understanding Roles & Capabilities
In WordPress, a Role is a collection of Capabilities (permissions). Each capability grants access to specific functionality. RoleArchitect provides a visual interface to manage these relationships.
| Default Role | Typical Use Case |
|---|---|
| Administrator | Full site access, can manage everything including other users |
| Editor | Can publish and manage all posts including others' |
| Author | Can publish and manage their own posts only |
| Contributor | Can write posts but cannot publish them |
| Subscriber | Can only manage their profile and view content |
Creating a New Role
Navigate to Role Management
Click 'Role Editor' → 'Role Management' in the admin menu.
Click 'Add New Role'
Click the blue 'Add New Role' button in the top right of the roles table.
Enter Role Name
Enter a descriptive name like 'Shop Manager' or 'Content Moderator'.
Select Capabilities
Use the categorized capability list. Search for specific capabilities or use 'Select All' / 'Clear All' buttons.
Save the Role
Click 'Save' to create the new role with selected capabilities.
Cloning an Existing Role (PRO)
Role cloning is useful when you want to create a role similar to an existing one with minor modifications.
- Find the role you want to clone in the roles table
- Click the clone icon (two pages) next to the edit button
- Enter a new name for the cloned role
- The new role will have all the same capabilities as the original
- Edit the new role to add or remove specific capabilities
User Role Assignment
Assign and manage roles for individual users
Assigning Roles to Users (PRO: Multiple Roles)
Unlike the default WordPress behavior (one role per user), RoleArchitect allows you to assign multiple roles to a single user.
Navigate to User Assignment
Click 'Role Editor' → 'User Assignment' in the admin menu.
Find the User
Use the search box to find a specific user, or click 'List All' to see all users.
Select the User
Click on a user in the left panel to select them. The selected user will be highlighted.
Assign Roles
Check the checkboxes for all roles you want to assign to this user. You can assign multiple roles.
Save Assignments
Click 'Assign Roles' to save the changes. The user will immediately have all selected capabilities.
Important Safety Feature
The plugin prevents you from removing your own Administrator role to avoid locking yourself out of the site. If you need to change your own role, have another Administrator do it for you.
Content Restriction
Control access to posts, pages (PRO), and custom content (PRO)
Content Restriction Methods
Individual Restriction
Edit restrictions for individual posts/pages with detailed controls via the Content Restriction page.
Bulk Restriction (PRO)
Apply restrictions to multiple posts at once via the Content Restriction admin page.
Content Restriction Modes
The Content Restriction page provides three viewing modes for controlling access to your content:
| Mode | Description |
|---|---|
| Public | Everyone can view the content (default) |
| Restricted | Only selected roles can view the content |
| Logged In (PRO) | Any logged-in user can view the content |
Using Individual Restriction:
- Go to 'Role Editor' → 'Content Restriction'
- Select content type and click 'List' to load items
- Click the edit button next to any post/page
- Select the desired viewing mode in the modal
- For 'Restricted' mode, check which roles should have access
- Optionally customize the 'Access Denied' message
- Click 'Save' to apply the restriction
Bulk Content Restriction (PRO)
The Content Restriction page allows you to manage restrictions for multiple posts at once:
- Go to 'Role Editor' → 'Content Restriction'
- Select content type (Posts or Pages)
- Click 'List' to load items
- Select items using checkboxes
- Choose bulk action mode and apply
Content Restriction Shortcodes
Use shortcodes to restrict content within posts and pages
The [ROAR_restrict] Shortcode
The [ROAR_restrict] shortcode allows you to show or hide content based on user roles, capabilities, or login status.
Usage Examples
Role-Based Restriction
Show content only to administrators:
Multiple Roles
Show content to administrators and editors:
Capability-Based (PRO)
Show content to users who can publish posts:
Custom Message
Show custom 'access denied' message:
Shortcode Parameters
| Parameter | Description | Example |
|---|---|---|
role |
Single role that can view content | role="editor" |
roles |
Comma-separated list of roles | roles="admin,editor" |
cap (PRO) |
Required capability to view | cap="manage_options" |
message |
Custom access denied message | message="Login required" |
role and roles parameters are checked against the user's roles. The cap parameter checks if the user has a specific capability. You can combine them for more precise control.
Content Permissions
Manage roles' permissions to view, edit, and delete others' posts and pages
What are Content Permissions?
Content permissions control what users can do with posts and pages created by other users. This is essential for multi-author sites where you need to control editorial workflows.
Key Capabilities
Post Permissions
edit_others_posts- Edit others' postsdelete_others_posts- Delete others' postsedit_published_posts- Edit published postsdelete_published_posts- Delete published posts
Page Permissions
edit_others_pages- Edit others' pagesdelete_others_pages- Delete others' pagesedit_published_pages- Edit published pagesdelete_published_pages- Delete published pages
Managing Content Permissions
Open Content Permissions
Click 'Role Editor' → 'Content Permissions' in the admin menu.
Select a Role
Choose the role you want to configure content permissions for.
Configure Permissions
Use the grid layout to toggle permissions for posts and pages. Each capability can be enabled or disabled independently.
Save Changes
Click 'Save Content Permissions' to apply the configuration.
Common Use Cases
| Scenario | Configuration |
|---|---|
| Content Reviewer | Enable edit_others_posts but disable delete_others_posts |
| Page Manager | Enable all page permissions, disable post permissions |
| Blog Editor | Enable all post permissions, disable page permissions |
| Limited Editor | Enable edit_published_posts only (can edit but not delete) |
Settings & Tools
Configure global settings and manage role backups
General Settings
Default Role
Set which role new users will receive when they register on your site. This is the same as the WordPress default role setting, accessible directly from the Role Editor interface.
Export & Import
Exporting Role Configuration
- Go to 'Role Editor' → 'Settings'
- Find the 'Export' section
- Click 'Download Configuration'
- A JSON file with all roles and capabilities will be downloaded
Importing Role Configuration
- Go to 'Role Editor' → 'Settings'
- Find the 'Import' section
- Paste the exported JSON data into the text area
- Click 'Import Configuration'
- All roles from the export will be restored
Reset to Defaults (Danger Zone)
The 'Reset to Defaults' button will delete all custom roles and restore WordPress default roles to their original state. This action cannot be undone.
Frequently Asked Questions
Common questions and troubleshooting tips
Can I assign multiple roles to a single user? (PRO)
Yes! Unlike default WordPress behavior, DRU Role Editor allows you to assign multiple roles to a single user. The user will have the combined capabilities of all assigned roles.
What happens if I delete a custom role? (PRO)
Users who had that role will lose it. They may lose access to the admin area if they don't have any other roles. Always ensure users have at least one role with appropriate capabilities.
Can I modify default WordPress roles?
Yes, you can add or remove capabilities from default roles (Administrator, Editor, Author, Contributor, Subscriber). However, you cannot delete these system roles.
Does hiding a menu item remove the capability?
No. Menu restriction only hides the menu item from the sidebar. Users with the appropriate capability can still access the page directly via URL. To truly restrict access, modify the role's capabilities.
Will content restriction affect SEO?
Restricted content is still visible in the HTML source (for logged-in users). For complete protection, use the per-post restriction with the 'Restricted' mode, which filters content at the template level. Search engines typically see the restriction message, not the protected content.
Can I export roles and import to another site?
Yes, use the Export/Import feature in Settings. The exported JSON file can be imported to any site with DRU Role Editor installed. This is useful for maintaining consistent role setups across multiple sites.
I locked myself out! How do I fix it?
If you accidentally removed your administrator capabilities, you can restore access by:
- Accessing your database via phpMyAdmin or similar tool
- Finding the
wp_capabilitiesoption in thewp_optionstable (for your user) - Restoring the administrator role, or using the 'Reset to Defaults' button if you have another admin account
This is why the plugin prevents you from removing your own admin role through the interface.