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

How to escape variable in bash for use as content of another script

I'm a creating WordPress wp-config.php file using wp-cli. I'm using the option --extra-php to append some php code. if ! [ -f $ROOT_DIR/wp-config.php ]; then runuser $WEB_USER -s /bin/sh -c "\ wp config create \ …
Bigbenny
  • 243
  • 1
  • 3
  • 10
0
votes
1 answer

How to run WP-CLI using bash script in linux

I'm having issue to run bash script setting up WP-CLI by it's own. Keep on getting wp no command found error. Please help. #!/bin/bash curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar chmod +x wp-cli.phar mv…
Thenesh
  • 13
  • 5
0
votes
1 answer

WordPress CLI error: Callable "Queue_Command" does not exist, and cannot be registered as `wp queue`

I have a server that hosts several WordPress sites. I use wpcli to update plugins in all of the sites, both manually and with a bash script. One site has just started throwing an error: Error: Callable "Queue_Command" does not exist, and cannot be…
0
votes
1 answer

wp-cli: how to render a post with shortcode in HTML

By default, “wp-cli get” does not render shortcodes. I want to render the shortcodes in HTML, to check what the end-user sees in her browser. How to do this?
Martin Monperrus
  • 1,845
  • 2
  • 19
  • 28
0
votes
1 answer

wp media regenerate --yes --only-missing stops running

I have a WordPress media library of 80k images. A number of older images need to be resized so I'm running wp media regenerate --yes --only-missing which seems to run fine. When it reaches a file that needs regenerating, it does it, and then…
Mike
  • 409
  • 1
  • 10
  • 24
0
votes
1 answer

Unable to copy to Amazon S3 using Full Administrator access and Full S3 access

I had a perfectly working instance of a WP-CLI wordpress plugin to upload files to S3 using the AmazonS3FullAccess policy. I migrated servers, and the copy started failing. "Failed to copy or write". I even included the Full Administrator access to…
Cogicero
  • 1,514
  • 2
  • 17
  • 36
0
votes
2 answers

OSX Sierra /usr/bin/env: ‘mysqldump’: No such file or directory

Having issues running a shell script that invokes mysqdump to import the database. This is for the importing of a WordPress database from production to local dev machine. It worked in the past. But something must have changed on my local MacOs Mac…
rhand
  • 1,176
  • 4
  • 17
  • 45
0
votes
0 answers

getting "segmentation fault" error while updating wordpress version using wp-cli

I am trying to update WordPress using wp-cli but after running the command getting "Segmentation fault" error. Please suggest a solution. following is the command that I used, wp core update after running the above command I get an error…
Rohitp
  • 3
  • 3
0
votes
1 answer

How to make the wp-cli work in wp-config file with conditional statements?

I am testing using the wp-cli to update my prod,dev,staging,test,and update sites for my domain. In mywp-config file has conditional statements then I get the following error: PHP Notice: Undefined index: HTTP_HOST in…
Amen Ra
  • 2,843
  • 8
  • 47
  • 85
0
votes
0 answers

Preg_replace not working in WP-CLI search-replace

I have to change filenames to images/filename and files/filename in Wordpress and I ended up using WP-CLI's search-replace function. Here is the shell command I execute: wp search-replace '(")(5\.jpg)' 'images/${2}' wp_postmeta --regex…
Mcload
  • 288
  • 8
  • 18
0
votes
1 answer

With WP CLI, wp config create generates error

I am using WP CLI to download and install WordPress using MAMP. I run into this error however when trying wp config create env: mysql: No such file or directory Couldn't find anything that addressed this error on developer.wordpress and other…
Dylan Nirvana
  • 13
  • 1
  • 7
0
votes
1 answer

'wp' is not recognized, but wp-cli works fine on Windows 10

I've installed wp-cli and expect to have the 'wp' command working. I have done this installation process on a near-identical machine just fine. When I enter 'wp' into Command Prompt (Admin), I get 'wp' is not a recognized as an internal or external…
Antonio Nogueras
  • 117
  • 1
  • 10
0
votes
1 answer

Using WP Cli ib localhost

I use Openserver + WP + WP Cli (local). And I want import all images (which I have uploaded in /wp-content/uploads) via WP Cli wp media import command. How I must add the path to the media files if they…
Orkhan Hasanli
  • 651
  • 13
  • 22
0
votes
1 answer

Plugin or other way to switch page in WordPress

I have a few pages in my wordpress website that I need to switch sometimes. Precisely imagine a page that talks about Monday. The same page needs to talk about Tuesday just the day after. The content is completely different from a day to…
0
votes
3 answers

wp-cli download wordpress core files without default wordpress themes twenty*

Using wp-cli on Windows all works fine. When I am in project root folder I like to download the WordPress core files skipping all the WordPress default themes twenty*. For that I use the command wp core download --skip-themes --debug however it…
lowtechsun
  • 1,915
  • 5
  • 27
  • 55