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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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
350 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-...
1
vote
1answer
49 views

wp-cli commands do nothing, return nothing

I'm using wp-cli 1.5.1. My server is running php7.2. I'm not running suhosin. (Some people seem to think that suhosin may cause the same symptom) When I issue wpcli commands within a non-wordpress ...
1
vote
1answer
32 views

Resetting internal WordPress state during its cycle

Is there any api or system to reset internal cycle? I need this, cause when I use wp-cli in the shell I need to call for instance get_header more times in one session. The fast is when I call this ...
1
vote
1answer
128 views

Error updating WP-CLI

Below is the output from my attempt to update wp-cli on Windows 10. Clearly another version is available. Can someone please explain how to make this work? C:\Users\HP>wp cli update Error: You can ...
1
vote
1answer
730 views

WP CLI not importing media files

When I tried on localhost, it appears media files are imported. When I tried on real server (AWS LightSail) seems like images are not imported why might it be? I did not ask it to --skip The main ...
1
vote
1answer
99 views

WP-CLI can not find Url

When try use this command: php wp-cli.phar core install --url="http://example.com" the command fails. WordPress was installed, but WP CLI complains about an invalid siteurl and home because I have ...
3
votes
0answers
189 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
184 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
333 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
216 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
30 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 ...
1
vote
0answers
28 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
20 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
61 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
63 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
69 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
34 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
39 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
36 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
31 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
247 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
88 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
225 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
238 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
83 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
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
25 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
20 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
33 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
19 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
34 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
26 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
87 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
33 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
65 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
32 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
24 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
67 views

Configuring WP-CLI on Windows 10

I've installed php5-cli using bash, but Wordpress is using XAMPP's PHP 7 install. I've added /mnt/c/xampp/php to the PATH, and I've explicitly used export WP_CLI_PHP='/mnt/c/xampp/php' in .bashrc. ...
0
votes
0answers
95 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
51 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
34 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
60 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
398 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
493 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 ...
-1
votes
0answers
15 views

How to run php script on separate wordpress installs?

I made a simple command line php script to create posts. I would like the script to create posts on separate wordpress installs on the same server. Right now i just copied the script to both wordpress ...