{"id":400451,"date":"2026-11-17T08:01:23","date_gmt":"2026-11-17T08:01:23","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/reinvent-database-cleaner\/"},"modified":"2026-11-17T08:12:18","modified_gmt":"2026-11-17T08:12:18","slug":"reinvent-database-cleaner","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/reinvent-database-cleaner\/","author":23258933,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.3","stable_tag":"1.0.3","tested":"7.1.4","requires":"6.2","requires_php":"7.4","requires_plugins":null,"header_name":"Reinvent Database Cleaner","header_author":"Reinvent WP","header_description":"Clean up and speed up your database safely. Removes old revisions, spam, expired transients and orphaned data, shows which plugin left each table, option and cron job behind, and backs up everything it removes so you can undo.","last_updated":"2026-11-17 08:12:18","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/reinvent-database-cleaner","header_author_uri":"https:\/\/reinventwp.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":28,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.2":{"tag":"1.0.2","author":"reinventwp","date":"2026-11-17 08:01:04","revision":3806764},"1.0.3":{"tag":"1.0.3","author":"reinventwp","date":"2026-11-17 08:12:18","revision":3806794}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3806762,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3806762,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3806762,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3806762,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3806797,"resolution":false,"location":"assets","locale":"","contents":"{\"$schema\":\"https:\\\/\\\/playground.wordpress.net\\\/blueprint-schema.json\",\"landingPage\":\"\\\/wp-admin\\\/tools.php?page=rwpdc-cleaner\",\"preferredVersions\":{\"php\":\"8.2\",\"wp\":\"latest\"},\"features\":{\"networking\":true},\"steps\":[{\"step\":\"login\",\"username\":\"admin\"},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"reinvent-database-cleaner\"},\"options\":{\"activate\":true}},{\"step\":\"runPHP\",\"code\":\"<?php require_once '\\\/wordpress\\\/wp-load.php'; $id = wp_insert_post( array( 'post_title' => 'A post with many revisions', 'post_status' => 'publish', 'import_id' => 1000, 'post_content' => 'First draft.' ) ); for ( $i = 2; $i <= 12; $i++ ) { wp_update_post( array( 'ID' => $id, 'post_content' => 'Draft number ' . $i . ' of this post.' ) ); } $old = wp_insert_post( array( 'post_title' => 'An old post in the trash', 'post_status' => 'publish' ) ); wp_trash_post( $old ); for ( $i = 1; $i <= 6; $i++ ) { wp_insert_comment( array( 'comment_post_ID' => $id, 'comment_author' => 'Spam bot ' . $i, 'comment_content' => 'Buy cheap links now!', 'comment_approved' => 'spam' ) ); } for ( $i = 1; $i <= 8; $i++ ) { update_option( '_transient_timeout_demo_cache_' . $i, time() - 3600, false ); update_option( '_transient_demo_cache_' . $i, str_repeat( 'x', 2000 ), false ); } update_option( 'old_plugin_settings', array( 'left' => 'behind' ) ); ?>\"}]}"}},"all_blocks":[],"tagged_versions":["1.0.2","1.0.3"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3806762,"resolution":"1","location":"assets","locale":"","width":1280,"height":900},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3806762,"resolution":"2","location":"assets","locale":"","width":1280,"height":900},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3806762,"resolution":"3","location":"assets","locale":"","width":1280,"height":900},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3806762,"resolution":"4","location":"assets","locale":"","width":1280,"height":900},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3806762,"resolution":"5","location":"assets","locale":"","width":1280,"height":900}},"screenshots":{"1":"Home: what can be cleaned safely, database size and autoload.","2":"Clean Up: every item explained, with a preview.","3":"Tables with their owners.","4":"Options and autoload.","5":"History with one-click restore."}},"plugin_section":[],"plugin_tags":[1328,4655,4654,4679,6243],"plugin_category":[],"plugin_contributors":[241539],"plugin_business_model":[],"class_list":["post-400451","plugin","type-plugin","status-publish","hentry","plugin_tags-autoload","plugin_tags-clean-database","plugin_tags-database-cleaner","plugin_tags-optimize-database","plugin_tags-revisions","plugin_contributors-reinventwp","plugin_committers-reinventwp"],"banners":{"banner":"https:\/\/ps.w.org\/reinvent-database-cleaner\/assets\/banner-772x250.png?rev=3806762","banner_2x":"https:\/\/ps.w.org\/reinvent-database-cleaner\/assets\/banner-1544x500.png?rev=3806762","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/reinvent-database-cleaner\/assets\/icon-128x128.png?rev=3806762","icon_2x":"https:\/\/ps.w.org\/reinvent-database-cleaner\/assets\/icon-256x256.png?rev=3806762","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/reinvent-database-cleaner\/assets\/screenshot-1.png?rev=3806762","caption":"Home: what can be cleaned safely, database size and autoload."},{"src":"https:\/\/ps.w.org\/reinvent-database-cleaner\/assets\/screenshot-2.png?rev=3806762","caption":"Clean Up: every item explained, with a preview."},{"src":"https:\/\/ps.w.org\/reinvent-database-cleaner\/assets\/screenshot-3.png?rev=3806762","caption":"Tables with their owners."},{"src":"https:\/\/ps.w.org\/reinvent-database-cleaner\/assets\/screenshot-4.png?rev=3806762","caption":"Options and autoload."},{"src":"https:\/\/ps.w.org\/reinvent-database-cleaner\/assets\/screenshot-5.png?rev=3806762","caption":"History with one-click restore."}],"raw_content":"<!--section=description-->\n<p>Old revisions, spam, expired temporary data and leftovers from plugins you deleted long ago all slow your site down. <strong>Reinvent Database Cleaner<\/strong> finds them, tells you in plain words what each one is, and removes them safely.<\/p>\n\n<p><strong>One click, nothing to fear.<\/strong> The home screen shows how much can be cleaned safely. Click Clean now. Everything removed is first copied to a private backup on your server, so you can put it back from History with one click.<\/p>\n\n<p><strong>Who owns this table?<\/strong> We check the code of WordPress, your plugins and your themes on your own server, and label every table, option and scheduled task:<\/p>\n\n<ul>\n<li><strong>WordPress<\/strong>: never offered for removal.<\/li>\n<li><strong>Used by an active plugin<\/strong>: never offered for removal.<\/li>\n<li><strong>Inactive plugin<\/strong>: you decide; keep it if you'll use that plugin again.<\/li>\n<li><strong>No installed plugin<\/strong>: most likely left by a plugin you deleted.<\/li>\n<\/ul>\n\n<p><strong>Faster pages with autoload.<\/strong> WordPress loads some options on every page view. We show the total against the limit Site Health warns about, the biggest ones and who they belong to, and let you stop autoloading them in one click. You can undo that too.<\/p>\n\n<p><strong>Automatic cleanup.<\/strong> Clean the safe items weekly or monthly, in the background.<\/p>\n\n<h4>What it cleans<\/h4>\n\n<ul>\n<li>Old revisions (keeps the last 5 of each post by default)<\/li>\n<li>Auto-drafts and posts in the trash, with everything attached to them, so no orphaned data is left<\/li>\n<li>Spam and trashed comments<\/li>\n<li>Embed (oEmbed) caches<\/li>\n<li>Orphaned post, comment, term and user data, and orphaned category links<\/li>\n<li>Duplicate post data (review first)<\/li>\n<li>Expired transients<\/li>\n<li>Finished Action Scheduler tasks and their logs (WooCommerce and others)<\/li>\n<li>Expired WooCommerce sessions<\/li>\n<li>Leftover tables, options and scheduled tasks (Advanced mode)<\/li>\n<\/ul>\n\n<h4>Everything is free<\/h4>\n\n<ul>\n<li>Preview what will be removed before you clean<\/li>\n<li>Backups and one-click restore for every cleanup, table, option and scheduled task<\/li>\n<li>Ownership labels for tables, options and cron jobs<\/li>\n<li>Optimize tables<\/li>\n<li>Autoload size meter, with \"stop autoloading\" and undo<\/li>\n<li>Weekly or monthly automatic cleanup<\/li>\n<li>Simple and Advanced modes, plus a settings search that understands plain words<\/li>\n<li>WP-CLI: <code>wp db-cleaner status<\/code>, <code>clean<\/code>, <code>index<\/code>, <code>tables<\/code>, <code>drop-table<\/code>, <code>restore<\/code><\/li>\n<\/ul>\n\n<h4>Safe by design<\/h4>\n\n<ul>\n<li>Backup first, always. If the backup can't be written, nothing is removed.<\/li>\n<li>WordPress tables, options and tasks, and anything used by an active plugin, are never offered for removal.<\/li>\n<li>Leftovers are only removed when you choose them.<\/li>\n<li>Only this site's tables (its table prefix) are listed or changed.<\/li>\n<li>Work runs in small, timed batches, so big sites don't time out.<\/li>\n<\/ul>\n\n<p>Tip: keep a recent full backup of your site too, like with any tool that changes the database.<\/p>\n\n<h3>External services<\/h3>\n\n<p>Database Cleaner works on your server. Your database is never sent anywhere. The admin pages connect to one service, operated by us:<\/p>\n\n<p><strong>Reinvent WP services<\/strong> (<code>https:\/\/services.reinventwp.com<\/code>)<\/p>\n\n<ul>\n<li>Settings search: when you type in the settings search box, the text you type, the plugin name and version are sent to find matching settings. Nothing is sent until you search.<\/li>\n<li>Error reporting: only after you click \"I Agree\" on the privacy notice in the plugin's admin page. When that page hits an error, the error message, the page URL, your browser's user agent and the plugin version are sent so we can fix the problem. Before you agree, errors are only saved in the plugin's own log on your site.<\/li>\n<li>Site report: to improve the plugin and help us debug when you report an error, the plugin's admin page sends your site address, the admin email, the plugin version and the plugin's settings (no passwords or keys) when the page loads and when you save the settings.<\/li>\n<li>The list of Reinvent WP apps on the <strong>Reinvent WP \u2192 Dashboard<\/strong> page. When an administrator opens that page, your site downloads the current list at most once a day and keeps a copy. Nothing about your site or you is sent.<\/li>\n<li>The assistant (the <strong>Describe a problem with your site<\/strong> field) on the <strong>Reinvent WP \u2192 Dashboard<\/strong> page and on this plugin's page. When you send a question, it is sent with any screenshots or text files you attach to it (of a file, only its newest part, with emails, IP addresses, passwords and keys hidden by your browser first), the last few messages of the conversation and the list of Reinvent WP plugins on your site (whether each is active, inactive or not installed, and its version), so the answer can point to the right plugin and setting. Nothing is stored; the conversation stays in your browser tab. If you send feedback from the assistant's form, your email, site address and message go to the Reinvent WP team, like the feedback form.<\/li>\n<\/ul>\n\n<p><a href=\"https:\/\/reinventwp.com\/terms-and-conditions\">Terms of Service<\/a> | <a href=\"https:\/\/reinventwp.com\/privacy\">Privacy Policy<\/a><\/p>\n\n<h3>Source Code<\/h3>\n\n<p>The admin screen is built with React and TypeScript. The compiled files in <code>public\/js<\/code> are generated with webpack from the human-readable source code included in the plugin at <code>source\/admin<\/code>.<\/p>\n\n<p>The Reinvent WP \u2192 Dashboard page and the assistant (<code>public\/hub<\/code>) are built from https:\/\/github.com\/reinventwp\/reinventwp-apps.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install the plugin from <strong>Plugins \u2192 Add New<\/strong>, or upload the zip.<\/li>\n<li>Activate it. You land on <strong>Tools \u2192 Database Cleaner<\/strong>.<\/li>\n<li>Click <strong>Check my database<\/strong>, then <strong>Clean now<\/strong>.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"can%20i%20undo%20a%20cleanup%3F\"><h3>Can I undo a cleanup?<\/h3><\/dt>\n<dd><p>Yes. Open History and click Restore. The removed rows, tables, options or scheduled tasks are put back. Backups are kept for 30 days (you can change this in Settings).<\/p><\/dd>\n<dt id=\"where%20are%20the%20backups%20stored%3F\"><h3>Where are the backups stored?<\/h3><\/dt>\n<dd><p>In a private folder in your uploads folder (<code>uploads\/reinvent-database-cleaner\/<\/code>) with a random name, protected from web access. They're compressed and removed automatically when they expire.<\/p><\/dd>\n<dt id=\"how%20do%20you%20know%20which%20plugin%20a%20table%20or%20option%20belongs%20to%3F\"><h3>How do you know which plugin a table or option belongs to?<\/h3><\/dt>\n<dd><p>We read the PHP files of WordPress, your plugins and your theme on your server and look for the names they use, including names built from a plugin's prefix. A name that nothing installed uses is marked \"No installed plugin\". It's very likely a leftover, but check it before you remove it. The backup lets you put it back if you were wrong.<\/p><\/dd>\n<dt id=\"why%20can%27t%20i%20remove%20a%20table%20from%20the%20browser%3F\"><h3>Why can't I remove a table from the browser?<\/h3><\/dt>\n<dd><p>Tables over 20 MB are too big to back up within one page request on many hosts. Use WP-CLI instead: <code>wp db-cleaner drop-table &lt;name&gt;<\/code>.<\/p><\/dd>\n<dt id=\"what%20happens%20when%20i%20delete%20the%20plugin%3F\"><h3>What happens when I delete the plugin?<\/h3><\/dt>\n<dd><p>Your settings, history and backups are kept, so you can still restore after installing it again. To remove everything, switch to Advanced mode and turn on \"Remove all Database Cleaner data\" in Settings before you delete the plugin.<\/p><\/dd>\n<dt id=\"does%20it%20work%20on%20multisite%3F\"><h3>Does it work on multisite?<\/h3><\/dt>\n<dd><p>It works on the site you're on, with that site's tables. Network-wide tables are treated as WordPress tables and never removed.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>New: describe a problem with your site on the Reinvent WP \u2192 Dashboard page or on this plugin's page, and the assistant suggests the Reinvent WP app that fixes it.<\/li>\n<li>New: the Reinvent WP \u2192 Dashboard page shows your Reinvent WP apps first, then the others you can install, from an up-to-date list (read once a day, with a built-in list as fallback).<\/li>\n<li>The admin page now sends a short site report (site address, admin email, plugin version and settings) to help us improve the plugin and debug reported errors. See External services in the readme.<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Every database query is written in full with placeholders.<\/li>\n<li>Restoring a removed table checks that its saved structure was not changed.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Readme: clearer description.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release.<\/li>\n<\/ul>","raw_excerpt":"Clean and speed up your database safely. See which plugin left each table and option behind, and undo anything with built-in backups.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/400451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=400451"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/reinventwp"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=400451"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=400451"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=400451"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=400451"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=400451"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=400451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}