0

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?

1

OK, solution was buried in the command help.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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