Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

WP-CLI is a set of command-line tools for managing WordPress installations. You can update plugins, set up multisite installs and much more, without using a web browser.

5
votes
1answer
394 views

WP-CLI not recognizing commercial plugin updates

I'm running into an issue I haven't encountered before where WP-CLI is not recognizing plugin updates for commercial plugins. The plugin updates appear in my WordPress dashboard, but running ../wp-...
3
votes
0answers
221 views

Setting Up PHPUnit tests for WP development on Windows

I've been following the instructions in this article to try to set up some testing. I got as far as this instruction bash bin/install-wp-tests.sh wordpress_test root 'mypass' localhost latest before ...
3
votes
0answers
200 views

WP-CLI methods for get_current_blog_id, get_blog_details or $wpdb->prefix

I'm looking for some extra information about an mu site (--url) when attempting to export from a remote server to my local testing environment. One requirement for migration is the existing blog_id ...
2
votes
0answers
53 views

wp core install database connection error

I am new to wordpress but not to programming to please bear with me. I am trying to get a new wordpress project up and running locally using the wp-cli. But when I run the following command: wp core ...
2
votes
0answers
393 views

ACF image field to WordPress featured image

I am working with a CPT that is using ACF fields to manage content and the hero image. With the new Archive page template, I wish to have featured images alongside the content. Earlier we did not ...
2
votes
0answers
224 views

How to reset passwords for all users on a network using wp cli

I have a WP Network (sub directory), Sometime specially in case of security emergencies, it is generally preferred to change passwords for all users. I am looking for a way to reset passwords by ...
1
vote
0answers
26 views

WP-CLI cron on multisite using WP-Toolkit “succeded”, but callback not executed

I'm trying to trigger WordPress crons within a multisite using Plesks WordPress toolkit. Generally it is working, but the callback doesn't seemed to be executed. The command to execute crons: /...
1
vote
0answers
19 views

How to change user admin_color with WP CLI?

I like to know how I can change a users admin color theme with WP CLI.
1
vote
0answers
53 views

How to use wp db export and import together?

When I use WP-CLI I'm having some issues with the wp db export and wp db import commands. I have a local site on my desktop that I would like to migrate to my laptop so I can work on it. So I go on ...
1
vote
0answers
25 views

What could cause WP-CLI search-replace to not replace all instances of a string?

We're migrating a site from dev to production using wp-cli to replace all occurrences in the database for the url, just like in the search-replace example. (http://example.dev to https://example.com) ...
1
vote
0answers
85 views

wp-cli search is returning 'search' is not a registered subcommand of 'db'

I'm trying to search for a string like this: wp db search some-string and get: Error: 'search' is not a registered subcommand of 'db'. See 'wp help db'. wp help db lists 11 subcommands and search is ...
1
vote
0answers
79 views

Shortest script to install a WordPress webapp on Nginx

The following script is the one I use on Ubuntu-Nginx environments, to get a WordPress webapp up and running. I run it with a domain as an argument: bash ~/nwsm.sh example.com My question is what ...
1
vote
0answers
84 views

What tools respect `.distignore`?

You can create a plugin using the wp scaffold plugin PLUGINNAME command. It creates a bunch of files, including .distignore, .editorconfig, .gitignore, .travis.yml. Here is the contents of ....
1
vote
0answers
35 views

Can I check which users ran which updates?

We have a site that was previously updated to 4.8.0. Two of us who normally perform updates did not have the right permissions to run the 4.8.1 update. Using wp-cli wp core update Error: Could not ...
1
vote
0answers
40 views

cURL to install theme

I can't figure for the head of mine how to write a cURL that would install a theme for me once I got a session. Tried binding these headers, but with no success: _wpnonce _wp_http_refferer _themezip ...
1
vote
0answers
37 views

wp-cli fails on installing to subdomain

it's likely I missed something, but I just tried to use wp-cli to install Wordpress on a subdomain. After succesfully downloading, creating wp-config and calling the install procedure with: wp core ...
1
vote
0answers
32 views

Error: reassigning content to a different user is not supported on multisite

