# WordPress – Change User Role name
in functions.php :
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… // This is only for you to see whats going on, after checking, remove these 2 lines altogether $roles = $wp_roles->get_names(); print_r($roles); //You can replace "administrator" with any other role "editor", "author", "contributor" or "subscriber"... $wp_roles->roles['administrator']['name'] = 'god'; $wp_roles->role_names['administrator'] = 'god'; } add_action('init', 'change_role_name');
That’s about it, all you need to do to change user role.