How to Add a Super Admin to a WordPress Network (3 Methods)

Recently I was stuck with phpMyAdmin access but no WordPress Super Admin access in a WordPress network install.

Here is a quick post on how to add a user as a Super Admin with phpMyAdmin or using WordPress functions.

For those who don’t know the WordPress Super Admin in a network install gets to use the network admin page which is useful for managing blogs, plugins, and themes.

Some people call this WordPress Multisite but if you’re unfamiliar with multisite/networks they allow you to manage multiple WordPress blogs on a single server / database. Read more about setting up a WordPress Network here.

I’ve included three methods to add a Super Admin to WordPress, using the network admin, phpMyAdmin, or even adding a script to your functions.php.


Using the Network Admin to Add a Super Admin

If you’re already logged in as a super admin you should be able to simply activate users as super admins in the users pane.

The setting should say “Grant this user super admin privileges for the Network.” and be below the user’s username.

Grant Super Admin option in the WordPress Network Admin
Grant Super Admin option in the WordPress Network Admin

Using phpMyAdmin to add a Super Admin

There is only one field you’ll need to edit to add a Super Admin, and that is “admins” in the “wp_sitemeta” table. You’ll see some serialized data in the value of the field such as “a:1:{i:1;s:5:”admin”;}”. When you’re dealing with serialized data it can get a bit odd, but adding an admin with the user name “Andy” would be done as follows.

"a:2:{i:1;s:5:"admin";i:2;s:4:"Andy";}"

So as you can see the first number a:2 matches how many entries you have so for 3 admins you’d put 3. I simple just copied and pasted the first bit “i:1;s:5:”admin”” and added a semicolon to indicate another entry. Then increased the i by one and s matches how many characters are in the username, in my case 4. If you enter any of the variables wrong you’ll know by checking to see if your new user is an admin.


Using your Theme’s Functions.php to add Super Admins

To add an admin by user ID you can use grant_super_admin.

Simply put the grant_super_admin function in your theme’s functions.php file (usually in /wp-content/themes/CURRENT THEME NAME/functions.php). You’ll need to put the ID of the user as a variable, the example below we’re using the user ID of 1.

grant_super_admin(1);

After doing this check to confirm that user has Super Admin privileges and remove it from functions.php so it doesn’t constantly run with each page load.

Frequently Asked Questions

What is the super admin role in WordPress?

A super admin controls every site within a WordPress network or multisite setup. They can manage all sites, install plugins or themes for the entire network, update settings, and see every user. Regular admins only see one site and have fewer options.

How do I make someone a super admin on WordPress?

As you read in this post, if you already have super admin access, head to Network Admin, open the Users section, and find the user you want to upgrade. There’s a checkbox that lets you grant super admin rights. Save the setting, and that person now controls the network.

Can I add a super admin without being logged into WordPress?

Yes, you have two main choices. You can use phpMyAdmin to edit the wp_sitemeta table, adding the username to the list of network admins. The value must follow the existing format exactly, including the right username length. Another way is using the grant_super_admin function in your theme’s functions.php file, but remember to remove the function after it runs.

How do I create a superuser in WordPress?

Create a regular user account first. Then, follow one of the three methods: update their status in Network Admin, edit the sitemeta table in phpMyAdmin, or use the grant_super_admin function. All routes turn a user into a super admin with network-wide control.

Is super admin higher than admin?

Yes. A super admin sits above all site admins in a WordPress network. While an admin handles a single site, a super admin can manage everything across the network, including other admins. If you need someone to help with technical or security issues across your network, make them a super admin.


And just like that you’ve added a new super admin to your WordPress network!

Adding a super admin on your WordPress network keeps your sites running smoothly and secure. You can manage users and settings with less stress.

12 thoughts on “How to Add a Super Admin to a WordPress Network (3 Methods)”

  1. Great summary and helped me out of the rabbit hole of spending the week in phpmyadmin trying to figuring out by trial and error. What was missing was the record in wp_sitemeta. Thank you!

    Reply
  2. WOW! Thank you so much. It is an art to make something really complex so easy to do. I got mine fixed at first attempt. You are really a genuis.

    Reply
  3. This article helped me a lot! The clear example and step-by-step how to change the user in the database made me do it right in 1 time. Thanks!

    Reply
  4. Lifesaver!! Specifically, I used the database/phpmyadmin approach. In my case, I needed to change my superadmin username for security (it was not admin, but it was being guessed by hackers too often). I used the “Username Changer” plugin, but lost superadmin access. Used your instructions to change my old username in the db. At first it “didn’t work” — but that’s because I neglected to change the number of characters in the serialized data. Thanks for detailing how to work this out!

    Reply
  5. Running WP 4.5.3, this solution didn’t work. (The site didn’t seem to accept grant_super_admin() as a function)
    It’s possible from the user edit page, but be sure you open that from the network admin, not the site admin

    Reply

Leave a Comment