Created
January 7, 2018 22:18
-
-
Save Vinsanity/38ac9a91aa85abf097a3a2a6652e8262 to your computer and use it in GitHub Desktop.
WP CLI post creation in docker
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 i in {1..10}; do bash -xc "curl http://loripsum.net/api/5 | wp --allow-root post create - --post_title='Post $i' --post_type=page --post_status=publish --post_category=$(wp --allow-root term list category --field=id --number=1 --offset=$(shuf -i 0-9 -n 1)) --tags_input='$(wp --allow-root term list post_tag --field=name --number=1 --offset=$(shuf -i 0-99 -n 1))'"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment