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
1 answer

Categories not shown in admin after adding woocommerce products via wp wc cli

After the following script is run wp wc product create --name='b' --categories=32 --user=user Output is printed: Success: Created product 1370. But no categories are shown in wp-admin/WooCommerce->Products page for the newly added product. I have…
rok
  • 9,403
  • 17
  • 70
  • 126
1
vote
1 answer

WP-CLI installation over composer

I'm working on a wordpress skeleton for practice. I've got a Composer project and installed the wp-cli/wp-cli dependency. I want to create and run custom tasks with this wp-cli, for example to download the core of WordPress into this project. This…
Bas
  • 2,106
  • 5
  • 21
  • 59
1
vote
0 answers

regex SQL command for bulk URL update via wp-cli

We made URL permalink changes to WordPress sites, removing a no longer needed date in URLs and keeping just the domain, subfolder and postname. from /%year%/%monthnum%/%day%/%postname%/ to /%postname%/ While the 301 redirect is working perfectly we…
Nico P
  • 11
  • 2
1
vote
3 answers

How to enable theme on WordPress on Docker

I am using docker to run a develop environment for several wordpress themes / plugins. However, I can't figure out how to enable my themes automatically on container creation. Normally I would just use wp-cli for this. I have created a custom…
Daniel
  • 794
  • 10
  • 20
1
vote
2 answers

WP Core Update will leave wp-content alone?

Hi I have a wordpress website and want to update via wp-cli. Will the command wp core update leave the wp-content folder alone?
roshambo
  • 2,624
  • 6
  • 31
  • 54
1
vote
0 answers

SSH PHP - two parameters, one line

I want to run the following command in SSH: /usr/local/bin/php -f /home/path/www/host.com/wp-cli.phar --path=/home/path/www/dev.host.com core version But I get an info message from PHP. I think, that PHP recognize the "--path" but this is a…
mittererr
  • 125
  • 2
  • 10
1
vote
0 answers

Setting password for user via wp cli for MariaDB

How to set this password with wp cli CzTd#&h@!764DQP%$*gpW%*9)? I tried following, but it does not work: $ wp user update 123 --user_pass=CzTd#&h@!764DQP%$*gpW%*9) It won't recognize the special characters and barfs. Or, it cuts off the password at…
yaris
  • 23
  • 6
1
vote
1 answer

wp cli with crontab

am trying to execute wp cli from crontab i have done the following first i create .sh file contain the following: #!/bin/bash declare -a sites=('/home2/musite/public_html' ) for site in "${sites[@]}"; do /usr/local/bin/wp…
kashalo
  • 3,442
  • 2
  • 11
  • 28
1
vote
1 answer

I can't login to any of my WordPress development websites through the front end or WP-CLI

Recently my WordPress sites started acting up on the login page. When a user provides their credentials and hits enter, the page seems to reload. No feedback is given when the site reloads. Not even a faulty password message. When using the…
1
vote
0 answers

Using wp-cli, running any command other than --info returns html of site page

My hosting provider (inMotionHosting) installed wp-cli for me today (since my user account doesn't have the necessary permissions). When I go to my wp root (~/public_html) and run "wp --info" to ensure that it's working, I get the expected output:…
Marshall
  • 11
  • 3
1
vote
1 answer

Difficulties with python subprocess? (Unable to run wp-cli commands)

I am writing a simple Python script to help expedite bootstrapping my Wordpress installs and making use of wp-cli I'm stuck at a point where I'm trying to call wp core download via a subprocess: from subprocess import call call(["wp", "core…
waffl
  • 5,179
  • 10
  • 73
  • 123
1
vote
0 answers

can't use site when running $ wp db export

Using the WordPress command line interface (cli) when I export my db in preparation for a code deploy the site is not accessible when logged in for the duration of the export, which can take up to a minute. Is there a way to prevent the site from…
dwenaus
  • 3,206
  • 2
  • 27
  • 27
1
vote
1 answer

Changing siteurl and home option in Wordpress 4.4?

When restoring a backup using UpDraft Plus we used to login to the Wordpress instance and execute the following commands to change the siteurl and home options (using the wp-cli): wp option update home 'https://' wp option update siteurl…
Johan
  • 37,479
  • 32
  • 149
  • 237
1
vote
1 answer

How to run custom wp-cli commands using node-wp-cli?

I am using node-wp-cli to run WP-cli commands from Node.js. All inbuilt WP-cli commands works perfectly but I stuck while trying to run my custom WP-cli commands. Is there a way to to run my custom WP-Cli commands wp MyRegisteredCommand SubCommand…
1
vote
1 answer

WP-Cli Multisite Reports

I've got a multisite install and wp-cli set up and working. Optimally, what I'd need is a script to run that will generate a list of all of the sites on the multisite install along with the name of the active theme. I can figure out how to run this…
frogg3862
  • 491
  • 1
  • 4
  • 19