Objective:There's a need to remove a user from the multisite. Before doing so, user's content needs to be "transferred to another user" in a subdomain setting/specific site that's not the parent. ...
1
vote
0answers
285 views

Error when setting up phpunit tests with wp-cli scaffold

I am trying to figure out the setup for unit tests for wordpress plugins. I am using Ubuntu. So far I have: Local WordPress Installation WP-CLI up and running Installed phpunit used wp scaffold ...
1
vote
0answers
95 views

How do I add HTML code to a widget with wp-cli?

I want to add a YouTube video to a widget via wp-cli. The YouTube video is basically an iframe. When I execute the following command: wp-cli widget update text-1 --text='<iframe src="http://...
1
vote
0answers
28 views

For a specific theme, how do I build a list of all the possible theme modification names?

I'd like to use WP-CLI to modify a theme with wp theme mod. But, I do not know what all mods and their associated keys I can set with these commands. I've found that if I change a specific theme ...
1
vote
0answers
232 views

Wildcard for wp-cli search-replace

I'm trying to perform this search replace: wp search-replace 'http://stage.contraindicaciones.net/app/uploads/2015/{08,09}/' 'http://stage.contraindicaciones.net/app/uploads/2016/03/' But curly ...
1
vote
0answers
243 views

Update BackupBuddy with WP-CLI

I've written a script that basically loops through all of the WP sites on our server and updates everything: core, plugins, themes. It does, however run into one issue: It will not update BackupBuddy....
1
vote
0answers
87 views

How can I add an RSS widget using WP-CLI?

I can add an rss widget with this command: wp widget add rss my-sidebar --title=News --items=5 But when I add a URL parameter, like this: wp widget add rss my-sidebar --title=News --items=5 --url=...
0
votes
0answers
9 views

How to create a gallery using WP CLI?

I am hoping someone has some insight into how to create a gallery using WP CLI. Or at the very least get the IDs for the images imported using "wp media import". I've tried using --porcelain but it ...
0
votes
0answers
12 views

Can't install local plugin (zip) with wp-cli

I'm using WP-CLI with Docker, everything works fine but I can't seem to find a way to install plugins that are on my local drive. I'm following the instructions, and do : wp plugin install ../assets/...
0
votes
0answers
16 views

WP-CLI is unable to update password

I execute following command to change password for admin user from command line: wp user update admin --user_pass="mynewpassword" --allow-root I got following error message: WordPress database ...
0
votes
0answers
14 views

Faster Unit Testing in WordPress?

I'm using WordPress Unit Testing to develop a plugin. The Unit Testing is the one provided by WP-CLI with the wp scaffold plugin-tests command: https://make.wordpress.org/cli/handbook/plugin-unit-...
0
votes
0answers
23 views

WP-CLI with cPanel WHM root, where users do not have shell access

I'd like to run wp-cli for a bunch of WP installs that live in separate cPanel accounts, all under a WHM with root. System is CentOS6. I'd rather not give the user accounts shell access. Wp-cli ...
0
votes
0answers
16 views

Limit a user only to wp-cli only use

I have developed a docker wordpress solution and it uses wp-cli to do the required installation from shell. The installation itself required a user to get generated therefore I create a default admin ...
0
votes
0answers
67 views

How to get WP-CLI to work with bash scripts?

I have wp-cli installed on a WHM/cpanel server running multi-php versions with EasyApache4. I am able to use wp-cli when Im either in the directory where wp-config resides or I use the –path command ...
0
votes
0answers
22 views

Updating category ID using wp cli search-replace

I was wondering if search-replace using the old ID and the desired ID will work on a category and its relations. In order to avoid conflicts, would it be better to limit this at specific tables? I ...
0
votes
0answers
20 views

How come there is no error if I upgrade WordPress core after locking .htaccess permissions to 644?

How come there is no error if I upgrade WordPress core after locking .htaccess' permissions to 644? I upgrade WordPress this way basically: wp plugin update --all wp core update wp language core ...
0
votes
0answers
10 views

WP CLI Update Payment Gateway Settings Doesn't Save

I can enable payment gateways with below command: wp wc payment_gateway update paypal --user=1 --enable=true path=/www #This works well However, when I try to update a setting of the gateway, it ...
0
votes
0answers
51 views

