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.
--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