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?

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

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.

  • 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
  • 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

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