Where does WordPress store a list of Super Admins?

I had to switch around my Super Admins. I did it through the MySQL tables directly.

I now have 1 official Super Admin for my network (which is what I want & need) but WordPress shows that I have 2 Super Admins:

Read More
All (71) | Super Admins (2)

Where does WP store the SA count or the list of SA’s?

Related posts

2 comments

  1. It’s stored in the main site options table, under the “site_admins” key.

    Edit: As pointed out in the comments, the “site options” table in multisite is actually named PREFIX_sitemeta, like “wp_sitemeta”. It’s referred to as a site option internally, like get_site_option('site_admins').

    To adjust this without editing the database content directly, you could do this:

    $capes = get_site_option('site_admins');
    // $capes is an array of the super admin usernames, adjust it as needed
    // then save it back like so:
    set_site_option('site_admins', $capes);
    
  2. On SQL level, you can find in site_admins key in wp_sitemeta table. Check the meta_value key for find out who is Super Admin in your installation.

Comments are closed.