WP-CLI - How to install a plugin from a remote server

I'm trying to install a plugin that i downloaded and i host on my server inside a vagrant box to use locally. I'm running this command to try to install it: wp plugin install https://example.com/...
0
votes
0answers
22 views

Unable to import complete data remote wp-cli wordpress

I wanted to make process of wordpress site migration automate everything works fine but i am unable to import complete site from remote to local.Might be something wrong in code, any help will be ...
0
votes
0answers
42 views

Warning Message is get displayed after executing wp-cli command using linux crontabs

I wanted to update WordPress core version and all plugins every week, so for this I install WP-CLI on my WordPress installed server. So, for doing this I wrote wp-cli command in Linux shell script as ...
0
votes
0answers
32 views

Moving Featured Images

I have been moving around 40k posts from one site to another (different domains), using wp cli, all went well, but it seems the featured image weren't imported. I have now uploaded all media files ...
0
votes
0answers
110 views

How to update subsite's siteurl in WordPress Multisite configuration using WP cli

I can easily update the site url of a subsite by navigating to Network Admin->Sites and change in the particular subsite's siteurl. However, i would like to programmatically change the siteurl using ...
0
votes
0answers
40 views

How to fix “Not enough memory” on Windows 7 and PHP 7.2.0 (cli)

I installed wp-cli tool on windows 7 but when I type wp --help. It noticed error "Out of memory". Pleased help me know WHY and how to fix it?
0
votes
0answers
94 views

wp_remote_request does not return a response from from server when ran as Cron

Problem: wp_remote_get/wp_remote_request of a specific https target fails to return a response unless ran via WP_CLI function. $wp_remote_args => array( 'timeout' => 5, 'sslverify' =>...
0
votes
0answers
33 views

Make WordPress more like Jekyll (using wp-cli package?)

I'd like to create and edit WordPress posts on my local file system and then "push" them to my WordPress blog just as if I'd added them directly from WordPress' web interface. Is there any way to do ...
0
votes
0answers
27 views

WP-CLI: Installing Subdomain in non-root folder

Everytime i try to install wordpress in a regular folder with a subdomain pointing on it, it fails my installation by adding the name of the folder to the URL. Example: I tried to install a site for ...
0
votes
0answers
103 views

WP Cli + xargs fails

I'm trying to regenerate thumbnails using seq but I get signal 9 error. here is my command: $ seq 146280 146300 | xargs wp media regenerate --url='http://www.my-site.com' Found 15 images to ...
0
votes
0answers
62 views

WP CLI - Pass Query / URL Variable to Cron?

Is there a way to pass URL / Query variables when you run: wp cron event run using WP CLI? I have a specific event and ID I want to pass to it but don't know if it is possible or how to pass GET ($...
0
votes
0answers
37 views

Wp-cli from a plugin?

WP-CLI is a set of command-line tools for managing WordPress installations. You can update plugins, configure multisite installs and much more, without using a web browser. Please note that WP-CLI is ...
0
votes
0answers
32 views

WP CLI update in main and subfolders

I have many sites install in sub folder, the structure look like below: /public_html/ /public_html/site1-directory /public_html/site2-directory How I can run single cli to update core for /...
0
votes
0answers
51 views

Can I use WP-CLI from a remote computer?

Does WP-CLI need to be used and installed on my server which has WordPress installed, and as such, I would need to ssh into that server in order to use it?
0
votes
0answers
63 views

How to prevent WP-CLI shell from exiting when an exception occurs?

I am using WP-CLI shell to quickly debug some code, but every time I run into a fatal exception (e.g. undefined constants/functions) the shell exits and I lose my shell session. Is there a way to ...
0
votes
0answers
457 views

PHP warning are displaying when using WP CLI

I'm running WP CLI 0.25.0 on Debian, PHP 7.0. I keep getting the PHP warnings displayed. In php.ini used for cli I have set error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_WARNING ...
0
votes
0answers
515 views

All plugins deactivated. What could cause this?

I have an AWS server running four WordPress sites. All plugins have been deactivated on one of the sites and I cannot enable them. When I try enabling them in bulk, or individually, there is no ...