Difference Between Admin and Super Admin in Database

I was looking at the user table and noticed for a super admin ( have access to network admin panel ) and an admin to a network site have same wp_capabilities which is a:1:{s:13:"administrator";b:1;} and also the wp_user_level is 10 for both.

So, I was wondering what is the database value that differentiate between a super admin and an admin? I don’t see any more usermeta that relates to network admin level.

Read More

What is the proper way to assign super admin capability to a admin via:

  1. Database Edit.
  2. Via Code.

Related posts

Leave a Reply

2 comments

  1. Site admins are stored in a site option as an array of usernames.

    For example, using SQL in MySQLWorkbench you can do a query such as this:

    SELECT * FROM wp_sitemeta where meta_key='site_admins';
    

    To get back a serialised PHP array. Modifying this value by adding your username and user ID will make you a site admin.

    If you’re just looking to see who is a site admin, you have these functions:

    get_site_admins();
    is_super_admin();
    

    If on a single site rather than a multisite, any user with the delete_users capability will be regarded as a super admin.

  2. I checked the MultiSite Database and found following two entries in wp_sitemeta table which differentiate between a super admin and an admin.

    admin_user_id and site_admins