Adding content from file with wp post create

by StevieD   Last Updated March 14, 2019 21:08 PM

I thought I had seen something like this documented where you could pipe in content to a wp-cli arg like so:

wp post create --post_type=page --post_title="Blah" --post_content= < content.txt

I tried it and it didn't work, however. Is this possible?

Tags : wp-cli


Answers 1


OK, solution was buried in the command help.

Basically, just drop the --post_content arg and replace with the name of the file.

StevieD
StevieD
March 14, 2019 20:39 PM

Related Questions