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

Problem setting up wp-cli ( bash: php: command not found )

So i'm trying to setup WP-CLI. I'm working with visual studio code and i installed Git Bash as terminal. Following WP-CLI installation guide i need to download a file: curl -O…
Biscuite
  • 85
  • 9
2
votes
2 answers

Trying to use woocommerce commands on wp-cli - getting `'wc' is not a registered wp command.`

I am working on an ubuntu machine and have installed the wp-cli globally using the official installation instructions. However, I can't run any woocommerce commands. They all trigger the same error: Error: 'wc' is not a registered wp command. this…
Judd Franklin
  • 570
  • 2
  • 5
  • 16
2
votes
1 answer

Install specific version of wp-cli package

I would like to install a specific version of a wp-cli package, e.g. wp package install geekpress/wp-rocket-cli@1.1 or if this does not work, then from a specific github commit wp package install…
user1383029
  • 1,685
  • 2
  • 19
  • 37
2
votes
1 answer

Use different php.ini for wp-cli.phar in XAMPP

I trying to use the wp-cli for wordpress in XAMPP: I downloaded wp-cli.phar into wordpress directory in XAMPP in ubuntu 16.04 /opt/lampp/htdocs/wordpress/ prompting php wp-cli.phar Your PHP installation appears to be missing the MySQL…
fabio
  • 594
  • 8
  • 18
2
votes
0 answers

Shell script for multiple wordpress with wp-cli

I am working on a shell script for execute wp-cli commands on all my wordpress. This is the script: cd "/var/www/vhosts" for domain in * do cd /var/www/vhosts/$domain HAS_HTTPDOCS=`find . -name httpdocs | wc -l` if test $HAS_HTTPDOCS-gt…
Gabri
  • 23
  • 4
2
votes
1 answer

Running wp-cli commands through SSH with phpseclib

I am automating installing multiple WordPress blogs on a server. Basically, I need to run multiple wp-cli commands. Using phpseclib and doing exec(), doesn't work... When I do something like: $ssh->exec('wp core download'); I will just…
DonVF
  • 33
  • 3
2
votes
1 answer

WP-CLI.phar "could not open input file"

I am trying to install wp-cli on windows using cygwin on windows 10. I used the directions on the official site: http://wp-cli.org/docs/installing/ using the 'installing on windows' instructions, not through composer. PHP is installed via XAMPP and…
Web Canvases
  • 51
  • 1
  • 5
2
votes
0 answers

Automatically install missing WordPress plugins?

Is there a way to tell WordPress to automatically install missing plugins from WordPress.org? Here's a scenario: Recovering a WordPress site from a major failure, only the active theme files, one custom plugin and the database dumpfile still exist.…
joemaller
  • 19,579
  • 7
  • 67
  • 84
2
votes
2 answers

WordPress plugin phpunit tests with dependencies

I suspect this would be a duplicate question or something with a very simple answer, but I've searched on every term I can come up with without any result. It's really simple; How can I unit test WordPress plugins that depends on other plugins? I'm…
Johan Palmfjord
  • 671
  • 4
  • 15
1
vote
1 answer

Ansible playbook to create WordPress users, using wp-cli tool

Using Ansible ver. core 2.13.3. This is the main task - name: Add WP admin users command: wp user create "{{ item.login }}" "{{ item.email }}" --role="{{ item.role }}" --user_pass="{{ item.pwd }}" --first_name="{{…
Roberto Jobet
  • 153
  • 4
  • 15
1
vote
1 answer

Lando tooling command syntax

I'm trying to set up a some tooling in my .lando.yml file to rapidly accomplish several tasks I do on every fresh Wordpress install. Everything's working great except for if I try to use the [--extra-php] option in the wp-cli and syntax as…
StudioAl
  • 192
  • 7
1
vote
1 answer

Permissions error on Ansible playbook updating WordPress with wp-cli tool

My hosts file ansible_user=ansible Playbook - name: WordPress setup hosts: servers gather_facts: false remote_user: ansible become: true roles: - wp Role's task - name: Update admin user's password command: wp user update admin …
Roberto Jobet
  • 153
  • 4
  • 15
1
vote
1 answer

Can WP-CLI modify database connection details in an existing wp-config file?

I am aware of WP-CLI's many database interaction functions via "wp db" and its functions for generating wp-config files via "wp config" - However I cannot find a way of using WP-CLI to modify existing database name, username and password settings in…
mayersdesign
  • 5,062
  • 4
  • 35
  • 47
1
vote
0 answers

Use `WP_CLI::add_command` with WordPress in Docker

I'm using WordPress in Docker with the following configuration: # /wp-dock/docker-compose.yml --- version: "3.3" services: db: container_name: ${APP_NAME}-wordpress-db image: "mysql:5.7" platform: linux/amd64 volumes: -…
SebastianOpperman
  • 6,988
  • 6
  • 30
  • 36
1
vote
2 answers

Detect a WordPress Installation

How to detect if a folder is having a WordPress installation or not ? WP-CLI does that and gives the error This does not seem to be a WP installation, and detects correctly if the directory has a WP install even if it is in any of the subfolders…
Anoop D
  • 1,522
  • 18
  • 25
1 2
3
13 14