It is not always possible to handle your WordPress website on your own. There are various tasks that need to be carried out in order to keep your website properly functioning. That is why WordPress allows different user roles in it. This makes it easy for you to allow access to different users and control their actions on your website.
While assigning user roles you need to ensure that you are giving each user only the required access (enough to carrying out their task) on your website. This way you will be able to keep your website secure and fully functioning. This article will help you learn more about different user roles in WordPress and about their functions in-depth.
Different User Roles in WordPress
The administrator is the one who creates and owns the website. All the rest of the user roles come under the Administrator role (if the website is not a multisite installation). It is in the Administrator’s power to add, give access to the users and also to delete the user and deny their access to the website.
Administers have access to all functions of the website in the backend. It can create, edit and delete any content, manage plugins and themes, edit code, and change the website credentials(password, username) of existing users, etc. If for any reason you are assigning this role to some other person, you need to make sure this person is capable of handling these tasks properly.
When it comes to the editor’s role they have entire control over the content of the website. Everything related to the content whether it is creating the content, editing it, deleting it and even publishing the content can be determined by the editor. Even if the content belongs to other users the editor has control over it.
The comments received for a post, and its categories and links can also be managed by the editor. Still, the editor doesn’t have permission to install themes or plugins to the website to bring any major changes to the website. Their role is limited to ensuring the overall quality of the website’s content.
The author as the title suggests is only permitted to create their own content. They have no control over other user’s content but have only access to edit, update and publish their own content. Author has very limited access to the WordPress website when compared to editor and administrator roles.
Within WordPress, all new users are considered subscribers by default. They are only entitled to read your site, post comments, create and update their profile, change their account password, etc. They do not have the right to edit the settings or content on your site. Subscriber role is mainly useful for subscription-based sites like medium, where they require users to log in to post or leave a comment on their blog posts.
Contributor’s access to a website is very limited. They are allowed to write, edit, and delete their unpublished posts. But are not authorized to publish any content even their own. Hence it is the admin/editor’s job to review and publish contributor’s posts.
Since a contributor is not allowed to create categories, they will have to choose from the existing ones. But, they are allowed to add tags and view comments that are awaiting moderation. Still, it is not up to them to approve or delete those comments.
Contributor’s role is a great option for guest blogging since guest authors do not submit posts on a regular basis. An important issue with contributor’s role is that they are not allowed to access the Media library inside of WordPress, hence they will have to ask for the permission of the admin/editor to add images, videos, or audio files to the post.
This user role is only available on a WordPress multisite network. Super admin is above all the other WordPress user roles. Using super admin role a user can make bigger changes like adding and deleting sites on a multisite network. In addition to it, they can install plugins, themes, manage network’s users and more.
Both super admin and regular admin have somewhat similar dashboards. In the presence of a super admin regular admin’s responsibilities varies slightly on a multisite network. As a result, a regular admin will not be able to install, upload or delete themes and plugins and modify user information.
Creating Custom User Roles in WordPress
You can create custom user roles in your WordPress website in two different methods; by adding a plugin or by using a custom code method.
First method: using plugin
For some websites, these six user roles might not be adequate for the proper functioning of their website. These circumstances require creating additional user roles with varying capabilities. You can easily add this functionality to your WordPress website by installing the plugin capability manager on your website.
Navigate to the WordPress dashboard > Users > Capabilities
Here is a screenshot of its opening page.
In the highlighted portion of the above screenshot, type in the name of the new user role and click Create.
Now, you can add capabilities to the newly created role.
Here is the screenshot of the newly created user role’s window.
From this screenshot, you will be able to see how much control you have over assigning capabilities to a role that you created. This way you can easily create as many user roles as you need.
Second Method: by adding custom code
Being an open-source platform you can manipulate WordPress to function the way you like. Thus for adding a custom user role all you have to do is include the below line of code at the end of the function.php file located in theme editor of your WordPress website.[php]
__( ‘Custom Editor’ ),
‘read’ => true, // true allows this capability
‘edit_posts’ => true,
Save the file and login to your site with an admin account. From your website’s dashboard go to Settings > General. Now you will be able to see your newly created user role on the drop-down list.
WordPress user roles are indeed a great way to manage websites by allotting different tasks to different user roles. Plus the option to create custom user roles comes as a great help to WordPress users. You can choose either of the methods explained in the article to add custom user roles to your WordPress website.