WP-CLI methods for get_current_blog_id, get_blog_details or $wpdb->prefix
WP-CLI methods for get_current_blog_id, get_blog_details or $wpdb->prefix
WP-CLI methods for get_current_blog_id, get_blog_details or $wpdb->prefix
A simple solution is: wp user reset-password $(wp user list –field=user_login) got that from forcing all plugins update after a minor takeover: wp plugin install $(wp plugin list –field=name) –force
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
In short, yes. However, if you run into an issue like custom fields or media hanging around, you could use: wp post meta delete
If no –path is passed, WP-CLI defaults to the current directory and looks for the wp-includes/version.php file. So, make sure that the directory you’re in has such a file: $ ls wp-includes $ cat wp-includes/version.php $ wp core version
The main problem is that your wp_reset_init() method deals with too many things. It’s looking at the $_POST request, it’s performing database queries, and it’s performing redirects. You need to separate your concerns so you end up with a new method which only performs the database reset, and which accepts parameters rather than using $_POST … Read more
Assume we have a custom post type movie (slug) and a custom taxonomy cast (slug). 1) To find all movies starring Emily Watson, stored with the term slug emily-watson, we can do: wp post list –post_type=movie –cast=emily-watson to list all her movies. 2) To find all movies featuring Elizabeth Taylor or Richard Burton , stored … Read more
mu-plugins don’t get activated. They’re activated just by being in that folder.
If you type wp help post create you will get all the info you need. Example: wp post create –post_type=page –post_status=publish –post_title=”A new page”
Thanks to a tip from milo in the comments above, I looked at this similar question. There is an answer provided by Laurent which basically gets the option using wp-cli, pipes it to an inline php program, makes the adjustments and then pipes it back to wp-cli. I took that idea and generalized it somewhat … Read more