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
18
votes
3 answers

wp-cli: unable to run phpunit on MAMP

I'm following the plugin test setup/install instructions. I got wp scaffold plugin-tests my-plugin to run. But then at the next step when I try to run bash bin/install-wp-tests.sh wordpress_test root '' localhost latest I get the following…
emersonthis
  • 32,822
  • 59
  • 210
  • 375
9
votes
1 answer

wp-cli works in windows cmd, but not in Gitbash

I've installed the wp-cli using Git-bash, created the relevant PATH variables. I am now able type 'wp' into the Windows CMD and it works, but Git-bash doesn't recognize the command. What must I do get this working with Git-bash, and why doesn't it…
SGouws
  • 321
  • 1
  • 12
9
votes
3 answers

env: mysql: No such file or directory after `wp import`

I'm trying to import a database locally using wp db import databasename.sql but I get the following error: env: mysql: No such file or directory. Can anyone tell me how to resolve this?
user2753924
  • 465
  • 1
  • 5
  • 15
8
votes
2 answers

Run wp cli commands with cron job

Is it possbile to run WP cli commands with a cron job? Because I'm setting up a demo site, and want the site to be reset every 12 hour. And i thought that with wp cli, i can reset the installation. Import a file with the right content and so on. Or…
zarex360
  • 312
  • 4
  • 16
8
votes
3 answers

WP-CLI Toggle WP_DEBUG

I'm looking to toggle the WP_DEBUG value within a WP-CLI script. Is there any option doing so AFTER the wp-config.php file was created? (I know we can add extra PHP when creating the wp-config.php file, but once that's done, is there a way to turn…
tlt2w
  • 321
  • 1
  • 5
  • 17
7
votes
1 answer

WP-CLI file permission problems using Docker volumes

wordpress:cli container is not able to manipulate files on a volume shared with wordpress container. Here's the docker-compose.yml file I use to bootstrap WordPress: version: "3" services: wordpress: image: wordpress ports: ["80:80"] …
Mikhail Vasin
  • 2,421
  • 1
  • 24
  • 31
6
votes
2 answers

How to declare a global class so I don't get an error in Undefined type in intelephense in visual code

I'm new to visual studio code and intelephense. I'm working with WordPress and using a class called WP_CLI which's a system installed. So, if I'm not wrong, class WP_CLI is not in my path so I get Undefined type 'WP_CLI'.intelephense(1009) The ideal…
Miquel Adell
  • 1,132
  • 3
  • 11
  • 24
6
votes
3 answers

How to update wordpress translations via wp-cli

I'm using docker with the wordpress:cli image to perform many actions like updating, activating themes and plugins, etc, on the system. I come up with a brand new updated system that has everything in it I want, except for the translations.…
p0rter
  • 961
  • 2
  • 13
  • 28
6
votes
2 answers

(WP-CLI) Wordpress-Tests_Lib files not being created

I'm trying to do WordPress Plugin Testing on Ubuntu 14.04 and I'm going through the setup of WP-CLI but I'm not able to download the necessary files (includes/functions.php). This is the command I'm using: bash bin/install-wp-tests.sh wordpress_test…
Andrew C.
  • 421
  • 5
  • 15
5
votes
2 answers

Using Wordpress CLI image on Kubernetes

We have a custom docker image based on the official wordpress image that holds a custom theme that we are developing. We have CI/CD on this project using Gitlab CI and deploying branches on a bare-metal Kubernetes Cluster v1.6 for review. It works…
kmotsov
  • 51
  • 3
5
votes
1 answer

brew upgrade does not update to the latest version

I've noticed this happening a few times but this most recent instance is with wp-cli Running brew upgrade wp-cli does not download the latest version. $ brew upgrade wp-cli Error: homebrew/php/wp-cli 0.20.1 already installed $ brew info…
Jeff
  • 13,943
  • 11
  • 55
  • 103
4
votes
3 answers

--allow-root doesn't work running wp-cli in docker container

When using WP CLI in docker, I need to execute it as root. I need to add the flag --allow-root directly in .bashrc and I am trying to figure out why it doesn't work. FROM webdevops/php-dev:7.3 # configure postfix to use mailhog RUN postconf -e…
fromthestone
  • 1,217
  • 2
  • 13
  • 16
4
votes
3 answers

Is WP-CLI incompatible with Bitnami's Wordpress install on AWS Lightsail?

Using a new instance of Wordpress on Ubuntu, I installed wp-cli via these instructions. I tried downloading the .phar package, chmodding it, etc.I also tried installing a .deb package. In both cases I get the same errors when running wp plugin…
Luke Sheppard
  • 275
  • 1
  • 2
  • 13
3
votes
1 answer

why does wp core install say table 'wp_options' doesn't exist

Im using wp cli on my bedrock directory setup and have the files in the wp dir. now installing the core using wp core install --url=xxx --title=xxx --admin_user=xxx --admin_email=xxx --admin_password=xxx and gives PHP Fatal error: Uncaught…
thevikas
  • 1,618
  • 1
  • 14
  • 31
3
votes
0 answers

"wp i18n make-pot" can't generate translatable text

ISSUE: At theme folter, I'd tried running following commands: wp i18n make-pot . languages/text-domain-locale.pot wp i18n make-pot . languages/text-domain-locale.pot --slug=text-domain wp i18n make-pot . languages/text-domain-locale.pot…
1
2 3
13 14