PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, July 3, 2022

[FIXED] How to change default UserName for Network Super Admin WordPress?

 July 03, 2022     multisite, php, wordpress     No comments   

Issue

I have created multisite in WordPress. While creating the site I have given admin username for Network admin. Now I want to change the username of Network admin(Superuser).

I have tried the following steps:

  1. Find wp_users table and change old username with new username;
  2. FInd wp_sitemeta table and and edit the site_admins row as a:1:{i:0;s:5:”new username”;}

After doing this I am able to login successfully but the issue is that the top menubar of wp-admin is not displaying.

Any suggestion will be appreciated.


Solution

You must delete the old one and create a new one. Steps with wp-cli:

1) create a new user:

wp user create superadminuser your@email.com --role=administrator --user_pass=passwordsupersafe

2) grant super admin role to new user

wp super-admin add superadminuser

3) login with superadminuser and delete the old admin. Maybe change the email of superadminuser to the one admin had.



Answered By - Nicola Peluchetti
Answer Checked By - David Goodson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing