WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there anyway to rename a user role name via hook, instead of using plugin?


For example, administrator » owner

share|improve this question
Could you elaborate on what you want to achieve? – BjornW Jul 15 '11 at 15:50
rename user role name, that's it. for example, administrator -> owner – Sean Lee Jul 15 '11 at 17:46
up vote 33 down vote accepted
function change_role_name() {
    global $wp_roles;

    if ( ! isset( $wp_roles ) )
        $wp_roles = new WP_Roles();

    //You can list all currently available roles like this...
    //$roles = $wp_roles->get_names();

    //You can replace "administrator" with any other role "editor", "author", "contributor" or "subscriber"...
    $wp_roles->roles['administrator']['name'] = 'Owner';
    $wp_roles->role_names['administrator'] = 'Owner';           
add_action('init', 'change_role_name');


share|improve this answer

A simple solution would be to just add a user role using add_role, that way you can name it whatever you want and add whatever capabilities you want. http://codex.wordpress.org/Function_Reference/add_role

share|improve this answer
Tried to avoid this, but I guess it's the cleanest way to do without plugin. – Sean Lee Jul 15 '11 at 22:16

You can create a custom localization file. Get this file: http://svn.automattic.com/wordpress-i18n/pot/trunk/wordpress.pot and edit using PoEdit tool (for example). In next step save localization file as en_GB.mo (or other) and edit wp-config file:

define ("WPLANG", "en_GB");

share|improve this answer
Already tried this method, but some pull down menus were not translated. – Sean Lee Jul 15 '11 at 22:15

You can edit it directly in your DB, and it will be edited permanently for your website. Here is where WP keeps user roles

SELECT * from blog_options WHERE option_name = 'blog_user_roles'
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.