How to Add a Super Admin User Role in WordPress Multisite

Managing a WordPress Multisite network requires distinct user roles, with the Super Admin role holding the highest level of access. Super Admins can oversee all sites within the network, manage plugins, themes, users, and perform network-wide settings. This guide outlines two methods to assign Super Admin privileges to a user.​WP Engine


Method 1: Assigning Super Admin via Network Admin Dashboard

This method is suitable if you have existing Super Admin access.​

  1. Navigate to Network Admin Users Page:
  2. Add a New User:Note: The user will receive an email to set their password.
  3. Grant Super Admin Privileges:The user now has Super Admin access across the entire network.

Method 2: Assigning Super Admin via functions.php (For Locked-Out Admins)

If you’re unable to access the dashboard, you can assign Super Admin privileges by editing your theme’s functions.php file.​

  1. Access Your Site Files:
    • Use an FTP client or your hosting provider’s File Manager to navigate to /wp-content/themes/your-active-theme/.​WPBeginner
  2. Edit functions.php:
    • Download and open the functions.php file in a text editor.​WPBeginner
    • Add the following code at the end of the file:​role-editor.com phpCopyEditfunction wpb_create_super_admin() { $username = 'newuser'; // Replace with desired username $password = 'password123'; // Replace with a strong password $email = 'newuser@example.com'; // Replace with user's email if ( !username_exists( $username ) && !email_exists( $email ) ) { $user_id = wp_create_user( $username, $password, $email ); if ( !is_wp_error( $user_id ) ) { grant_super_admin( $user_id ); } } } add_action( 'init', 'wpb_create_super_admin' );
    • Save and re-upload the modified functions.php file.​WPBeginner+1role-editor.com+1
  3. Execute the Function:
    • Visit your website’s homepage to trigger the function.​
  4. Cleanup:
    • After confirming the new Super Admin user has been created, remove the added code from functions.php to prevent unintended executions.​

Best Practices for Super Admin Accounts

  • Limit Super Admins: Assign Super Admin roles only to trusted individuals to minimize security risks.​
  • Use Strong Credentials: Ensure usernames and passwords are unique and robust.​
  • Regular Backups: Maintain regular backups of your network to safeguard against potential issues.​
  • Monitor Activity: Keep an eye on Super Admin activities to detect any unauthorized changes.​

By following these methods and best practices, you can effectively manage Super Admin roles within your WordPress Multisite network.​

Leave a Comment

Your email address will not be published. Required fields are marked *