`wp post list` ignored `–url` argument in multisite install
-
While trying to remove posts from the site with url
https://staging.gilroydispatch.com
in WordPress 5.2.3 in multisite, I noticed the script inadvertently started removed posts from the main/default site which ishttps://staging.pajaronian.com
When I hit Ctrl+C it had already removed around 1000 posts from the wrong site. Lucky it was not released so no big damage was done, however because of this I can’t trust on wp cli to batch remove anymore sadly. Is this a known bug that I couldn’t find? Does this only happens to me? Did I do something wrong? Will applications ever work as we expect? Will the world hunger and wars end some day?Here is the command I used:
wp post delete --force --url=https://staging.gilroydispatch.com $(wp post list --url=https://staging.gilroydispatch.com --format=ids)
If I mistaken the url, it won’t run saying the site does not exist, so that’s why I thought it’d run for a specific site and not run as if I didn’t supply the argument.
Wp Info if of any use:
OS: Linux 3.10.0-962.3.2.lve1.5.26.2.el7.x86_64 #1 SMP Tue Jul 23 08:31:06 EDT 2019 x86_64 Shell: /bin/sh PHP binary: /opt/alt/php72/usr/bin/php PHP version: 7.2.23 php.ini used: /opt/alt/php72/etc/php.ini WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli WP-CLI vendor dir: phar://wp-cli.phar/vendor WP_CLI phar path: ------- removed -------- WP-CLI packages dir: WP-CLI global config: WP-CLI project config: WP-CLI version: 2.0.0
- This topic was modified 5 years, 5 months ago by .
- This topic was modified 5 years, 5 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘`wp post list` ignored `–url` argument in multisite install’ is closed to new replies.