VPS business hosting starting at $29.95/24/7 premium technical support

How to change WordPress user roles in MySQL database using PhpMyAdmin?

We will be editing the database rows using PhpMyAdmin tool given with cPanel by many hosting companies

You can change the WordPress user roles by following the given steps:

Step 1: Open phpMyAdmin on cPanel.

Step 2: Open the wp_usermeta or xxx_usermeta table in the database as highlighted. (wp_ is just prefix, your table prefix may be different)

wordpress tables in database

Step 3: In wp_usermeta table, you can find wp_capabilities under meta_key column.

User Roles in usermeta table

Step 4: The roles are saved in form of serialized PHP array. Change the user role you want to assign to the current user by changing the meta_value as:






Author: Harshvardhan Malpani

PHP Developer based in New Delhi, India. Working as a freelance web developer providing server deployment, website development and maintenance services.

12 thoughts on “How to change WordPress user roles in MySQL database using PhpMyAdmin?”

  1. This is perfect!
    I was mucking around with a local dev site and just emptied the usermeta table without giving much thought, but I was able to add the admin capabilities because of this. Thanks 🙂

  2. I’ve just noted that this works for a single installation and doesn’t work for a multisite. Any workaround for that?

  3. I managed to remove my permissions to update wordpress site when I was in wishlistmember dashboard. I’ve tried updating in MYPHPadmin but there is no privileges option – help!

Leave a Reply

Your email address will not be published.