Skip to content

Instantly share code, notes, and snippets.

@johnbillion
Created November 22, 2017 00:19
Show Gist options
  • Save johnbillion/002255c4d9ba90880367b3fa28593394 to your computer and use it in GitHub Desktop.
Save johnbillion/002255c4d9ba90880367b3fa28593394 to your computer and use it in GitHub Desktop.
Create a user account for each role on your WordPress site
# wp-cli: http://wp-cli.org/
wp role list --fields=role --format=csv \
| tail -n +2 \
| xargs -I {} wp user create "user-{}" "{}@example.com" --role={}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment