admin管理员组

文章数量:1289363

We have a number of sites that use WordPress Multsite and over the last couple of months we have noticed that we now cannot access the main WPMS Dashboard any longer where the plugins are added, users are updated or themes are enabled.

Here's what we have tried.

  • backed up htaccess and WP config files.
  • renamed htaccess by adding a dash at the end of the file name (.htaccess-)
  • setting the WPMS settings to false
/* Multisite */
define( 'WP_ALLOW_MULTISITE', false );
define('MULTISITE', false);
  • Updated all the plugins
  • Updated Core
  • Reversed all the work done
  • Still the same result

I have Googled and read through all the options related to my search but none of the options I have found to have worked

Any thoughts? Thanks

EDIT

After doing some research, it would seem that the Super Admin accounts have somehow changed to normal WordPress admin accounts.

Are there any known changes in the latest WordPress updates that might have caused this? We would like to get to the bottom of it and prevent it from happening again.

We have a number of sites that use WordPress Multsite and over the last couple of months we have noticed that we now cannot access the main WPMS Dashboard any longer where the plugins are added, users are updated or themes are enabled.

Here's what we have tried.

  • backed up htaccess and WP config files.
  • renamed htaccess by adding a dash at the end of the file name (.htaccess-)
  • setting the WPMS settings to false
/* Multisite */
define( 'WP_ALLOW_MULTISITE', false );
define('MULTISITE', false);
  • Updated all the plugins
  • Updated Core
  • Reversed all the work done
  • Still the same result

I have Googled and read through all the options related to my search but none of the options I have found to have worked

Any thoughts? Thanks

EDIT

After doing some research, it would seem that the Super Admin accounts have somehow changed to normal WordPress admin accounts.

Are there any known changes in the latest WordPress updates that might have caused this? We would like to get to the bottom of it and prevent it from happening again.

Share Improve this question edited Aug 3, 2021 at 8:31 Rup 4,4004 gold badges29 silver badges29 bronze badges asked Aug 2, 2021 at 10:29 GrowGrow 234 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

You can gain super admin access to the site by adding this function in the functions.php file

if ( !function_exists( 'grant_super_admin' ) ) { 
    require_once ABSPATH . WPINC . '/capabilities.php'; 
} 
  
// ID of the user to be granted Super Admin privileges. 
$user_id = 1; 
  
$result = grant_super_admin($user_id); 

You can remove the code once you have access, although I'm not sure why the user was changed to Administrator

本文标签: Cannot access WordPress Multisite Main Dashboard