Created
November 19, 2018 16:13
-
-
Save herewithme/d42031393c35794bb80e43aec9477afd to your computer and use it in GitHub Desktop.
Set a role for each users for all sites for WordPress Multisite
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
for url in $( wp site list --allow-root --field="url" --url="https://XXX" ); | |
do | |
echo $url; | |
wp --allow-root user list --network --url="https://XXX" --field=id | xargs -I % wp --allow-root user set-role % administrator --url=$url | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment