Take the 2-minute tour ×
WordPress Development Stack Exchange 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 1

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
    
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 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 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 answers, posting an answer now requires 10 reputation on this site.

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.