How to Customize User Roles and Permissions in WordPress
Now that you are getting the hang of WordPress, your site is live, you’ve started adding content and then it happens, you want to scale it up and bring on additional staff to help you write content and do various tasks to help your site grow at an even faster pace.
When you start looking into it, you find out about User Roles and access it by going to WP Dashboard > Users. Inevitably, you’ll start adding test users into the system, log out, log in under the new users and see what they can do on your site that you’ve worked so hard on.
Then you discover that the default user roles are great, but it isn’t perfect. You like X role but you can’t setup new accounts under it because it allows them to do Y, which you only want administrator accounts to manage.
Enter User Roles Plugins
For both options below, we strongly recommend reviewing the WordPress Codex for Roles and Capabilities to have a full understanding of the roles and capabilities before making changes. On that page, consider scrolling down to the Capability vs. Role Table section and have a look at their visual representation of the default roles that WordPress ships with. Just to save a little confusion for you, “Super Admin” is a role that is only offered on WordPress Network / Multisite install which allows you to run multiple “sites” in one WordPress website.
Additionally, consider copying the default roles and modifying those to your liking. Then you can set your users to those roles and never use the WordPress defaults. This way, you can reference the default roles and capabilities at any time.
Option 1: User Role Editor
The above screenshot is exactly how User Roles Editor works within your WordPress and is accessed by going to WP Dashboard > Users > User Role Editor. Of course, you can check the box that says Show capabilities in human readable form if you wish, that will just remove the underscore and make the options plain text (we don’t recommend this because then it is a little harder to cross reference the roles and capabilities codex linked above).
From this screen, you can easily “Add Role,” “Rename Role,” and even do more advanced things like add or delete capabilities for these roles. As we show you on the right, adding a new role is straight forward. Enter the role name, what it displays and select what default role you’d like this role to mimic before you begin editing its capabilities.
From here, you can quickly reference the capabilities enabled (checked) and modify how that role works on your website when they log in.
If you’d like to have your senior writers have advanced access to your website, like publishing posts created by junior writers but you don’t quite trust them enough to be a full “Editor” on your site, you can quickly create a Senior Writer role by making a copy of the “Author Role,” reference the codex and enable a few select Editor capabilities and call it a day.
The same thing with your editors. You can create a new editor role and create a “Super Editor” role that would have a select few administrator rights.
Or, go the other way (like what we do) and create an Author role but remove certain default features we don’t want them to have, such as the ability to delete posts.
What We Don’t Like
Immediately after activating this plugin, it will create new capabilities inside of your database, even if you do not make a single modification or change. The above screenshot was taken right from our localhost install when using Capability Manager Enhanced (below) which shows obvious entries added by User Role Editor using the name ure_ as the capability name. Unfortunately, the developer doesn’t offer a way to remove these newly added references upon removal or with the “Reset” function which resets all user roles back to default. If you Reset > Deactivate > Uninstall User Role Editor, the ure_ references remain. Just something to be aware of, which may or may not bother you as an administrator.
Option 2: Capability Manager Enhanced
Capability Manager Enhanced is, for the most part, the same as the User Role Editor plugin we showed first. The difference here (and why it is included) is the fact that it is a bit more user friendly in the way it portrays the capabilities in an easier-to-understand format.
Of course, the downside with this is also that you are going to have a harder time cross-referencing the codex page to learn exactly what some of these Other WordPress Core Capabilities do exactly.
After the plugin is installed, you can access this plugin by going to WP Dashboard > Users > Role Capabilities.
One thing nice about this plugin is you can completely disable capabilities within a role using the red X without having to delete the capability (which is how URE works).
What We Don’t Like
No revert option available. One of the features mentioned on this plugin’s description page is the ability to revert roles and capabilities to WordPress defaults, however, we thoroughly searched the support threads, reviews and looked over the plugin and do not see a way to do this within the settings. In fact, we had to load URE and use their reset function to remove all the changes we made in this plugin.
Copying roles is a little less user friendly and less obvious compared to URE above. In order to accomplish copying a role, you will need to “Load” a role, like Author and then under Copy Author Role, you type in the name of the new role that you want created. In URE, you simply click “Add Role” then it asks for the name as well as a drop-box to select the user role you want to copy, which is way more straight forward and less confusing.
How Has Modified / New User Roles Helped You?
We’d love to hear how you are using modified or new roles in your WordPress setup. Leave a comment below to help our readers understand the benefits of creating specific roles.
My goto combo is “WordPress Hide Admin Menu Plugin” by Rilwis and “User Role Editor”.
Where User Role editor does not allow you to turn on and off things inside some plugins, hide admin comes in and add that extra layer that is missing. Unfortunately hide admin alone does not do everything that you need. It stinks that it doesn’t because at $13 it should have all the features of User Role Editor.
Another great write up here Scott.
You have me thinking that there is a plugin opportunity here. humm…