WP CLI allowed fields?

The list of fields is available on the wp post list page. These fields will be displayed by default for each post: ID post_title post_name post_date post_status These fields are optionally available: post_author post_date_gmt post_content post_excerpt comment_status ping_status post_password to_ping pinged post_modified post_modified_gmt post_content_filtered post_parent guid menu_order post_type post_mime_type comment_count filter url

wp-cli for Creating page-template

wp-cli is not a development tool, it is a server admin tool, as such all the scaffold stuff there is…. for lack of better word, unneeded bloat. It is unlikely to reflect best practice, especially if your copy is old. In the specific case of page templates, there is really nothing worth “scaffolding” the easiest … Read more

A shorter way to automatically update WordPress?

If you have this statement (by default) in your wp-config file define( ‘WP_AUTO_UPDATE_CORE’, true ); Then WP core files are automatically updated for you. This assumes that you have traffic to your site (if nobody ever visits your site, the updates won’t happen.) So your solution is actually causing more work by the server, and … Read more

How to delete a single post using wp cli in command line?

Please read the docs. It’s wp post delete POST-ID. # Delete post skipping trash $ wp post delete 123 –force Success: Deleted post 123. # Delete all pages $ wp post delete $(wp post list –post_type=”page” –format=ids) Success: Trashed post 1164. Success: Trashed post 1186. # Delete all posts in the trash $ wp post … Read more