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?

2 Answers 2


OK, solution was buried in the command help.

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


this works:

wp post update 271 ~/desktop/my-post.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.