Last active
May 23, 2024 11:52
-
-
Save michael-sumner/f21c2b70255a51379df960f307a968f8 to your computer and use it in GitHub Desktop.
Set the existing user as administrator role across all sites in the WordPress multi-site network
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# wp site list --field=url | xargs -I % sh -c 'wp user set-role <user-login> <role> --url=%' | |
# | |
# For example: | |
wp site list --field=url | xargs -I % sh -c 'wp user set-role testuser administrator --url=%' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment