Created
October 22, 2024 12:37
-
-
Save michael-sumner/630365159ea6736171bc4724ac84c1f4 to your computer and use it in GitHub Desktop.
WPVIP - loop through all sites in network - set user to administrator role
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
# 1. Save the commands.sh file somewhere (no need to commit to repository). | |
# 2. Run `chmod +x ./commands.sh` to allow permission to run the file. | |
# 3. Run `./commands.sh` to run the file. | |
env="@99999.develop" | |
sites=$(vip $env -- wp site list --field=url) | |
for site in $sites; do | |
vip $env -- wp user set-role michaelsumner administrator --url=$site | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment