Changing names or creating new WordPress user profiles

There are several situations where you may want to change the names of the default WordPress user profiles, although it will almost always be for customer sites.

If you do web maintenance, many clients have a hard time with not having administrator permissions, even if they don’t know how to manage their WordPress correctly, and in fact, they have already hired you for that function, and this would be a very typical situation in which to change the name of their user profile or create a new one, with personalized capabilities.

How to rename WordPress user profiles

If you consider that it is enough to change the names of the user profiles it is very simple, with a function like the following you can do it:

%MINIFYHTML9e30e6ab960298a909ca33c3123d9edb57%
function wphelp_change_profile_name() { global $wp_roles; if ( ! isset( $wp_roles ) ) $wp_roles = new WP_Roles(); $wp_roles->roles['editor']['name'] = 'Owner'; $wp_roles->role_names['editor'] = 'Owner'; } add_action('init', 'wphelp_change_profile_name');

The previous code can be customized to your liking by changing in lines 5 and 6 the profile to be changed (roles and roles_names ) and the visible name (Owner in the example).

Look, this would be another example:

function wphelp_change_profile_name() { global $wp_roles; if ( ! isset( $wp_roles ) ) $wp_roles = new WP_Roles(); $wp_roles->roles['author']['name'] = 'Writer'; $wp_roles->role_names['author'] = 'Writer'; } add_action('init', 'wphelp_change_profile_name');

And so on with any existing user profile.

This function is ideally included as a custom plugin, but you can also add it to the end of the active (child preferably) theme functions.php file.

This trick keeps the profile slugs, so that there are no incompatibilities with other WordPress functions and Plugins, while changing the visible name of the profile.

How to create new WordPress user profiles

Another possibility, if you don’t want to change the names of the profiles, would be to create new user profiles, and to do this nothing better than the Members plugin.

Once installed and active, it creates a new administration menu (Members) in which you can both modify (add or remove) capabilities to existing profiles and create new ones, with custom capabilities or clone existing ones.

From this plugin you won’t be able to change the names of the existing profiles, that’s what the code we saw before is for, but you can do many more things.

There are 2 ways to create new user profiles:

  • Create a new profile from scratch: At first, it has subscriber capabilities, the minimum, and you have to add new capabilities.
  • Clone an existing profile: You can rename it and add or remove only those capabilities that will distinguish it from the original profile you cloned.

Of course, the best option is to clone an existing profile, which saves you a lot of clicks when adding or removing capabilities.

As you have seen in the previous screenshot, it is very easy to navigate through the different capacities that you can add or remove, as they are organized by type of capacity (entries, pages, appearance, plugins, etc.)

You only have to click or uncheck the “Grant” permissions boxes.

Of course, change the name “clone” to something more attractive, or descriptive of the capabilities of the type of profile you just created.

Then you just have to assign the new profile to the user or users, as you would do to change any profile, editing the user, in this case in the new box that incorporates the user profile editor plugin Members.

As you have seen, both operations are easy to perform, and a basic tool for webmasters and professionals who offer web maintenance.

Read this post in Spanish: Cómo cambiar los nombres o crear nuevos perfiles de usuario de WordPress

Click to rate this post!
[Total: 0 Average: 0]

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top Skip to content