[英]How to change default UserName for Network Super Admin WordPress?
I have created multisite in WordPress. 我已经在WordPress中创建了多站点。 While creating the site I have given admin
username for Network admin. 在创建站点时,我为网络管理员指定了admin
用户名。 Now I want to change the username of Network admin(Superuser). 现在,我想更改网络管理员(超级用户)的用户名。
I have tried the following steps: 我尝试了以下步骤:
wp_users
table and change old username
with new username
; 查找wp_users
表并用new username
更改old username
new username
; wp_sitemeta
table and and edit the site_admins
row as a:1:{i:0;s:5:”new username”;}
找到wp_sitemeta
表和和编辑site_admins
行作为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. 完成此操作后,我能够成功登录,但问题是wp-admin
的顶部菜单栏未显示。
Any suggestion will be appreciated. 任何建议将不胜感激。
You must delete the old one and create a new one. 您必须删除旧的并创建一个新的。 Steps with wp-cli : 使用wp-cli的步骤:
1) create a new user: 1)创建一个新用户:
wp user create superadminuser your@email.com --role=administrator --user_pass=passwordsupersafe
2) grant super admin role to new user 2)向新用户授予超级管理员角色
wp super-admin add superadminuser
3) login with superadminuser and delete the old admin. 3)使用superadminuser登录并删除旧的admin。 Maybe change the email of superadminuser to the one admin had. 也许将超级管理员用户的电子邮件更改为一个管理员。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.