brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: wp super-admin list shows who has super admin rights

Security
~/tips/tip-wordpress-wp-super-admin-list

wp super-admin list

Lists the users with super admin capabilities on a WordPress multisite install.

On a multisite network, a super admin can touch every site, so I’d want to know exactly who has that role. One command answers it.

wp super-admin list

It prints the usernames of the users with super admin capabilities, one per line. The docs show it like this:

supervisor
administrator

Those are the docs’ example names. The default format is list; you can also ask for table, csv, json, count, ids or yaml:

wp super-admin list --format=count

The same command group has add and remove to grant or take away the rights for one or more users, so a review can end in a fix:

wp super-admin remove someuser

Replace someuser with a real username, and think about it first, because that user loses control of the whole network.

A caveat: the docs describe these commands for a multisite installation. They don’t say what happens on a single site, so I’d not rely on them there. For a normal site, wp user list --role=administrator is the thing to run instead.

The docs show the output of add and remove as a plain success line:

wp super-admin add superadmin2
Success: Granted super-admin capabilities to 1 user.

Revoking prints Success: Revoked super-admin capabilities from 1 user.. Run wp super-admin list afterwards to confirm the list looks the way you expect.

Further reading: wp super-admin list, wp super-admin

More Security tips tcpdump -nn -r capture.pcap port 53 mkcert -install Strict-Transport-Security: max-age=0 Referrer-Policy: strict-origin-when-cross-origin getent group sudo adm docker lxd All Security tips (79) All topics

Link