Prompt user for input in WP CLI

I didn’t find any wp-cli utility either, but readline php function works just fine. PHPStorm warns me that ext-readline must be enabled in order to use it, but it seems like something that is always enabled in cli environment

WP-CLI – Return posts with matching meta key

Managed to figure this out, you can pass –meta_key and –meta_compare arguments like this… wp post list –fields=ID,mycustomfield –meta_key=mycustomfield ‘–meta_compare=active’ ID | mycustomfield ———————– 1 | active 2 | active 4 | active

Export list of users with first and lastname in WP-CLI

According to the documentation for wp user list, the fields argument accepts any valid WP_User_Query field. Thus, you can simply use wp user list –fields=first_name,last_name –format=csv to list all users with their first and last names. Of course you can add any other fields that you need. Note: You can get the documentation for each … Read more

WP-CLI works on non WP-CLI installed WordPress instance?

Yes, of course it does, as long as you also have SSH access to the instance (it won’t work over FTP). There’s nothing special about WordPress instances installed via WP-CLI. Commands such as wp core download and wp core install perform the same actions you would normally do when installing manually.

wp-cli import theme sample data

I just filed to a PR to the WPTest.io “theme test data”. In short it’s the following series of commands. You just have to replace The remote request provider. In the example it’s curl, but you could use wget or others as well The remote request target. In the example it’s the wptest.io XML/WRX file. … Read more

WP-CLI :: Cannot installing plugin as www-data

Based on the issue you’ve reported and preview of the shell bash, it looks as if you may have the wrong owner/group and permissions set for the website’s docroot. More than likely in your hosting environment, the entire ks320 directory currently does not have www-data as the group assignment. It can be owned by root … Read more