Portfolio of Andy Feliciotti

Add a Super Admin to a WordPress Network

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.


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.


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