How to Recover Super Admin Access After Username Change on a WordPress Multisite Install

For whatever reason you recently decided to change your username to something thing different in your WordPress Multi-Site through direct access to your database, or with a plugin that allows you to change your username.  While either method typically works for singular WordPress site, this in fact breaks your Super Admin access, and preventing you from creating new accounts and maintaining your site.

Super Admin is placed and maintained in a separate area of your WordPress database. As with all things I highly recommend making a backup of your database and/or website, particularly if your not entirely familiar with working with the database, and even if you are mistakes happen.

If your using cPanel, open up phpAdmin, and look for the table _sitemeta (which will probably look similar to wp_sitemeat, with the wp being your database name).

Once your have opened the table you are now looking for the line that say something like

8 1 site_admins a:1:{i:0;s:5:”admin“;}

Change the old admin name ‘admin’ to your new username ‘wpguru’

Your not done yet, now look just prior to your username for value similar to s:5: . The 5 value denotes to how many characters are in your username.  So your now going to want to have this match whatever your new username is.  In the sample case here, this would be 6.

Save your changes, and your done.  With the above changes your new line should look like

8 1 site_admins a:1:{i:0;s:6:”wpguru“;}

You should now be able to log back into your WordPress Multi-Site as Super Admin.

Good Luck!



Total
0
Share