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

Replace pictures via WP CLI

I have a multisite in which more than 100 sites. I want to raise the site for development. Pictures decided not to download because they take up too much space. I want to replace pictures with a placeholder using the console: wp search-replace…
WP Punk
  • 1,344
  • 9
  • 25
0
votes
2 answers

WP-CLI: STDOUT error when called in CRON (crontab)

Little help or guidance. Server is CentOS 7 - with WHM/CPanel installed. Command: $(which php) $(which wp) core update --require=/opt/wp-cli-pre.php --path=/home/USER/public_html/ The contents of /opt/wp-cli-pre.php
RayJ
  • 734
  • 11
  • 12
0
votes
0 answers

Speed up slow WP CLI

No matter what command I execute it takes about 1,3 seconds to get it done. So it seems that there some kind of bottleneck. When I pass --skip-plugins it will be faster about. It will take about 0,9 seconds. What does --skip-plugins actually do? I…
Trevor Hector
  • 609
  • 1
  • 6
  • 18
0
votes
0 answers

WordPress automated script to sync Staging and Production Database on daily basis

I am looking for an automated way to sync my Staging database with the Production database on a daily basis. There are multiple plugins that provide manual one-click solutions. Has anyone here found any automated way to solve this, for eg - a…
Ajay Maurya
  • 563
  • 1
  • 4
  • 13
0
votes
0 answers

How to add missing trailing slash on all links (WPCLI or MySQL)

My website has hundreds of posts containing some links without the ending slash / I want to be be able to find all these links and add the trailing slash / For example /dir/this-page becomes /dir/this-page/ Ideally I would prefer to do this via…
ianhman
  • 73
  • 1
  • 12
0
votes
1 answer

How to specify --downloads option?

I am trying to figure out how to create downloadable woocommerce products. Trouble is syntax for the --downloads argument for $ wp wc product create. It appears that the downloads argument should be one ore more objets having "id", "name", "file"…
0
votes
0 answers

WP-CLI on existing installtions?

When I try to get the version number of an existing installation that wasn't created by WP CLI I get an error: wp core version --path='/Users/plee/clients/burger_king/wp' The error message is WP-CLI needs WordPress 3.7 or later to work properly.…
Trevor Hector
  • 609
  • 1
  • 6
  • 18
0
votes
1 answer

wp core install cannot connect to database with WP-CLI

I don't know why it's doing this but for some reason, when I try to install WordPress with WP CLI with wp core install, it cannot complete and throws the Error: Error establishing a database connection error. I've checked everything and I'm not sure…
ultraloveninja
  • 1,969
  • 5
  • 27
  • 56
0
votes
1 answer

Using WP-CLI on Plesk to Update Media w/ Custom Image Size, Not Working

I'm attempting to use WP-CLI's media regenerate feature to update a website with 60k worth of images that I had to add a new image size for. However, I'm not seeing it list the sizes correctly compared to what I've written, and what Regenerate…
HarrisonFM
  • 47
  • 6
0
votes
1 answer

How to import WordPress attachment paths and create new attachment ids without downloading images

I am trying to import tens of thousands of posts from Wordpress Site 1 into Wordpress Site 2. I used WP-CLI to export and import. For import, i used the "--skip=attachment" flag, as the tens of thousands of images files were being downloaded. We are…
DanL
  • 91
  • 1
  • 9
0
votes
1 answer

Wordpress path in bash script point to symlink?

I have a bash script on Ubuntu server that is used to do database backups via WP-CLI and use Dropbox Uploader to backup to Dropbox. The script has been working for years on our sites that don't use the Roots Bedrock stack. We recently started use…
0
votes
1 answer

Wordpress - polylang in command launch post traduction

Today I need some help with Wordpress, as is is far from being my cup of tea. Currently, I'm tring to create a plugin to export translation from post in a xliff file then reimport this xliff file to set the translation. This plugin we only be used…
LinChan
  • 417
  • 1
  • 5
  • 17
0
votes
1 answer

Update WP CLI Package

Seems easy enough, referencing this question im trying to update the admin-command package. What i've tried: uninstalling the package altogether, and installing it fresh by: wp package uninstall wp-cli/admin-command installing the package: wp…
DGRFDSGN
  • 575
  • 1
  • 8
  • 20
0
votes
2 answers

Local Worpdress website can not connect to its database

I am trying to install a Wordpress site on a local server (Ubuntu 16.04 in a docker container). Xampp is installed and running, and I have created a database and a username with proper rights: mysql -uroot -e "CREATE USER 'localuser'@'localhost'…
Sulli
  • 763
  • 1
  • 11
  • 33
0
votes
1 answer

Count instances of a given widget that are active

I'm looking for a way to count active instances of a given widget across a WordPress Network. For instance, I have Widget A. I need to count how many times Widget A exists in any sidebar on any site within the network. Obviously WP-CLI is probably…
mrpritchett
  • 75
  • 1
  • 1
  • 11