This plugin cleans up:
- Auto drafts
- Deleted comments
- Unapproved comments
- Spammed comments
- Deleted comments
- Orphaned post meta
- Orphaned comment meta
- Orphaned user meta
- Orphaned term meta
- Orphan term relationships
- Unused terms
- Duplicated post meta
- Duplicated comment meta
- Duplicated user meta
- Duplicated term meta
- Transient options
- Optimises database tables
- oEmbed caches in post meta
This plugin uses proper WordPress delete functions as much as possible instead of running direct delete MySQL queries.
Following delete functions are used:
WP-Sweep WP REST API Endpoints
GET /wp-json/sweep/v1/count/<Name>. Get the number of items that we will be sweeping.
GET /wp-json/sweep/v1/details/<Name>. Get the details of the items that we will be sweeping.
DELETE /wp-json/sweep/v1/sweep/<Name>. Runs sweep for that particular item.
WP-Sweep WP-CLI Commands
wp sweep --all. Runs sweep for all items.
wp sweep <Name>. Runs sweep for that particular item.
wp sweep <Name1> <Name2>. Run sweep for the selected items.
WP-Sweep Available Items:
I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not, feel free to use it without any obligations.
wp-sweepfolder to the
- Activate the
WP-Sweepplugin through the ‘Plugins’ menu in WordPress
- You can access
WP-Admin -> Tools -> Sweep
Coming soon …
Contributors and Developers
“WP-Sweep” is open source software. The following people have contributed to this plugin.Contributors
- NEW: Bump to WordPress 5.8
- FIXED: Replaced %_transient_% with %\_transient\_%. Escape _ in MySQL if not it is being used as a wildcard character. Props @janrenn.
- FIXED: Changed permissions check to
update_pluginswill return false when DISALLOW_FILE_MODS=true.
- NEW: Changed permission check to
update_pluginsfor better MultiSite compatibility.
- NEW: Bump min PHP version to 5.6.
- NEW: Added WP Rest API Endpoint support,
- FIXED: Follow as close as possible to WordPress Coding Standards
- NEW: Bump to WordPress 4.9
- NEW: Update README to incompatible plugins
- FIXED: Invalid plugin head ‘This plugin has an invalid header.’
- NEW: Support for Codeclimate
- FIXES: Uses
get_sites()on WordPress 4.6. This should fix deprecated notices.
- FIXES: Fixes translation placeholder count. Props @pedro-mendonca.
- FIXES: Use
manage_optionscapability as it conflicts with Admin Menu Editor on multisite installs. Props @EusebiuOprinoiu.
- NEW: Added wp_sweep_excluded_taxonomies filter to allow more than just link_category taxonomy
- NEW: Support for WP-CLI
- FIXES: Use custom query to delete Orphaned Term Relationship if wp_remove_object_terms() fails
- NEW: Delete ‘languages’ folder from the plugin
- NEW: Use translate.wordpress.org to translate the plugin
- FIXED: Works only with WordPress 4.4 because of new term meta
- FIXED: apply_filters() wrong arguments
- NEW: oEmbed caches in post meta Sweep
- NEW: Add POT file for translators
- NEW: Ajax Sweep All
- NEW: Ajax Sweeping
- NEW: View details of sweep
- NEW: Optimise DB sweep
- NEW: User hint and confirmation. Props @SiamKreative
- FIXED: Division by zero. Pros @barisunver
- FIXED: Use term_id for wp_remove_object_terms()
- FIXED: number_format_i18n() issues after sweeping
- NEW: Moved plugin location to WP-Admin -> Tools -> Sweep
- NEW: Add Deleted Post Sweep
- FIXED: Use forced_delete for wp_delete_post() and wp_delete_comment();
- FIXED: If orphaned meta has an object id of 0, use SQL query to delete
- Initial release