Skip to content

Instantly share code, notes, and snippets.

@fearlex
Created November 16, 2016 11:08
Show Gist options
  • Save fearlex/55ae4f19ba3fc9abfe005728080fb9a9 to your computer and use it in GitHub Desktop.
Save fearlex/55ae4f19ba3fc9abfe005728080fb9a9 to your computer and use it in GitHub Desktop.
WP CLI - Clean WP Defaults
This should be done by WP-CLI
wp post delete $(wp post list --name="$(wp eval 'echo sanitize_title( _x( "hello-world", "Default post slug" ) );')" --posts_per_page=1 --format=ids)
wp post delete $(wp post list --post_type=page --name="$(wp eval 'echo __( "sample-page" );')" --posts_per_page=1 --format=ids)
wp comment delete 1
wp option update blogdescription ""
wp plugin uninstall akismet
wp plugin uninstall hello-dolly
wp theme delete twentyfifteen
wp theme delete twentyfourteen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment