1

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:

screenshot of post list output

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!

enter image description here

Added post_type=page: enter image description here

  • I'd always put the --url option at the end. wp post list --url=https://example.com/foobar. Next add the --debug option. Can you please edit your question and post the debug output as well? – leymannx Jun 1 at 16:07
  • I didn't know about --debug. I'd paste the output, but it's 6000 characters too long. I can make a screenshot I guess. – photocurio Jun 3 at 2:25
  • Thank you! Everything looks good so far. What does wp post list --post_type=page return? And your site is among wp site list, yes? – leymannx Jun 3 at 5:48
  • Its about the same if I add the --post_type=page parameter. Yes, wp site list returns all sites, and /home-therapies/ is on the list. – photocurio Jun 3 at 20:06
  • That's really odd. And wp post get is really working? – leymannx Jun 4 at 11:10

Your Answer

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

Browse other questions tagged or ask your own question.