[wp-hackers] How do I reset all roles and capabilities?

Kirk Steffensen blogger at steffensenfamily.com
Tue Nov 13 17:29:59 GMT 2007


Try this using phpmyadmin:
1.  Go to your WordPress database.
2.  Select the wp_usermeta table.
3.  Click on "Browse" at the top of the right-hand panel.
4.  For each user (login username = nickname in this table), you'll have a
wp_capabilities row.  Click on the pencil in that row to enter edit mode.
5.  Replace the contents of the meta_value with

a:1:{s:13:"administrator";b:1;}

This will reset that user to purely an administrator.

6.  In wp_options, do the same thing to "active_plugins", resetting it to

a:0:{}

This will deactivate all of your plugins, including Role Manager, and should
let you login.

Kirk

On 11/11/07, Viper007Bond <wplists at viper007bond.com> wrote:
>
> By stupidly screwing around with the Role Manager plugins over the years
> (renaming roles, creating custom roles for others, etc.), I've slowly
> broken
> one of my sites and finally sealed the deal a few minutes ago by
> completely
> locking myself out of my blog when I tried to rename my current role.
>
> Is there any way (or plugin) to reset all roles and capabilities to as if
> I
> had just installed WordPress? I can deal with everyone getting the
> Administrator role or whatever as I can move them back to editors.
>
> I'm thinking I do a fresh install of WordPress can copy over the row in
> the
> options table that lists the roles and then copying over the usermeta row
> for capabilities, but I'm a bit of a noob when it comes to roles and caps,
> so suggestions welcome.
>
> --
> Viper007Bond | http://www.viper007bond.com/
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list