admin管理员组文章数量:1332383
I have a WordPress Multisite (behind a firewall). I use WP-CLI for lots of things. But for some reason wp post list
does not work. wp post get
works. But wp post list
always yields the same output, like this:
As you can see, it's a table with no data. Does anyone have tips for debugging this issue?
As requested, I reformatted the command (made no difference) and added --debug. There is a lot of output!
Added post_type=page
:
I have a WordPress Multisite (behind a firewall). I use WP-CLI for lots of things. But for some reason wp post list
does not work. wp post get
works. But wp post list
always yields the same output, like this:
As you can see, it's a table with no data. Does anyone have tips for debugging this issue?
As requested, I reformatted the command (made no difference) and added --debug. There is a lot of output!
Added post_type=page
:
1 Answer
Reset to default 1(I'll post here @photocurio's answer, as it's hidden in the comments)
wp post list --post_type=page # will show only post-type=page
wp post list # will show only post-type=post
It's counter-intuitive command is also mis-documented, (which I hope to change), because:
- pages are posts.
- There's no "wp page list" command.
- The docs don't mention that the list is filtered by default
I'd naturally expect that a query will be inclusive by default, so I was surprised not to find a page list in wp-cli's docs.
本文标签: multisiteWPCLI can39t list posts
版权声明:本文标题:multisite - WP-CLI can't list posts 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742303002a2449364.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
--url
option at the end.wp post list --url=https://example/foobar
. Next add the--debug
option. Can you please edit your question and post the debug output as well? – norman.lol Commented Jun 1, 2019 at 16:07wp post list --post_type=page
return? And your site is amongwp site list
, yes? – norman.lol Commented Jun 3, 2019 at 5:48--post_type=page
parameter. Yes, wp site list returns all sites, and /home-therapies/ is on the list. – photocurio Commented Jun 3, 2019 at 20:06wp post get
is really working? – norman.lol Commented Jun 4, 2019 at 11:10