lesterchan / wp-sweep

WP-Sweep allows you to clean up unused, orphaned and duplicated data in your WordPress. It also optimizes your database tables.
https://wordpress.org/plugins/wp-sweep/
152 stars 23 forks source link

Add sweep to remove several WordPress Defaults #29

Open bhubbard opened 8 years ago

bhubbard commented 8 years ago

Many sites leave the wordpress defaults, it might be good to add a sweep to check for them and remove them if they exist:

lesterchan commented 8 years ago

Unlikely I will add this in because I know some user keeps it. If there are more request for it, then I can consider.

bhubbard commented 8 years ago

If it helps, I work for a company and manage 200+ wordpress installs for clients. Most users only keep it because it is just there by default. For the majority of sites, they really should be deleting any default content.

szepeviktor commented 8 years ago

@bhubbard AFAIK 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

Right after installation.

fearlex commented 7 years ago

+1