How to create a Custom User Role in WordPress
BLOG

How to create a Custom User Role in WordPress

Table of Contents

WordPress helps admins create various user roles based on access privileges. For example, one user can change WordPress settings, while others can only post contributions.

WordPress supports third-party plugins, programming, or scripts when changing user roles or creating new ones.

So, in this resource, let’s learn how to create a custom user role in WordPress. The process is technical and requires expertise to proceed. If you don’t know how WordPress works, don’t proceed.

WordPress User Roles

In WordPress, a user role refers to a set of privileges. These privileges define whether a user can do specific tasks in WordPress. Based on requirements, users are assigned different user roles. For example, if one can create and manage content entries, others can only leave comments.

User roles are mandatory, especially if you plan to manage a multi-user website in WordPress. In this case, users can leave comments, create content entries, or submit content for review.

Let’s proceed and learn more about WordPress built-in user roles.

WordPress provides five user roles by default.

  1. Administrator: As its name suggests, an administrator can access a WordPress website. If you’re an administrator, you can change settings, add new users, upload new themes, change passwords, and install/deactivate plugins. The WordPress installation person is automatically assigned the “Administrator” role. In this case, if required, you can add more users, add and change permissions, or change WordPress settings.
  2. Editor: An editor is responsible for managing content on a WordPress website. Content refers to WordPress pages, posts, and product pages. An editor can create their posts and manage others’ content entries.
  3. Author: The user role “Author” is a minimalist form of “Editor.” An Author can create their content entries but cannot handle or manage others’ content.
  4. Contributor: Contribution in WordPress is vital, especially when a site accepts user content. A contributor can create post entries only. In this case, the posts or pages are submitted for review and cannot be published by the contributor.
  5. Subscriber: A subscriber has the most limited version of user roles in WordPress. A subscriber can only leave comments on WordPress posts or pages. Additionally, a subscriber can also change profile settings.

How do you create a Custom User Role in WordPress?

There are two ways to create a custom user role in WordPress.

Method 1: Using PHP and programming skills, you can create custom roles in WordPress. Of course, you will need coding expertise to create custom roles using PHP.

Method 2: If you need to be more technical and require knowledge, you can use a 3rd party plugin to create new roles. In this case, a plugin provides a no-code, point-and-click interface to proceed. If you do not know coding, this method can help you.

This resource will help you use a third-party plugin called User Role Editor.

Let’s describe why you should use plugins to create new user roles in WordPress.

Why should you use Plugins to create User Roles?

Safe approach

Unlike coding, plugins are user-friendly. It would help if you chose various options, set measures, and proceed with point-and-click options. There is no coding involved. You can also revert changes quickly. In this case – a plugin can help you bypass everything, from changing database values to making new roles active in the background.

Free to use

There are free plugins available to add new user roles to WordPress. Users have to spend no money throughout the process. All you have to do is install the plugin in the WordPress directory. You can access the plugins’ directory in the WordPress dashboard when ready. So, clicking the Add New Plugin will take you to the required screen.

Time

If you code to add new roles to WordPress, you’ll have to invest more time than using a point-and-click plugin. Using a 3rd party candidate, you can create new roles or edit existing users using the pick-and-choose options.

Features

Unlike coding expertise, plugins are more helpful. You can use extra features, functionality, and flexibility. You can quickly allow users to access specific resources, limit users from accessing particular website areas, or make users more limited in seconds, such as deactivating or deleting existing users.

Compatibility

Plugins are supportive. As the WordPress core updates roll out, plugins quickly add new changes. In such a scenario, you can use advanced features to add new users, save time, quickly add user roles, and make WordPress flexible without learning to code.

Support and Documentation

For example, if you’ve purchased a premium plugin to add users to WordPress, you can also avail extra support. The premium candidates provide detailed documentation, too. Unlike free scripts, you can ask vendors to help you while creating new user roles in WordPress.

Flexibility to choose

There are various candidates in the WordPress plugins directory. You can choose more plugins to add new user roles to WordPress. Once you test multiple plugins, you can select one to proceed further. Testing various candidates on a staging website helps you even more – you choose once you’re delighted.

Let’s proceed further and learn to add new user roles to WordPress. As described earlier, we’ll cover the process with plugins, not manual coding routines.

Create new User Roles in WordPress

Step 1: Install the plugin (User Role Editor)

If you still need to install the plugin, log into the WordPress dashboard and click Add New Plugin. You can install new plugins on the next page.

Here, search for “user role editor” and hit enter. Install the plugins with the following details; see the screenshot below.

user role editor plugin for wordpress

Once the plugin has been installed, you can activate it right away. Click the “Activate” button. Once the process has been finished, a new menu will be added to the WordPress dashboard.

The WordPress dashboard’s “Users” menu should show another option – User Role Editor.

