Questions tagged [wp-cli]

wp-cli is a command line interface for WordPress.

wp-cli is a command line interface for WordPress.

You can easily install and update WordPress core, plugins, themes, and more. There's an active development community and additional commands are added regularly.

wp-cli is similar to drush, a tool for Drupal.

Document Source: http://codex.wordpress.org/wp-cli

197 questions
1
vote
0 answers

wp-cli, wordpress in docker-compose

I have this docker-compose file version: '2' services: php: image: wordpress:5.5-php7.4-apache volumes: - ~/.composer-docker/cache:/root/.composer/cache:delegated - ./htdocs/:/var/www/html:delegated ports: - '80:80' …
open-ecommerce.org
  • 1,763
  • 1
  • 25
  • 41
1
vote
0 answers

How do I pull a list of my Wordpress posts and their respective meta descriptions from the command line using WP CLI?

I am attempting to generate a list of all posts and their corresponding meta descriptions from the command line via ssh. I am able to connect to the host environment fine, but my command is only returning the last post and its meta description…
Wes
  • 23
  • 3
1
vote
1 answer

Pin a wordpress version on wp-cli

I am using wp-cli to download WordPress wp-cli --allow-root core download Is there some way to pin the WordPress version?
Rodrigo
  • 135
  • 4
  • 45
  • 107
1
vote
1 answer

WP CLI command to delete products from a specific category?

While the command to DELETE ALL CATEGORIES IS - wp term list product_cat --field=term_id | xargs wp term delete product_cat AND DELETE ALL THE PRODUCTS IS - wp post list —field=ID —post_type=product | xargs wp post delete —force what would be the…
1
vote
2 answers

docker compose - how to wait for a file to appear or a folder to appear before another service starts to build?

Background Information I am trying to dockerize a wordpress development environment. All the containers work except the wp-cli. When I docker compose up -d --build command, the wp-cli container attempts to start but then exits with this error…
dot
  • 14,928
  • 41
  • 110
  • 218
1
vote
1 answer

PHP Fatal error: Access level to FrontLocalBusiness::__construct() must be public (as in class LocalBusiness) while execute wp-cli command

I have created a parent class (LocalBusiness) and two child classes FrontLocalBusiness and AdminLocalBusiness to inheritance same properties and getter/setter from parent class and reduce amount of code. But i'm getting this error because…
Lorraine
  • 441
  • 5
  • 23
1
vote
0 answers

Running Gulp in a Node.js container, Error: Cannot find module but volumes seem right

I'm setting up an older WordPress theme into a Docker environment, going through the process of creating a docker-compose.yml file that lets me run various services in various containers. I've gotten very far… nginx, mysql running with php and ssl.…
1
vote
1 answer

Suffix added to plugin name when using wp plugin install

When I try to install the plugin https://github.com/wp-graphql/wp-graphql-woocommerce using: wp plugin install https://github.com/wp-graphql/wp-graphql-woocommerce/releases/download/v0.10.4/wp-graphql-woocommerce.zip The plugin will be added with a…
Dennie de Lange
  • 2,776
  • 2
  • 18
  • 31
1
vote
0 answers

WordPress's wpcli is using http and not https for plugin updates

I have a WordPress instance which when I attempt to update a plugin via the wpcli like so: wp plugin update akismet returns the following: Downloading update from http://downloads.wordpress.org/plugin/akismet.4.1.11.zip... Warning: Download failed.…
pi.
  • 1,441
  • 3
  • 19
  • 25
1
vote
1 answer

WP-CLI Error for Slider Revolution Plugin

When running commands for WP-CLI I see the following error message related to the Revolution Slider Plugin. Does anyone know a way to resolve this issue or go around it? Slider Revolution Plugin Version: 5.4.5 Error Message: PHP Fatal error: …
Candace Petty
  • 21
  • 1
  • 3
1
vote
1 answer

WP-CLI: Command chaining for deleting orders - Too many positional arguments error

While cloning & translating a WordPress site, I wanted to use WP-CLI to delete all orders like this: wp wc shop_order delete $(wp wc shop_order list --user=4 --field=id) --user=4. Unfortunately, I get errors Too many positional arguments. Complete…
Jeroen Strompf
  • 103
  • 1
  • 9
1
vote
0 answers

Can't execute 'mysql' on WP CLI docker container

I'm trying to run this project to automate my Wordpress installations. I have little knowledge about Docker, so I'm with difficulties to fix this error:
Talita Mota
  • 93
  • 1
  • 7
1
vote
1 answer

WP-CLI doesn't replace sitename

I am trying replace the site url via WP-CLI the command bellow: wp search-replace "https://oldUrl" "http://newUrl" --allow-root --all-tables --verbose However I am getting in the…
Dmitry Leiko
  • 3,970
  • 3
  • 25
  • 42
1
vote
1 answer

wp-cli in Docker fetches wrong database login credentials from wp-config

Here is my docker-compose.yml file: version: '3.9' services: db: image: mysql:5.7 restart: always command: [ '--disable-partition-engine-check', '--default_authentication_plugin=mysql_native_password', …
Rafaucau
  • 323
  • 2
  • 20
1
vote
1 answer

How to cancel WP All Import via WP CLI?

I have a large wp all import running from from command line daily but I would like to add a step to cancel/stop the previous import prior to running the new round. For whatever reason we may have had some dirty data, something happened on the server…