WP WPQuery, not running properly in WP CLI
WP WPQuery, not running properly in WP CLI
WP WPQuery, not running properly in WP CLI
How to get all posts related to a term with WP-CLI?
Regenerate thumbnails unexpected resolution (96 x 96)
I’ve run into the same problem. It worked on Saturday. This Monday it auto-upgraded to 7.0.10, now it breaks. I don’t have a fix, so here’s more information that MAY help debugging? I’m on CentOS7 with cPanel’s EA brand of PHP. PHP 7.0.10 (cgi-fcgi) (built: Aug 22 2016 20:34:53) Copyright (c) 1997-2016 The PHP Group … Read more
The most typical reason is that your web server and WP CLI use different PHP runtimes. Then, for example, if you have Object Cache enabled web server might have proper access to it, but command line PHP might not. This can create various out of sync kinks, if I remember right WP CLI have added … Read more
Adding the following lines to the top of your script, as recommended in Github issue, should report any runtime errors: ini_set( ‘display_errors’, 1 ); error_reporting(E_ALL); However, it will not report syntax errors, which is a big headache as you try to write your script. This is my workaround for that: Add following line to bottom … Read more
Caching plugins usually require some additional manual work in moving some files from the plugin directory to the root of the wp-content directory and maybe some wp-config.php changes. It is possible that the plugin fails to initialize due to that.
After opening issue on woocommerce github page and authors reaction. The solution is wp wc product create –name=”Product Name” –categories=”[ { “id” : 21 } ]” –user=admin
Actually, I figured out how to do this, and it’s actually really easy to do! Which is awesome because I think it’s a great simple way to work! First up, you don’t want to change the PATH for PHP in bash. So you’ll want to remove that. Instead, what you are doing is using bash … Read more
(I’ll post here @photocurio’s answer, as it’s hidden in the comments) wp post list –post_type=page # will show only post-type=page wp post list # will show only post-type=post It’s counter-intuitive command is also mis-documented, (which I hope to change), because: pages are posts. There’s no “wp page list” command. The docs don’t mention that the … Read more