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

WP-CLI error in connecting to the database

This is a very common wp-cli error while using MAMP. I installed wp-cli, exported the php version MAMP is using to the WP_CLI_PHP variable as recommended by the instructions. The output of $ wp --info is: PHP binary:…
sulimmesh
  • 693
  • 1
  • 6
  • 23
1
vote
1 answer

How to configure circleci for Wordpress plugin

My project is a Wordpress plugin. I'm using circleci for continuous integration. I'm trying to set up my circle.yml file so that I can run my phpunit tests. I'm following this example to install Wordpress etc on the CI environment. Here's what…
emersonthis
  • 32,822
  • 59
  • 210
  • 375
0
votes
0 answers

wp-cli plugin update --all does not detect properly installed versions

using wp-cli plugin update --all results into: Available plugin updates: +--------------------+----------+---------+----------------+ | name | status | version | update_version…
cilap
  • 2,215
  • 1
  • 25
  • 51
0
votes
0 answers

Set POST parameter for WP ajax request that call from WP-CLI with do_action

I need to call ajax request function from WP-CLI with POST parameters so my question is how can I set post params in do_action mention that I am calling from WP-CLI. Example: add_action( 'wp_ajax_publish_submit', 'publish_submit' ); add_action(…
Krunal
  • 13
  • 2
0
votes
1 answer

WordPress CLI not finding core files

trying to use the WP CLI for search-replace but it is not working, I get this message below. Error: This does not seem to be a WordPress installation. Pass --path=`path/to/wordpress` or run `wp core download` I am running this command at the root…
chewie
  • 529
  • 4
  • 17
0
votes
1 answer

WP-CLI in Github Actions - "Error establishing a database connection."

I learn gh actions and try install wordpress via wp-cli. This is my workflow yml file: name: WordPress install on: [workflow_dispatch] jobs: run: runs-on: ${{ matrix.operating-system }} strategy: matrix: …
0
votes
1 answer

PHP Fatal Error: Failed opening required 'wp-salt.php' when running WP-CLI command as cron-job in crontab

This question is intended to serve as an information post for others to find, since I fortunately already discovered a solution. I tried to run a Wordpress-CLI command as a cron-job in crontab on a Cloudways server. The command runs without any…
0
votes
1 answer

'wp core install' loading never ends

I'm trying to build a wordpress project using wp-cli. I'm at the step of running: wp core install --url= --title= --admin_user= --admin_password= --admin_email= However,…
Tanh
  • 229
  • 1
  • 3
  • 6
0
votes
0 answers

Creating a Complete Website with WP-CLI: Adding Blocks like Columns, Images, and Videos

I have been working on a WordPress project using WP-CLI, and I have already set up the WordPress installation, created the menu, and added some pages and articles. However, I'm now wondering if it's possible to extend the functionality of WP-CLI to…
Kiwi
  • 44
  • 5
0
votes
0 answers

Wordpress -Migrating privilleges and content to a new account using wp-cli on a customised sute

I'm doing a migration of sso on my website, as a result a very few of the user accounts which were created long back ago are not acting as expected. Duplicate accounts are being created for these few accounts which are in old format. Since these are…
0
votes
0 answers

Regex Substitution to add a class to a specific html tag

I need to do a regex find-replace on the post content of a wordpress site in order to change all existing

tags to

tags. I then need to style the

tags to look like

tags. My plan was to add a class to the new

tags...

Jeremy Dixon
  • 101
  • 8
0
votes
0 answers

Creating a Form with WP-CLI Without Paid Plugins

I'm currently working on a project with WP-CLI and I'm in need of some guidance. For this project, I have to create a form, but I'm wondering if it's possible to achieve this without using paid plugins like Gravity Forms, Ninja Forms, or WPForms. Is…
Kiwi
  • 44
  • 5
0
votes
0 answers

How Do I List Wordpress Posts with ID Less Than Some Number with WP-CLI

The following WP-CLI command works great for getting all posts in a specific category, but I need to restrict it further to just those with an ID number less than a specific number. This is because I just exported a bunch of posts below a specific…
0
votes
1 answer

Wordpress CLI ignore duplicates

I am using WordPress CLI to import pages from one site to another. On the new site we rebuild 200 pages using ACF, these pages have the same slug as the original pages. I have 700 pages to import in total. is there anyway to ignore the…
Justin Blayney
  • 671
  • 1
  • 6
  • 23
0
votes
1 answer

How to pass string with spaces as argument to remote ssh command

I'm using Paramiko's exec_command() to run wp-cli commands on a remote server. Any command argument with spaces in it (no matter how I quote it) gives me a "Too many positional arguments" error. Here's sample code: sshClient.exec_command("wp option…
Matt Dietsche
  • 578
  • 5
  • 17