Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have had trouble logging into WP-Admin with my admin account.

I have reset my password, and I can now log-in to WP-Admin, but cannot reach Network Admin (/wp-admin/network), instead receiving "You do not have sufficient permissions to access this page."

What do I need to do to restore the permissions the account had before the password reset?

share|improve this question
I have exactly the same problem since 4 days. but no solution... Please help us ! – user14934 Apr 6 '12 at 14:17

1 Answer

up vote 4 down vote accepted

The easiest way to restore Super Admin privileges is to add a bit of code to your theme's functions.php file to add yourself back:

include(ABSPATH . 'wp-admin/includes/ms.php');
$user = get_userdatabylogin('YOUR_USERNAME');
grant_super_admin($user->ID);

Once your Super Admin privileges have been restored you can remove this code from your theme.

share|improve this answer
I receive an error "Call to undefined function grant_super_admin() in /.../wp-content/themes/.../functions.php on line 47. I placed the code at the end of functions.php – Steve Apr 11 '12 at 1:10
Sorry, I clearly didn't test the code first! I edited the answer to fix your error. It should work now. – Sam Margulies Apr 11 '12 at 18:31
Wow. You've opened a door for me Sam. Thanks! – Steve Apr 11 '12 at 22:36

protected by toscho Nov 18 '12 at 12:45

This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.

Not the answer you're looking for? Browse other questions tagged or ask your own question.