{"id":1208,"date":"2015-02-25T04:45:14","date_gmt":"2015-02-25T04:45:14","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wp-sweep\/"},"modified":"2025-04-16T00:58:51","modified_gmt":"2025-04-16T00:58:51","slug":"wp-sweep","status":"publish","type":"plugin","link":"https:\/\/mk.wordpress.org\/plugins\/wp-sweep\/","author":259,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.8","stable_tag":"1.1.8","tested":"6.8.5","requires":"4.6","requires_php":"","requires_plugins":null,"header_name":"WP-Sweep","header_author":"Lester 'GaMerZ' Chan","header_description":"","assets_banners_color":"e9eaec","last_updated":"2025-04-16 00:58:51","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/lesterchan.net\/site\/donation\/","header_plugin_uri":"https:\/\/lesterchan.net\/portfolio\/programming\/php\/","header_author_uri":"https:\/\/lesterchan.net","rating":4.7,"author_block_rating":0,"active_installs":100000,"downloads":1776991,"num_ratings":139,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.10":{"tag":"1.0.10","author":"GamerZ","date":"2017-02-28 02:36:05"},"1.0.11":{"tag":"1.0.11","author":"GamerZ","date":"2017-11-23 03:34:35"},"1.0.12":{"tag":"1.0.12","author":"GamerZ","date":"2017-11-23 03:40:08"},"1.0.5":{"tag":"1.0.5","author":"GamerZ","date":"2015-11-26 02:19:24"},"1.0.6":{"tag":"1.0.6","author":"GamerZ","date":"2015-12-10 02:15:47"},"1.0.7":{"tag":"1.0.7","author":"GamerZ","date":"2016-08-31 03:57:57"},"1.0.8":{"tag":"1.0.8","author":"GamerZ","date":"2016-08-29 05:36:13"},"1.0.9":{"tag":"1.0.9","author":"GamerZ","date":"2017-02-28 02:37:09"},"1.1.0":{"tag":"1.1.0","author":"GamerZ","date":"2018-12-19 04:45:41"},"1.1.1":{"tag":"1.1.1","author":"GamerZ","date":"2019-10-23 03:27:52"},"1.1.2":{"tag":"1.1.2","author":"GamerZ","date":"2020-05-20 01:48:36"},"1.1.3":{"tag":"1.1.3","author":"GamerZ","date":"2020-12-16 07:12:18"},"1.1.5":{"tag":"1.1.5","author":"GamerZ","date":"2023-04-27 05:49:05"},"1.1.6":{"tag":"1.1.6","author":"GamerZ","date":"2023-04-27 01:35:12"},"1.1.7":{"tag":"1.1.7","author":"GamerZ","date":"2023-04-27 05:48:01"},"1.1.8":{"tag":"1.1.8","author":"GamerZ","date":"2025-04-16 00:58:51"}},"upgrade_notice":{"":"<p>N\/A<\/p>"},"ratings":{"1":10,"2":1,"3":1,"4":1,"5":126},"assets_icons":{"icon.svg":{"filename":"icon.svg","revision":1098912,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":1098912,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":1098912,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.10","1.0.11","1.0.12","1.0.5","1.0.6","1.0.7","1.0.8","1.0.9","1.1.0","1.1.1","1.1.2","1.1.3","1.1.5","1.1.6","1.1.7","1.1.8"],"block_files":[],"assets_screenshots":{"screenshot-01.png":{"filename":"screenshot-01.png","revision":1108497,"resolution":"1","location":"assets","locale":""},"screenshot-02.png":{"filename":"screenshot-02.png","revision":1108497,"resolution":"2","location":"assets","locale":""}},"screenshots":{"1":"WP-Sweep Administrator Page (Before Sweeping)","2":"WP-Sweep Administrator Page (Swept)"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[4657,4658,3786,1452,17745],"plugin_category":[44,52,57],"plugin_contributors":[77620],"plugin_business_model":[],"class_list":["post-1208","plugin","type-plugin","status-publish","hentry","plugin_tags-clean","plugin_tags-clean-up","plugin_tags-cleanup","plugin_tags-optimize","plugin_tags-sweep","plugin_category-discussion-and-community","plugin_category-performance","plugin_category-taxonomy","plugin_contributors-gamerz","plugin_committers-gamerz"],"banners":{"banner":"https:\/\/ps.w.org\/wp-sweep\/assets\/banner-772x250.jpg?rev=1098912","banner_2x":"https:\/\/ps.w.org\/wp-sweep\/assets\/banner-1544x500.jpg?rev=1098912","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/wp-sweep\/assets\/icon.svg?rev=1098912","icon":"https:\/\/ps.w.org\/wp-sweep\/assets\/icon.svg?rev=1098912","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/wp-sweep\/assets\/screenshot-01.png?rev=1108497","caption":"WP-Sweep Administrator Page (Before Sweeping)"},{"src":"https:\/\/ps.w.org\/wp-sweep\/assets\/screenshot-02.png?rev=1108497","caption":"WP-Sweep Administrator Page (Swept)"}],"raw_content":"<!--section=description-->\n<p>This plugin cleans up:<\/p>\n\n<ul>\n<li>Revisions<\/li>\n<li>Auto drafts<\/li>\n<li>Deleted comments<\/li>\n<li>Unapproved comments<\/li>\n<li>Spammed comments<\/li>\n<li>Deleted comments<\/li>\n<li>Orphaned post meta<\/li>\n<li>Orphaned comment meta<\/li>\n<li>Orphaned user meta<\/li>\n<li>Orphaned term meta<\/li>\n<li>Orphan term relationships<\/li>\n<li>Unused terms<\/li>\n<li>Duplicated post meta<\/li>\n<li>Duplicated comment meta<\/li>\n<li>Duplicated user meta<\/li>\n<li>Duplicated term meta<\/li>\n<li>Transient options<\/li>\n<li>Optimizes database tables<\/li>\n<li>oEmbed caches in post meta<\/li>\n<\/ul>\n\n<p>This plugin uses proper WordPress delete functions as much as possible instead of running direct delete MySQL queries.<\/p>\n\n<p>Following delete functions are used:<\/p>\n\n<ul>\n<li>wp_delete_post_revision()<\/li>\n<li>wp_delete_post()<\/li>\n<li>wp_delete_comment()<\/li>\n<li>delete_post_meta()<\/li>\n<li>delete_comment_meta()<\/li>\n<li>delete_user_meta()<\/li>\n<li>delete_term_meta()<\/li>\n<li>wp_remove_object_terms()<\/li>\n<li>wp_delete_term()<\/li>\n<li>delete_transient()<\/li>\n<li>delete_site_transient()<\/li>\n<\/ul>\n\n<p>WP-Sweep WP REST API Endpoints\n* <code>GET \/wp-json\/sweep\/v1\/count\/&lt;Name&gt;<\/code>. Get the number of items that we will be sweeping.\n* <code>GET \/wp-json\/sweep\/v1\/details\/&lt;Name&gt;<\/code>. Get the details of the items that we will be sweeping.\n* <code>DELETE \/wp-json\/sweep\/v1\/sweep\/&lt;Name&gt;<\/code>. Runs sweep for that particular item.<\/p>\n\n<p>WP-Sweep WP-CLI Commands\n* <code>wp sweep --all<\/code>. Runs sweep for all items.\n* <code>wp sweep &lt;Name&gt;<\/code>. Runs sweep for that particular item.\n* <code>wp sweep &lt;Name1&gt; &lt;Name2&gt;<\/code>. Run sweep for the selected items.<\/p>\n\n<p>WP-Sweep Available Items:\n* revisions\n* auto_drafts\n* deleted_posts\n* unapproved_comments\n* spam_comments\n* deleted_comments\n* transient_options\n* orphan_postmeta\n* orphan_commentmeta\n* orphan_usermeta\n* orphan_termmeta\n* orphan_term_relationships\n* unused_terms\n* duplicated_postmeta\n* duplicated_commentmeta\n* duplicated_usermeta\n* duplicated_termmeta\n* optimize_database\n* oembed_postmeta<\/p>\n\n<p>WP-Sweep is not compatible with the following plugins:\n* <a href=\"https:\/\/wordpress.org\/plugins\/custom-fonts\/\">Custom Fonts<\/a>\n* <a href=\"https:\/\/elementor.com\/features\/popup-builder\/\">Elementor Popup Builder<\/a>\n* <a href=\"https:\/\/wordpress.org\/plugins\/mailpress\/\">MailPress<\/a>\n* <a href=\"https:\/\/wordpress.org\/support\/plugin\/ml-slider\/\">Meta Slider<\/a>\n* <a href=\"https:\/\/wordpress.org\/plugins\/polylang\/\">Polylang<\/a>\n* <a href=\"https:\/\/revolution.themepunch.com\/\">Slider Revolution<\/a>\n* <a href=\"https:\/\/codecanyon.net\/item\/viba-portfolio-wordpress-plugin\/9561599\">Viba Portfolio<\/a>\n* <a href=\"https:\/\/wpml.org\/\">WPML<\/a><\/p>\n\n<h3>Build Status<\/h3>\n\n<p><a href=\"https:\/\/codeclimate.com\/github\/lesterchan\/wp-sweep\"><\/a>\n<a href=\"https:\/\/codeclimate.com\/github\/lesterchan\/wp-sweep\"><\/a><\/p>\n\n<h3>Development<\/h3>\n\n<ul>\n<li><a href=\"https:\/\/github.com\/lesterchan\/wp-sweep\" title=\"https:\/\/github.com\/lesterchan\/wp-sweep\">https:\/\/github.com\/lesterchan\/wp-sweep<\/a><\/li>\n<\/ul>\n\n<h3>Credits<\/h3>\n\n<ul>\n<li>Plugin icon by <a href=\"http:\/\/www.freepik.com\">Freepik<\/a> from <a href=\"http:\/\/www.flaticon.com\">Flaticon<\/a><\/li>\n<\/ul>\n\n<h3>Donations<\/h3>\n\n<p>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.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>wp-sweep<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the <code>WP-Sweep<\/code> plugin through the 'Plugins' menu in WordPress<\/li>\n<li>You can access <code>WP-Sweep<\/code> via <code>WP-Admin -&gt; Tools -&gt; Sweep<\/code><\/li>\n<\/ol>\n\n<!--section=faq-->\n<p>Coming soon ...<\/p>\n\n<!--section=changelog-->\n<h3>1.1.8<\/h3>\n\n<ul>\n<li>FIXED: Added current_user_can() Check For AJAX Calls<\/li>\n<\/ul>\n\n<h3>1.1.7<\/h3>\n\n<ul>\n<li>FIXED: Pass in default blank string to fix fatal error<\/li>\n<\/ul>\n\n<h3>1.1.6<\/h3>\n\n<ul>\n<li>NEW: Re-org wp-sweep.php to inc\/class-wpsweep.php<\/li>\n<li>NEW: Bump to WordPress 6.2<\/li>\n<\/ul>\n\n<h3>1.1.5<\/h3>\n\n<ul>\n<li>NEW: Bump to WordPress 5.8<\/li>\n<\/ul>\n\n<h3>1.1.4<\/h3>\n\n<ul>\n<li>FIXED: Replaced %&#095;transient&#095;% with %&#092;&#095;transient&#092;&#095;%. Escape _ in MySQL if not it is being used as a wildcard character. Props @janrenn.<\/li>\n<\/ul>\n\n<h3>1.1.3<\/h3>\n\n<ul>\n<li>FIXED: Changed permissions check to <code>activate_plugins<\/code> because <code>update_plugins<\/code> will return false when DISALLOW_FILE_MODS=true.<\/li>\n<\/ul>\n\n<h3>1.1.2<\/h3>\n\n<ul>\n<li>NEW: Changed permission check to <code>update_plugins<\/code> for better MultiSite compatibility.<\/li>\n<li>NEW: Bump min PHP version to 5.6.<\/li>\n<\/ul>\n\n<h3>1.1.1<\/h3>\n\n<ul>\n<li>NEW: <code>wp_sweep_excluded_termids<\/code> filter.<\/li>\n<\/ul>\n\n<h3>1.1.0<\/h3>\n\n<ul>\n<li>NEW: Added WP Rest API Endpoint support, <code>sweep\/v1\/count\/&lt;Name&gt;<\/code>, <code>sweep\/v1\/details\/&lt;Name&gt;<\/code>, and <code>sweep\/v1\/sweep\/&lt;Name&gt;<\/code><\/li>\n<li>FIXED: Follow as close as possible to WordPress Coding Standards<\/li>\n<\/ul>\n\n<h3>1.0.12<\/h3>\n\n<ul>\n<li>NEW: Bump to WordPress 4.9<\/li>\n<li>NEW: Update README to incompatible plugins<\/li>\n<\/ul>\n\n<h3>1.0.10<\/h3>\n\n<ul>\n<li>FIXED: Invalid plugin head 'This plugin has an invalid header.'<\/li>\n<\/ul>\n\n<h3>1.0.9<\/h3>\n\n<ul>\n<li>NEW: Support for Codeclimate<\/li>\n<li>FIXES: Uses <code>get_sites()<\/code> on WordPress 4.6. This should fix deprecated notices.<\/li>\n<li>FIXES: Fixes translation placeholder count. Props @pedro-mendonca.<\/li>\n<li>FIXES: Use <code>manage_options<\/code> capability as it conflicts with Admin Menu Editor on multisite installs. Props @EusebiuOprinoiu.<\/li>\n<\/ul>\n\n<h3>1.0.8<\/h3>\n\n<ul>\n<li>NEW: Added wp_sweep_excluded_taxonomies filter to allow more than just link_category taxonomy<\/li>\n<li>NEW: Support for WP-CLI <code>wp sweep<\/code><\/li>\n<\/ul>\n\n<h3>1.0.7<\/h3>\n\n<ul>\n<li>FIXES: Use custom query to delete Orphaned Term Relationship if wp_remove_object_terms() fails<\/li>\n<\/ul>\n\n<h3>1.0.6<\/h3>\n\n<ul>\n<li>NEW: Delete 'languages' folder from the plugin<\/li>\n<li>NEW: Use translate.wordpress.org to translate the plugin<\/li>\n<li>FIXED: Works only with WordPress 4.4 because of new term meta<\/li>\n<\/ul>\n\n<h3>1.0.5<\/h3>\n\n<ul>\n<li>FIXED: apply_filters() wrong arguments<\/li>\n<\/ul>\n\n<h3>1.0.4<\/h3>\n\n<ul>\n<li>NEW: oEmbed caches in post meta Sweep<\/li>\n<li>NEW: Add POT file for translators<\/li>\n<\/ul>\n\n<h3>1.0.3<\/h3>\n\n<ul>\n<li>NEW: AJAX Sweep All<\/li>\n<li>NEW: AJAX Sweeping<\/li>\n<li>NEW: View details of sweep<\/li>\n<li>NEW: Optimize DB sweep<\/li>\n<li>NEW: User hint and confirmation. Props @SiamKreative<\/li>\n<li>FIXED: Division by zero. Pros @barisunver<\/li>\n<\/ul>\n\n<h3>1.0.2<\/h3>\n\n<ul>\n<li>FIXED: Use term_id for wp_remove_object_terms()<\/li>\n<li>FIXED: number_format_i18n() issues after sweeping<\/li>\n<\/ul>\n\n<h3>1.0.1<\/h3>\n\n<ul>\n<li>NEW: Moved plugin location to WP-Admin -&gt; Tools -&gt; Sweep<\/li>\n<li>NEW: Add Deleted Post Sweep<\/li>\n<li>FIXED: Use forced_delete for wp_delete_post() and wp_delete_comment();<\/li>\n<li>FIXED: If orphaned meta has an object id of 0, use SQL query to delete <\/li>\n<\/ul>\n\n<h3>1.0.0<\/h3>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"WP-Sweep allows you to clean up unused, orphaned and duplicated data in your WordPress. It also optimizes your database tables.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/1208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=1208"}],"author":[{"embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/gamerz"}],"wp:attachment":[{"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=1208"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=1208"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=1208"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=1208"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=1208"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/mk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=1208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}