Step 2: Home page options of the plugin

You will see the plugin’s home screen on the next page once you click the Users -> User Role Editor option in the dashboard.

user role editor wordpress

Here, you can perform a variety of tasks, including:

  • Changing access permissions for existing users
  • Rename a Role
  • You can use add or delete capabilities.

The left panel shows a list of capabilities in human-readable form. You can select checkboxes and use the options on the left panel.

Step 3: Create new User Roles

Let’s discuss creating new user roles with the plugin – User Role Editor.

On the plugin’s home screen, you can choose various user roles from the short menu and proceed to change the permissions, as shown in the screenshot below.

wordpress user role editor

Once you have set the required roles, you can save your changes by clicking “Update” in the left panel. Clicking the button will write the changes to the WordPress system.

Now, here is what you will need to do next.

  • To create a new user in WordPress, go to the “Users” page in the dashboard and use the WordPress native Add New User option to create a regular user.
  • The next page will show you relevant fields, such as username, name, password, and user role. Make the required changes and save changes at the end.

This way, you have created a new user role. For example, if you have changed a specific user role by using the plugin, you can create a new user and assign the same type. The latest user will have the custom access levels you have set with the plugin.

For example, if you have changed custom user levels for “Editor”, creating a new editor username will have the options you have set.

In this manner, you can change the WordPress user roles and create regular WordPress users to reflect custom changes, permissions, and access privileges with the plugin – User Role Editor.

Plugins to create new User Roles in WordPress

If you can’t use the “User Role Editor” plugin, here is a list of other plugins used for the same purpose.

  1. Publish Press Capabilities

Publish Press Capabilities helps users control permissions on WordPress.

This plugin can help admins go the extra mile. For example, admins can change the editor and convey specific scenarios to authors when writing posts.

Publish Press Capabilities also provides premium plans for those seeking extra features. In the premium version, users can control how normal users can access menu links in WordPress.

  1. Advanced Access Manager

Advanced Access Manager provides access controls to WordPress content and other features. Here is a list of what users can do with the plugin.

  • Advanced Access Manager offers API integration with other applications.
  • The plugin’s free version offers a variety of features, such as management of backend menus and role control, and to make the WordPress login more secure.

The plugin has secured over 100,000 downloads and is one of the best options with 5-start ratings.

  1. WP User Manager

WP User Manager offers the flexibility to create secure communities in WordPress. It can also help admins customize user profiles to enhance the site’s design.

The plugin is a handful of tools that can make things more customized in WordPress.

Here is what you can achieve with the WP User Manager.

  • It can customize various forms in WordPress, such as user registration, recovery forms, and password-related forms in WordPress.
  • You can add custom fields in forms using the WP User Manager plugin.
  • For users interested in WooCommerce and payment integration, the plugin can also help admins create meaningful integrations.
  • User verification is also possible with the plugin – WP User Manager.
  • The premium version of the plugin can also help users achieve translations.

The free version of the plugin offers users flexible features at no cost. If you can spend money, the premium version offers even more features.

  1. User Registration

User Registration – as its name suggests, is another candidate for admins who want to create new user roles in WordPress.

This plugin offers various options for those seeking advanced control and access levels for creating WordPress user roles, such as customizing the WordPress default forms, including the user registration form.

The User Registration plugin equips admins to set cross-user access controls. This can help admins control access levels and allow or deny users access to specific actions, areas of the website, or content types.

Email notifications are handy with user registration. Admins can also customize user profile pages in WordPress, set spam protection, and change the WordPress user registration forms.

With over 60,000 installs, the plugin has won users 5-star ratings. For those looking for basic features regarding user registrations, User Registration offers a handful of features in its free version. If you can spend money, signing up for its premium plan helps even more in the long run.

Manual creation of User Roles vs Using a WordPress Plugin

We described how to create new user roles by using a WordPress plugin. Let’s move forward and address the details of the manual routine.

Manual creation of new user roles requires manual expertise. Here is what you can expect in the process:

  • You should know how to code in PHP. At least, creating user roles requires dealing with specific code snippets.
  • The manual process involves dealing with core files, such as functions.PHP, in the WordPress core file structure. The point of impact is to handle such routines with caution. Remember to save changes after you have made them.
  • If you update the WordPress core file structure for some reason, you must make changes again. Updates wipe out WordPress changes manually made to the files, so if you are not curious, you may face additional issues.
  • Remember to take site backups once you have changed the WordPress files. A backup plan ensures your site’s safety in case something goes wrong.
  • It would be good to make changes on a staging site first. As described earlier, a staging site can help you change a testing site. This allows users to test various routines before changing a live site. The overall psychology of a staging site helps users avoid WordPress errors.

Precautions and Tips

