admin管理员组文章数量:1289910
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?
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?
Share Improve this question asked Mar 14, 2019 at 20:16 StevieDStevieD 2212 silver badges11 bronze badges2 Answers
Reset to default 3OK, 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
本文标签: wp cliAdding content from file with wp post create
版权声明:本文标题:wp cli - Adding content from file with wp post create 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741465306a2380278.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论