很少有内置的wp cli从文档生成命令:
# Generate posts with fetched content.
# See https://developer.wordpress.org/cli/commands/post/generate/
$ curl -N http://loripsum.net/api/5 | wp post generate --post_content --count=10
# Add meta to every generated term.
# See https://developer.wordpress.org/cli/commands/term/generate/
$ wp term generate category --format=ids --count=3 | xargs -d \' \' -I % wp term meta add % foo bar
# Add meta to every generated comment.
# See https://developer.wordpress.org/cli/commands/user/generate/
$ wp comment generate --format=ids --count=3 | xargs -d \' \' -I % wp comment meta add % foo bar
# Add meta to every generated users.
# See https://developer.wordpress.org/cli/commands/user/generate/
$ wp user generate --format=ids --count=3 | xargs -d \' \' -I % wp user meta add % foo bar
您还可以编写自己的wp cli包。
还有一些定制的wp cli包,如wp-cli-faker (我与此无关)。