If you have been using WordPress long enough, you must have some idea about user roles on WordPress.
Well, these roles basically define what a specific user can do and what they cannot.
Knowing all these in advance can certainly help you in the long run and set up WordPress user permissions according to your need.
Default WordPress User Roles
WordPress comes with few built-in user roles, but before you can actually use them, you have to know how you they work and what they can be used for.
Basically, you have to decide what kind of privilege a particular user will have on the site.
This particular user role can be used if you have multi-site facility turned on for your WordPress website.
As the name suggests, the user with this role will be able to look after all the site Admins and the complete WordPress network for your multi-site.
In case you have Super Administrator in action, the regular Admins won’t have the privilege to install any plugin or theme at all, but they will be able to activate or deactivate them.
As an Admin of a website, a particular user will have full control to your website.
Not only site operations, but Admins are also allowed to assign different user roles as well.
They will have the control over theme, plugin, content, editing, reviewing posts as well.
In some cases, they are even allowed to edit backend codes as well.
This is the reason why while appointing an Admin for your website you have to be very careful.
Since the Admin will have full control of your website, it is better to assign this role to yourself only.
The user role editor is responsible for all your site content. They are allowed to create post, delete theme, review them and edit / publish them.
Most importantly, they can not only control their own posts, but also others’ posts as well.
Normally, this role is for those whom you will appoint to supervise your authors and other content contributors.
As an Author, any user will have similar control like any Editor with just one exception.
Like any Editor, an Author is allowed with full content credibility, but only for their own posts.
Apart from being able to create, edit, delete, and publish content, they are also allowed to change their user profiles as well.
Contributors are exactly same as the Authors with one exception in this case too.
They are allowed to create and edit their own posts and own profiles too, but the Contributors are not allowed to publish any content.
That control belongs to someone with the Editor User role.
This role basically is all about reading posts and managing personal profiles.
Since every user visiting your site has the same credibility, you can actually assign some of the users with this role to allow them to view certain special posts along with the other public posts.
Things you need to do before you can get started with the role assignment
In case you are working on a personal blog with zero profit value and no confidential or sensitive data, you might not need to think a lot while assigning a user role, but there are few good things that you might want to get on with before you can assign roles to different users.
Take a backup
User roles are difficult to deal with and many times, users with specific roles might cause some issues unintentionally that might harm your website.
That is the reason why you need to make sure that you keep a website backup before you assign certain user roles to other people.
Also, make sure that you keep a daily, weekly, or may be monthly back up of your website, just in case you need to restore some settings or your full website.
Appoint Appropriate Roles
Assigning Editor, Author or Contributor roles are really easy decisions and you can revert them at any point of time without harming your website, but while assigning an Admin role, you have to be absolutely sure whether you can trust that person or not!
It’s absolutely prudent that you understand the importance of these roles.
Admins will have full control of your website, and hence, you must select someone whom you can trust only full control of your website.
Having a better control of your WordPress user roles
This can only be done if and only if you can get on with some tweaking with your template files.
Edit functions.php file and insert some code snippets.
There are a few specific functions that you can use to customize the user roles and change their capabilities as well.
- add_role() : Can add role to a user
- remove_role() : Can remove role from a user
- add_cap() : Can add capabilities to a particular role
- remove_cap() : Can remove capabilities to a particular role
- get_role() : Provide information on any particular role
While using these functions, you will need to provide some information as well like role name, display name for the role on dashboard, and the privileges that a certain role can have.
Add these codes to your functions.php file and then update it.
The codes should work and you will be able to see immediate effect for the users roles that you wish to set on your website.
So, are you ready to assign your privileged user?
Well, if you think you have understood the user management system well enough, you can go ahead with role management or else you can stick to the basic available structure on your website.