WordPress Role Manager Plugin is the ultimate solution for managing user roles and capabilities on your WordPress site without any coding. With this plugin, you can create custom roles, edit existing ones, and delete unused roles—all from an intuitive admin interface. Whether you’re running a blog, membership site, LMS, or WooCommerce store, this plugin gives you total control over who can access what.
In this article, we’ll explore the features, benefits, and how to use the WP Advanced Role Manager Plugin by Web Techiq.
Table of Contents
✅ What is WP Advanced Role Manager?
The WP Advanced Role Manager plugin is a lightweight, powerful, and user-friendly WordPress Role Manager Plugin developed by MH Badhon Ahmed from Web Techiq. It gives site owners the flexibility to manage roles and permissions directly from the WordPress dashboard.
This plugin is perfect for:
Website owners who want to define custom access levels.
Developers who want to manage user roles without complex code.
Teams that require role-based access control for various departments.
🔍 Why Use a WordPress Role Manager Plugin?
Using a WordPress Role Manager Plugin allows you to fine-tune user access and secure your site. By default, WordPress provides standard roles like Administrator, Editor, Author, Contributor, and Subscriber. But what if you need more?
Here’s why you need this plugin:
Customize capabilities for each role.
Restrict or allow access to specific sections of your site.
Improve security by limiting admin rights.
Control content editing and publishing permissions.
🚀 Key Features of WP Advanced Role Manager
Simple Admin Interface
Access the plugin viaUsers → Role Manager
. It blends seamlessly with your WordPress dashboard.Create Custom Roles
Define new roles and assign the exact capabilities your users need.Edit Existing Roles
Change the role name or adjust permissions with just a few clicks.Delete Unnecessary Roles
Keep your site clean and secure by removing roles you no longer need.No Coding Needed
Manage everything visually, ideal for beginners and professionals alike.Lightweight & Secure
Optimized for performance and built following WordPress best practices.
🔧 How to Use WP Advanced Role Manager
Using this WordPress Role Manager Plugin is easy and takes just a few steps:
Install WPCode Lite
After install WP Code plugin go to plugin option and select→
add snippet→
Add Custom Code→
Select PHP Snippet→
Add Title→
Past the code→
Active code and the→
Save snippet.Access Role Manager
Navigate toUsers → Role Manager
.Create or Edit Roles
Add a new role or modify existing ones by selecting capabilities.Save Your Settings
Your roles are now ready to be assigned to users.
WP Advanced Role Manager Code Snippet
/**
* Complete WordPress Role Manager with Create, Edit, Delete + About Tab
* Appears under Users → Role Manager
* Author: Web Techiq
* Author URL: https://webtechiq.com
* Developed By: MH Badhon Ahmed
* Version: 1.0
*/
class WP_Advanced_Role_Manager {
public static function init() {
add_action('admin_menu', [__CLASS__, 'add_admin_page']);
add_action('admin_init', [__CLASS__, 'handle_actions']);
}
public static function add_admin_page() {
add_submenu_page(
'users.php',
'Role Manager',
'Role Manager',
'manage_options',
'role-manager',
[__CLASS__, 'render_admin_page']
);
}
public static function handle_actions() {
if (!isset($_POST['role_manager_action']) || !current_user_can('manage_options')) {
return;
}
check_admin_referer('role_manager_nonce');
$role_slug = sanitize_key($_POST['role_slug'] ?? '');
$role_name = sanitize_text_field($_POST['role_name'] ?? '');
switch ($_POST['role_manager_action']) {
case 'create_role':
if ($role_slug && $role_name) {
self::create_role($role_slug, $role_name);
add_settings_error('role_manager_messages', 'role_manager_message', 'Role created successfully', 'success');
}
break;
case 'update_role':
if ($role_slug) {
$capabilities = $_POST['capabilities'] ?? [];
self::update_role($role_slug, $role_name, $capabilities);
add_settings_error('role_manager_messages', 'role_manager_message', 'Role updated successfully', 'success');
}
break;
case 'delete_role':
if ($role_slug) {
self::delete_role($role_slug);
add_settings_error('role_manager_messages', 'role_manager_message', 'Role deleted successfully', 'success');
}
break;
}
}
private static function create_role($slug, $name) {
if (!get_role($slug)) {
add_role($slug, $name, [
'read' => true
]);
}
}
private static function update_role($slug, $name, $capabilities) {
$role = get_role($slug);
if (!$role) return;
global $wp_roles;
if ($wp_roles->roles[$slug]['name'] !== $name) {
$wp_roles->roles[$slug]['name'] = $name;
$wp_roles->role_names[$slug] = $name;
}
foreach ($role->capabilities as $cap => $grant) {
$role->remove_cap($cap);
}
foreach ($capabilities as $cap => $value) {
if ($value === '1') {
$role->add_cap($cap);
}
}
}
private static function delete_role($slug) {
if (get_role($slug) && !in_array($slug, ['administrator', 'editor', 'author', 'contributor', 'subscriber'])) {
remove_role($slug);
}
}
public static function render_admin_page() {
if (!current_user_can('manage_options')) return;
settings_errors('role_manager_messages');
global $wp_roles;
$all_capabilities = self::get_all_capabilities();
$current_tab = $_GET['tab'] ?? 'list';
$role_to_edit = $_GET['edit_role'] ?? '';
?>
<div class="wrap">
<h1><?php echo esc_html(get_admin_page_title()); ?></h1>
<nav class="nav-tab-wrapper">
<a href="?page=role-manager&tab=list" class="nav-tab <?php echo $current_tab === 'list' ? 'nav-tab-active' : ''; ?>">All Roles</a>
<a href="?page=role-manager&tab=add_new" class="nav-tab <?php echo $current_tab === 'add_new' ? 'nav-tab-active' : ''; ?>">Add New</a>
<a href="?page=role-manager&tab=about" class="nav-tab <?php echo $current_tab === 'about' ? 'nav-tab-active' : ''; ?>">About</a>
<?php if ($role_to_edit) : ?>
<span class="nav-tab nav-tab-active">Editing: <?php echo esc_html($wp_roles->roles[$role_to_edit]['name']); ?></span>
<?php endif; ?>
</nav>
<?php if ($current_tab === 'about') : ?>
<div class="card" style="max-width: 600px;">
<h2>About Role Manager</h2>
<div style="padding: 20px; line-height: 1.6;">
<h3>Plugin Information</h3>
<p><strong>Version:</strong> 1.0</p>
<p><strong>Author:</strong> <a href="https://webtechiq.com" target="_blank" rel="noopener noreferrer">Web Techiq</a></p>
<p><strong>Developed By:</strong> MH Badhon Ahmed</p>
<h3 style="margin-top: 20px;">Features</h3>
<ul style="list-style-type: disc; padding-left: 20px;">
<li>Create custom user roles</li>
<li>Edit existing roles and capabilities</li>
<li>Delete unnecessary roles</li>
<li>User-friendly interface</li>
<li>Secure role management</li>
</ul>
<div style="margin-top: 30px; padding: 15px; background-color: #f8f9fa; border-left: 4px solid #2271b1;">
<p>Thank you for using this plugin! For support or feature requests, please contact the author.</p>
</div>
</div>
</div>
<?php elseif ($current_tab === 'add_new') : ?>
<div class="card">
<h2>Create New Role</h2>
<form method="post">
<?php wp_nonce_field('role_manager_nonce'); ?>
<table class="form-table">
<tr>
<th scope="row"><label for="role_name">Role Display Name</label></th>
<td><input type="text" name="role_name" id="role_name" class="regular-text" required></td>
</tr>
<tr>
<th scope="row"><label for="role_slug">Role Slug</label></th>
<td>
<input type="text" name="role_slug" id="role_slug" class="regular-text" required>
<p class="description">Lowercase letters, numbers and underscores only</p>
</td>
</tr>
</table>
<input type="hidden" name="role_manager_action" value="create_role">
<?php submit_button('Create Role'); ?>
</form>
</div>
<?php elseif ($role_to_edit) : ?>
<div class="card">
<h2>Edit Role: <?php echo esc_html($wp_roles->roles[$role_to_edit]['name']); ?></h2>
<form method="post">
<?php wp_nonce_field('role_manager_nonce'); ?>
<table class="form-table">
<tr>
<th scope="row"><label for="role_name">Role Display Name</label></th>
<td>
<input type="text" name="role_name" id="role_name" class="regular-text"
value="<?php echo esc_attr($wp_roles->roles[$role_to_edit]['name']); ?>" required>
</td>
</tr>
</table>
<h3>Capabilities</h3>
<div style="max-height: 500px; overflow-y: scroll; border: 1px solid #ddd; padding: 10px;">
<table class="widefat fixed striped">
<?php
$role_caps = $wp_roles->roles[$role_to_edit]['capabilities'];
foreach ($all_capabilities as $cap_group => $caps) : ?>
<thead>
<tr>
<th colspan="2"><strong><?php echo esc_html($cap_group); ?></strong></th>
</tr>
</thead>
<tbody>
<?php foreach ($caps as $cap => $label) : ?>
<tr>
<td style="width: 30px;">
<input type="checkbox" name="capabilities[<?php echo esc_attr($cap); ?>]"
value="1" <?php checked(isset($role_caps[$cap]) && $role_caps[$cap]); ?>>
</td>
<td>
<label><?php echo esc_html($label); ?></label>
<code style="display: block; color: #666; font-size: 0.9em;"><?php echo esc_html($cap); ?></code>
</td>
</tr>
<?php endforeach; ?>
</tbody>
<?php endforeach; ?>
</table>
</div>
<input type="hidden" name="role_slug" value="<?php echo esc_attr($role_to_edit); ?>">
<input type="hidden" name="role_manager_action" value="update_role">
<?php submit_button('Update Role'); ?>
</form>
</div>
<?php else : ?>
<div class="card">
<h2>Existing Roles</h2>
<table class="wp-list-table widefat fixed striped">
<thead>
<tr>
<th>Role Name</th>
<th>Slug</th>
<th>Users</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
$user_counts = count_users();
foreach ($wp_roles->roles as $slug => $details) :
$user_count = $user_counts['avail_roles'][$slug] ?? 0;
?>
<tr>
<td><?php echo esc_html($details['name']); ?></td>
<td><?php echo esc_html($slug); ?></td>
<td><?php echo number_format_i18n($user_count); ?></td>
<td>
<a href="?page=role-manager&edit_role=<?php echo esc_attr($slug); ?>" class="button">Edit</a>
<?php if (!in_array($slug, ['administrator', 'editor', 'author', 'contributor', 'subscriber'])) : ?>
<form method="post" style="display: inline-block;">
<?php wp_nonce_field('role_manager_nonce'); ?>
<input type="hidden" name="role_slug" value="<?php echo esc_attr($slug); ?>">
<input type="hidden" name="role_manager_action" value="delete_role">
<?php submit_button('Delete', 'delete small', 'submit', false, [
'onclick' => "return confirm('Are you sure you want to delete this role?');"
]); ?>
</form>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php endif; ?>
</div>
<?php
}
private static function get_all_capabilities() {
return [
'General' => [
'read' => 'Read',
'edit_posts' => 'Edit Posts',
'upload_files' => 'Upload Files',
'level_0' => 'Level 0',
'level_1' => 'Level 1',
'level_2' => 'Level 2',
'level_3' => 'Level 3',
'level_4' => 'Level 4',
'level_5' => 'Level 5',
'level_6' => 'Level 6',
'level_7' => 'Level 7',
'level_8' => 'Level 8',
'level_9' => 'Level 9',
'level_10' => 'Level 10'
],
'Posts' => [
'publish_posts' => 'Publish Posts',
'edit_others_posts' => 'Edit Others Posts',
'delete_posts' => 'Delete Posts',
'delete_others_posts' => 'Delete Others Posts',
'delete_published_posts' => 'Delete Published Posts',
'edit_published_posts' => 'Edit Published Posts'
],
'Pages' => [
'edit_pages' => 'Edit Pages',
'publish_pages' => 'Publish Pages',
'delete_pages' => 'Delete Pages',
'delete_others_pages' => 'Delete Others Pages',
'delete_published_pages' => 'Delete Published Pages',
'edit_others_pages' => 'Edit Others Pages',
'edit_published_pages' => 'Edit Published Pages'
],
'Administration' => [
'manage_options' => 'Manage Options',
'moderate_comments' => 'Moderate Comments',
'manage_categories' => 'Manage Categories',
'manage_links' => 'Manage Links',
'edit_theme_options' => 'Edit Theme Options',
'install_plugins' => 'Install Plugins',
'activate_plugins' => 'Activate Plugins',
'edit_plugins' => 'Edit Plugins',
'install_themes' => 'Install Themes',
'edit_themes' => 'Edit Themes',
'switch_themes' => 'Switch Themes',
'edit_users' => 'Edit Users',
'create_users' => 'Create Users',
'delete_users' => 'Delete Users',
'promote_users' => 'Promote Users',
'list_users' => 'List Users',
'remove_users' => 'Remove Users'
]
];
}
}
WP_Advanced_Role_Manager::init();
🧑💻 About the Developer
This plugin is created by MH Badhon Ahmed, a skilled developer from Web Techiq, a leading WordPress development company known for building custom plugins and themes. Learn more at https://webtechiq.com.
📌 Final Thoughts
A good WordPress Role Manager Plugin is essential for managing user permissions and enhancing site security. The WP Advanced Role Manager plugin offers exactly that with an easy-to-use interface, powerful features, and zero bloat.
Whether you’re a beginner or an experienced developer, this plugin will save you time and simplify role management on your WordPress website.
🔗 Resources
🌐 Developer: Web Techiq
📧 Contact: support@webtechiq.com
💬 Need Help? Leave a comment or reach out via our contact page.
Frequently Asked Questions (FAQ)
A WordPress Role Manager Plugin is a tool that allows website owners to create, edit, and manage user roles and capabilities without writing any code. It gives full control over who can access and perform specific actions on your website.
Using a WordPress Role Manager Plugin enhances security and flexibility. It ensures users only have access to features they need, preventing unauthorized changes and improving workflow management.
Yes, most WordPress Role Manager Plugins allow you to create unlimited custom roles. You can assign unique permissions based on your team’s needs or specific user requirements.
Absolutely. A WordPress Role Manager Plugin is ideal for multi-author blogs, membership sites, and organizations where different users need different levels of access.
Yes, most well-coded WordPress Role Manager Plugins are compatible with popular plugins like WooCommerce, Elementor, and membership plugins, ensuring seamless integration and functionality.
More Article May Be You Like
- What Is the Best WordPress Hosting Site? A Comprehensive Guide for 2024
- 5 Essential Tips for WordPress Designers to Elevate Your Projects
- How Crucial is Responsive Design in Web Development
- 10 Proven Ways to Speed Up Your WordPress Website in 2024
- Education Management Website Why Schools, Colleges, and Courses Need One
I really like reading through a post that can make men and women think. Also, thank you for allowing me to comment!
I like this weblog very much, Its a rattling nice place to read and receive information.
Thank you so much for your kind words! I’m really glad to know you’re finding this blog a helpful and enjoyable place to read and learn. It’s feedback like yours that keeps me motivated to continue sharing useful and relevant content. If you ever have suggestions or topics you’d like me to cover, feel free to share — I’d love to hear from you!