How to change WordPress multisite admin user name ?

How to change Wordpress Admin user name in CPanel with phpmyadmin ?

Log in to your CPanel control panel, select phpmyadmin under Database section. Select your database to edit. 1. Select wp_users table it will bring all the users tables in a row. 2.  Edit  the row where the “user_login” column is equal to “admin”. 3. Change the text admin in user_login line with your desired name. 4. Also change  admin with your desired name in user_nicename and display_name line. Save changes and now log in with your new user name to wordpress dashboard and click on admin link you will see that Network admin link is not visible.

Network Admin disappeared and not visible after changing wordpress admin user name in wordpress database ?

If you have changed your wordpress admin user name in your wordpress database, and you have installed wordpress multi site and buddypress, you can encounter a problem that network Admin link is not visible and disappeared. Ii also faced same problem after changing wordpress admin name, Network Admin link was disappeared. Actually when you change wordpress admin user name and your have installed multi site and/or buddypress also, you should also update wp_sitemeta table and you have to add your new user name here. Here is a solution to bring your network admin link back. 1. Click on wp_sitemeta to open the table. 2. find the row site_admins, in my case it look like this.
site_admins a:1:{i:0;s:6:"testit";}
Click edit and you will see a tex box containing
a:1:{i:0;s:5:"admin";}
above line, change admin with the user name that you entered before and also change the number 5 it is a character count of user name, in my case my new user name is "testit" so charcater count is 6.
a:1:{i:0;s:6:"testit";}
so i replaced text admin with testit and number 5 with 6. Click on Go button to save changes and now log in again to your wordpress dashboard and hope fully you will see Netword Admin link again. if you have any suggestions please post in comments section.

3 comments:

Mitch said...

you might want to go over your spelling a:1:{i:0;s:6:"tetsit";}

Ebusiness4life said...

Thanks,
Ebusiness4life

adeem said...

Nice tutorial, I already knew how to do it. This would be helpful for everyone looking to change their admin username.