• Dear Forum,

    I have deleted the super admin user, titled “admin” on WP multisite installation.

    I created an other username that I wanted to make super admin, but now I am unable to, I only have normal admin users now. I found out the normal way would have been to give super admin priviliges via the super admin user, but now that is not an option.

    Is there a way to give super admin privilige to the new users by editing PHP or MySQL? I do not want to reinstall WP again.

    Btw, is this a bug? There should have been a warning like:
    YOU SHALL NOT DELETE SUPER ADMIN ??

    Thank you for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You need to give the new super admin user administrator capabilities and set the user level to 10.

    Assuming your db prefix is wp_

    In the wp_usermeta table for the user_id you want to be super admin

    wp_capabilities to a:1:{s:13:"administrator";s:1:"1";} //Note this is a serialized array
    wp_user_level 10

    Then for each blog set the same capability and user level

    wp_2_capabilities a:1:{s:13:"administrator";s:1:"1";}
    wp_2_user_level 10

    And so on…

    Thread Starter meister245

    (@meister245)

    I was able to restore the original super admin in the users section, but the password was no longer accepted. Luckily, I read from the database my e-mail was still associated with the super admin.

    I reset my password on the forgot password screen and I am inside once again!

    Thank you very much!!! ??

    meister245 futher to your quest to understand MySQL Databases and editing it via phpmyadmin if you loose your password in the future look in your mysql database for the wp_users then tick edit based on the right user_login. ie edit user_login admin.
    Now inside a quick breakdown of the username and password.
    “user_login” this is your username (*note: you can use symbols and longer length usernames than what is allowed at install),
    “user_pass” this is where you can change your password, far as i know the password has being encrypted with the hash md5 so you cant just copy the values from here and paste into your login window, instead write your new password in the value area (it may also contain symbols and be of longer length than at install), and then select md5 from the functions tab. Then click save now, go and test your new password to see if it worked. This has worked for me in the past when my site was hacked and i needed to overide or delete the user password and username. Or even simpler if your username is correct and or your email is correct go to your url http:/ /yoursite.com/wp-login.php?action=lostpassword and wordpress can generate a new one for you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Deleted Super Admin, how to recover?’ is closed to new replies.