wp search-replace returns no output on Multisite installation
Have a look at your PHP errors. I’ve seen WP CLI fail like that because PHP fatals out.
Have a look at your PHP errors. I’ve seen WP CLI fail like that because PHP fatals out.
You are trying to add a subcommand to a non-existing command posts according to the error message. Modify it to a single word command like posts-scan or add a subcommand to an existing command, like post.
We tried with couple of plugins , but there isn’t any with option to bulk delete images by month or year. If you have access to wp-cli you can try to delete attachments by year and month with: wp post delete $(wp post list –post_type=”attachment” -—year=2016 -—monthnum=12 –format=ids) or just by year with: wp post … Read more
This question seems to be really old. No Composer involved now a days to install wp-cli. Just curl, chmod, and copy the file as indicated in http://wp-cli.org/ (: Now, if anyone wants to add a specific include_path for wp-cli to be aware of (which is how I found this Q) there’s 2 options: set a … Read more
Since the program can be run from the command-line and no response is needed, using exec() does the job. http://php.net/manual/en/function.exec.php The first example in the comments (below) was used to run my command-line program on payment submission. The program launches and the user never awaits its completion. Shouldn’t matter if your machine is Windows or … Read more
In short: YES, is a big time threat. Explained: Little time has passed since I asked this question but now I have found that the safer and most useful file permissions for wordpress are the following: Directories: 755 Owner can: Read, write and execute. Group and public can: Read and execute. Read-only files:644 Owner can: … Read more
bash script wp-cli search-replace 0 replacements, but command-line 3000+
I’d love any improvements, or hopefully this helps someone. wp post delete $(wp post list –post_type=”post” –format=ids);wp post delete $(wp post list –post_type=”page” –format=ids);wp plugin delete –all;wp theme delete $(wp theme list –status=inactive –field=name);wp widget delete $(wp widget list sidebar-1 –fields=id);wp widget delete $(wp widget list sidebar-2 –fields=id) edit: added removal of default widgets in … Read more
Using the WP CLI to output the HTML results of calling a post?
Bulk update published posts date randomly using wp-cli?