User permissions in WordPress are dictated by the role the user is assigned to. By default, the WordPress system includes five roles:
Admin
Editor
Author
Contributor
Subscriber
The permissions associated with each role are fixed and cannot be edited without the use of a plugin. While there are several plugins that provide this functionality, in this recipe we take you through using the User Role Editor and show you how to both modify existing roles and how to create new ones.
Note
To learn more about the default user roles and their capabilities, visit the WordPress Codex page on the subject at http://codex.wordpress.org/Roles_and_Capabilities
To execute this recipe, you will need to install the User Role Editor plugin. You will need to install this plugin before you can get started. Search for User Role Editor inside the Add New Plugins screen of your WordPress site. After you find it, click on it to install, and then activate it.
Note
You can learn more about the plugin by visiting the developer's website at http://www.shinephp.com/user-role-editor-wordpress-plugin/
To edit an existing role, follow these steps:
Log in to your WordPress Dashboard.
Click on the Users menu.
Click on the options User Role Editor.
On the page that loads, first select the role you wish to edit from the Select Role combo box.
Make the changes you desire.
Click on the Update button to save your changes.
Your changes will now impact all users assigned to the role you have edited.
To create a new role, follow these steps:
Log in to your WordPress dashboard.
Click on the Users menu.
Click on the options User Role Editor.
On the page that loads, enter a name for the new role in the Add New Rolefield.
Click on the Add button.
On the page that loads, select the privileges you want to role to enjoy.
Tip
The fields marked level_x are only applicable to older, version 2 installations of WordPress and should not be used for WordPress 3. Note also that you can make the role capabilities easier to read by clicking on the check box labeled Show capabilities in human readable form, at the top right of the page.
The plugin edits the default role settings and, by interfacing with the database, allows for creation of new roles. Those of you who wish to explore modifying roles without the use of a plugin will need to explore the WordPress Plugin API at http://codex.wordpress.org/Plugin_API