WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 5 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');

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
Hi Sam. It's been a long time. I'm having the same problem again. I tried the solution, and Wordpress Admin prompted me that I have to upgrade the network. After that, I still receive "You do not have sufficient permissions to access this page." at /wp-admin/network – Steve Apr 8 '14 at 10:05
From this post, I re-uploaded wp-config.php, and the problem went away. Looks like I had not correctly uploaded the updated wp-config.php. – Steve Apr 8 '14 at 10:08

protected by toscho Nov 18 '12 at 12:45

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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