How can I restore admin capabilities?

So yeah, I’m a genius. I managed delete all my admin capabilities (thank you very much Membership plugin). I could restore them, …if I had admin access, lol.

Anywhoo, how can I give all my capabilities back to admin? I have access to the database via PHPMyAdmin but have no idea where or what to add back to the DB.

Any help would be appreciated. Thanks!

6 Answers
6

The string below actually represents an array in serialized form.

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

Here:
a:1 means an array with a single element
s:13 means string and the length of the string followed by

Array 
{
     "administrator" => "1"
}

Once that is in the table, you can use the unserialize() function to return it to an array for use in your code.

Many thanks.

Leave a Comment