Here is a list of precautions you’ll need to consider while creating new user roles in WordPress.

  • Create new roles using a WordPress plugin. Creating roles manually involves dealing with code snippets – if misplaced, it can generate syntax errors. This can later cause you to break your site. Simply put, plugins provide a no-code interface to help users create user roles. On the other hand, manual routines require coding expertise, as described earlier. Creating new roles using a plugin is a matter of a few clicks.
  • If you’re making changes to existing use roles, this can create conflict issues while running a multi-user website. One user responsible for a task can conflict with others. For example, limiting or denying a specific user can create problems in specific website areas, such as managing posts.
  • While deleting, removing, or creating new user roles, existing content can be attributed to other users. For example, if the role in question has made multiple posts, deleting it will cause WordPress to show an alert. The alert confirms if you want to attribute the content to existing users. The new user’s profile page can show the assigned content entries in WordPress when successfully assigned.
  • When creating new roles, avoid assigning one access privilege to multiple users. For example, multiple users can play different but the same roles on WordPress. In the long run, this can cause security issues when user accounts are breached. If possible, draw a graph of access levels to various user roles. If, for example, you have changed access levels for current role types, creating new regular users in WordPress can create issues while you are expecting the old-fashioned routine. It would be good if you have used a staging website for experiment purposes, before you are ready to apply new changes to a live website.

Frequently Asked Questions (FAQs)

What is a User’s Role in WordPress?

User Roles in WordPress define the access controls, flexibility of functionality, and restrictions or access levels of users on WordPress assets.

For example, one user can change WordPress settings, while others can only post WordPress content.

In this case, you can use the Editors and Authors as examples. One user can create and manage others’ content; the other can only manage their posts.

What about managing User Roles in WordPress?

WordPress provides its native features to manage user roles. For example, you can visit the “Users” page to see a list of all users.

On the Users page in the dashboard, clicking the “Edit” option under a username will take you to the page where you can change the user’s attributes.

The exact page can also help you create new users. However, WordPress provides only a few options for user roles.

For more information on increasing access controls of WordPress users, follow the procedures described in this resource.

What are the WordPress default user roles?

WordPress can help you create new user roles in the following levels.

  • Administrator: As its name suggests, the “Administrator” role has more privileges than other user roles in WordPress.
  • Editor: WordPress mainly uses an editor user role for content management. In this case, creating pages and posts, making changes to posts, and removing content entries all fall under the responsibilities of an “Editor.”
  • Author: Authors need more flexibility compared to Editors. Authors can only manage their posts, pages, and other assets in WordPress.
  • Contributor: A Contributor can only create and post content entries for approval. However, a contributor’s role can be vital in managing a multi-user website. For example, multiple contributors can post content entries for submission, approval, or review purposes.
  • Subscriber: A subscriber can only leave comments on WordPress sites. The subscriber role has limited access to a site’s functionality.

In WordPress, each user can perform specific tasks. Depending on what you’d like to achieve with users, you can create and assign various tasks to various levels.

How do user roles affect other roles?

In WordPress, one user role can affect others.

For example, an administrator can affect or change other users, all users on a WordPress website. Similarly, an editor has more privileges than an author.

WordPress user roles are categorized under various conditions. For example, super users with more access levels can perform more tasks than those with low privileges on a WordPress website. The “Subscriber” role has low access levels compared to other roles in WordPress.

How to back up user roles in WordPress?

WordPress has no native option to back up user roles in the WordPress dashboard.

If we talk about backing up the user roles, we must think about site backups.

For example, backing up the whole site can also back up existing users. So, if you have more users in WordPress, backing up the WordPress site will also back up existing users.

For more information on how to take site backups in WordPress, use the Up Drafts Plus plugin.

What happens when you delete a user role?

Deleting a user role can affect things in WordPress.

For example, while deleting a user role in WordPress, the system can ask if you want to attribute existing content to another user.

If the user role you will remove has posts attributed, WordPress will ask for confirmation.

Once a user creates content in WordPress, the page or post is attributed to the user role.

So, deleting a user role triggers WordPress’s alert to confirm whether you would like to assign the existing user content to another role.

How many user roles can you create in WordPress?

You can create a bunch of user roles in WordPress. However, you can only choose from WordPress’s roles for every user.

As discussed above, WordPress offers five user role types.

The number of total users also depends on the web hosting you are using for your website.

For security reasons, your site’s web host can limit the total number of users you create on a WordPress website.

Summing up

Creating new user roles provides more functionality to admins seeking WordPress flexibility.

However, you should use the “User Roles Editor” plugin if you’re not technical.

Ask our specialists for more information on WordPress maintenance, speed, and error removal.

Leave a Reply

Comment policy: We value comments and the time that visitors to our blog spend to give feedback. Please note that all comments are manually moderated and any deemed to be spam or promotional will be deleted.