Wordpress - Making someone a WordPress administrator using PhpMyAdmin
You actually want to look in the wp_usermeta table. Once in there, look for the entry that has 'wp_user_level
' in it's 'meta_key' column and has the matching 'user_id' that you would like to update. Then change that 'meta_value' to 9 or 10.
It is also required to update the 'wp_capabilities
' meta_key value to 'a:1:{s:13:"administrator";s:1:"1";}
'
Link to current documentation:
http://codex.wordpress.org/Roles_and_Capabilities#User_Levels
Get access with phpMyAdmin to your WordPress database.
In phpMyAdmin, click on the tab "SQL" in the top tab bar.
Enter this SQL command (with your actual WordPress username instead of
your_username
) and click "Go" to execute it:SELECT meta_value FROM wp_usermeta WHERE meta_key = "wp_user_level" AND user_id = ( SELECT user_id FROM wp_usermeta WHERE meta_key = "nickname" AND meta_value = "your_username" )
You will see a single-cell table with a
meta_value
column. Double-click that cell and change its value to10
.Again click the SQL tab, enter this SQL command (with your username instead of
username
) and click "Go" to execute it:SELECT meta_value FROM wp_usermeta WHERE meta_key = "wp_capabilities" AND user_id = ( SELECT user_id FROM wp_usermeta WHERE meta_key = "nickname" AND meta_value = "your_username" )
Again you will see a single-cell table with a meta_value column. Double-click that cell and change its value to
a:1:{s:13:"administrator";b:1;}
.
(There is a more automated way with SQL UPDATE
commands instead of the above. Welcome to add it. However, sometimes only executing SELECT
s and doing the updates manually will feel safer … no strict need for a database backup etc..)