WP-Sweep

Description

This plugin cleans up:

  • Revisions
  • 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_delete_post_revision()
  • wp_delete_post()
  • wp_delete_comment()
  • delete_post_meta()
  • delete_comment_meta()
  • delete_user_meta()
  • delete_term_meta()
  • wp_remove_object_terms()
  • wp_delete_term()
  • delete_transient()
  • delete_site_transient()

Development

Credits

Donations

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.

Screenshots

  1. wp-sweep screenshot 1

    WP-Sweep Administrator Page (Before Sweeping)

  2. wp-sweep screenshot 2

    WP-Sweep Administrator Page (Swept)

Installation

  1. Upload wp-sweep folder to the /wp-content/plugins/ directory
  2. Activate the WP-Sweep plugin through the ‘Plugins’ menu in WordPress
  3. You can access WP-Sweep via WP-Admin -> Tools -> Sweep

FAQ

Coming soon …

Reviews

Excellent

Great plugin. I use this every time before export & migrate. Thank you so much.

Please consider changing this! (still very good)

Just another awesome plugin by this developer.

BUT: Dear lester chan, Please please please consider clarifying what those sweep buttons do, it just removed 300 of my categories after i clicked sweep unused terms! I assumed it will only remove things such as unused tags, not 300 categories that i added and wrote their description one by one!

Luckily i had a backup, otherwise, it would be a disaster (although i have to set their thumbnail again) , since some people may not know what does exactly a term mean!

You can’t imagine my face when i noticed this, i almost had a heart attack.

5/5 as always. (maybe 4.99 this time 😀 )

Excellent Utility

A while back this plugin saved me when my database had exploded in size with hundreds of thousands of transient entries (don’t ask). Now I keep it on all my sites and run it regularly to keep my databases nice and clean. Support is also stellar.

Great work . Thank you

Read all 65 reviews

Contributors & Developers

“WP-Sweep” is open source software. The following people have contributed to this plugin.

Contributors

“WP-Sweep” has been translated into these 3 locales: Portuguese, English (UK), English (Canada). Thank you to the translators for their contributions.

Translate “WP-Sweep” into your language.

Interested in development?

Browse the code or subscribe to the development log by RSS.

Changelog

1.0.10

  • FIXED: Invalid plugin head ‘This plugin has an invalid header.’

1.0.9

  • 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_options capability as it conflicts with Admin Menu Editor on multisite installs. Props @EusebiuOprinoiu.

1.0.8

  • NEW: Added wp_sweep_excluded_taxonomies filter to allow more than just link_category taxonomy
  • NEW: Support for WP-CLI wp sweep

1.0.7

  • FIXES: Use custom query to delete Orphaned Term Relationship if wp_remove_object_terms() fails

1.0.6

  • 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

1.0.5

  • FIXED: apply_filters() wrong arguments

1.0.4

  • NEW: oEmbed caches in post meta Sweep
  • NEW: Add POT file for translators

1.0.3

  • 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

1.0.2

  • FIXED: Use term_id for wp_remove_object_terms()
  • FIXED: number_format_i18n() issues after sweeping

1.0.1

  • 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

1.0.0

  • Initial release