{"id":268375,"date":"2025-12-28T06:32:43","date_gmt":"2025-12-28T06:32:43","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/mega-database-cleanup\/"},"modified":"2026-03-26T18:03:42","modified_gmt":"2026-03-26T18:03:42","slug":"mega-database-cleanup","status":"publish","type":"plugin","link":"https:\/\/ps.wordpress.org\/plugins\/mega-database-cleanup\/","author":23424496,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.0.0","stable_tag":"2.0.0","tested":"6.9.4","requires":"5.0","requires_php":"7.4","requires_plugins":null,"header_name":"Mega Database Cleanup","header_author":"MegaWix Technologies","header_description":"Mega \u2014 Full DB cleanup for WordPress. Modern settings UI + ACF\/Empty-meta cleaner + scheduled cleanup + backups. Single-file production-ready version.","assets_banners_color":"4c608b","last_updated":"2026-03-26 18:03:42","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.megawix.com","header_plugin_uri":"","header_author_uri":"https:\/\/megawix.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":347,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"megawixtech","date":"2025-12-28 06:30:29"},"1.1.0":{"tag":"1.1.0","author":"megawixtech","date":"2026-02-25 17:21:27"},"1.1.1":{"tag":"1.1.1","author":"megawixtech","date":"2026-02-27 17:40:34"},"2.0.0":{"tag":"2.0.0","author":"megawixtech","date":"2026-03-26 18:03:42"}},"upgrade_notice":{"2.0.0":"<p>A major performance and safety upgrade with a new health dashboard, expanded cleanup modules, and a professional modular engine. Recommended for all users.<\/p>","1.1.1":"<p>Critical hotfix that improves PHP compatibility and fixes a bug where the plugin would deactivate itself after an update. Recommended for all users.<\/p>","1.0.0":"<p>Initial release of Mega Database Cleanup.<br \/>\nAdds full database cleanup toolkit with backup, preview, and automated cleanup scheduler.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3428489,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3428489,"resolution":"256x256","location":"assets","locale":""},"icon.svg":{"filename":"icon.svg","revision":3428489,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3428489,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3428489,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.0","1.1.1","2.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3428489,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3428489,"resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3428489,"resolution":"3","location":"assets","locale":""},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3428489,"resolution":"4","location":"assets","locale":""},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3428489,"resolution":"5","location":"assets","locale":""},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3428489,"resolution":"6","location":"assets","locale":""}},"screenshots":{"1":"Health Dashboard \u2013 Real-time visual metrics","2":"Cleanup Modules \u2013 Quick one-click optimization","3":"Meta Cleaner \u2013 Advanced table scan and filter","4":"Snapshot Manager \u2013 Backup and restore history","5":"Settings \u2013 Task scheduler and patterns"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2211,3786,153,187,4672],"plugin_category":[52],"plugin_contributors":[252915],"plugin_business_model":[],"class_list":["post-268375","plugin","type-plugin","status-publish","hentry","plugin_tags-acf","plugin_tags-cleanup","plugin_tags-database","plugin_tags-optimization","plugin_tags-postmeta","plugin_category-performance","plugin_contributors-megawixtech","plugin_committers-megawixtech"],"banners":{"banner":"https:\/\/ps.w.org\/mega-database-cleanup\/assets\/banner-772x250.png?rev=3428489","banner_2x":"https:\/\/ps.w.org\/mega-database-cleanup\/assets\/banner-1544x500.png?rev=3428489","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/mega-database-cleanup\/assets\/icon.svg?rev=3428489","icon":"https:\/\/ps.w.org\/mega-database-cleanup\/assets\/icon.svg?rev=3428489","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/mega-database-cleanup\/assets\/screenshot-1.png?rev=3428489","caption":"Health Dashboard \u2013 Real-time visual metrics"},{"src":"https:\/\/ps.w.org\/mega-database-cleanup\/assets\/screenshot-2.png?rev=3428489","caption":"Cleanup Modules \u2013 Quick one-click optimization"},{"src":"https:\/\/ps.w.org\/mega-database-cleanup\/assets\/screenshot-3.png?rev=3428489","caption":"Meta Cleaner \u2013 Advanced table scan and filter"},{"src":"https:\/\/ps.w.org\/mega-database-cleanup\/assets\/screenshot-4.png?rev=3428489","caption":"Snapshot Manager \u2013 Backup and restore history"},{"src":"https:\/\/ps.w.org\/mega-database-cleanup\/assets\/screenshot-5.png?rev=3428489","caption":"Settings \u2013 Task scheduler and patterns"},{"src":"https:\/\/ps.w.org\/mega-database-cleanup\/assets\/screenshot-6.png?rev=3428489","caption":""}],"raw_content":"<!--section=description-->\n<p><strong>Mega Database Cleanup<\/strong> is a modern, high-performance cleanup utility built to remove unused, empty, bloated, or orphaned metadata from your WordPress database \u2014 safely and automatically.<\/p>\n\n<p>It includes a smart scanner, preview mode, ACF pattern cleanup, scheduled tasks, and full backup support. Ideal for site owners, developers, agencies, and power users who want a faster &amp; cleaner database without risking important data.<\/p>\n\n<p><strong>Version 2.0.0<\/strong> introduces a completely rewritten modular architecture, a real-time Health Dashboard, and targeted cleanup modules for post revisions, trash, spam comments, and expired transients.<\/p>\n\n<h4>Highlights<\/h4>\n\n<ul>\n<li><p><strong>Health Score Dashboard<\/strong>\nReal-time visual representation of your database health and performance at a glance. [NEW in 2.0.0]<\/p><\/li>\n<li><p><strong>Targeted Cleanup Modules<\/strong>\nFast, one-click optimization for Post Revisions, Trashed Content, Spam Comments, and Expired Transients. [NEW in 2.0.0]<\/p><\/li>\n<li><p><strong>Empty \/ Unused Meta Scanner<\/strong><br \/>\nDetects empty, null, serialized-empty, or JSON-empty metadata across Post, User, Term, and Comment tables.<\/p><\/li>\n<li><p><strong>ACF Cleanup Engine<\/strong><br \/>\nAutomatically identifies patterns used by Advanced Custom Fields to detect orphan entries.<\/p><\/li>\n<li><p><strong>Safety Vault System<\/strong>\nAutomatically secures deleted revisions and junk data in a temporary vault for easy recovery. [NEW in 2.0.0]<\/p><\/li>\n<li><p><strong>Snapshot Management<\/strong>\nCreate manual snapshots of your metadata before cleanup and restore them whenever needed. [NEW in 2.0.0]<\/p><\/li>\n<li><p><strong>Real-Time Safe Preview<\/strong><br \/>\nSee exactly what will be deleted before confirming cleanup.<\/p><\/li>\n<li><p><strong>Backup Before Delete<\/strong><br \/>\nAll removed metadata can be stored in a dedicated backup table \/ snapshot.<\/p><\/li>\n<li><p><strong>Scheduled Cleanup (WP-Cron)<\/strong><br \/>\nCleanup can run automatically (daily, weekly).<\/p><\/li>\n<li><p><strong>Retention Rules<\/strong><br \/>\nKeep the latest N meta rows per meta_key (default: 3).<\/p><\/li>\n<li><p><strong>Safe &amp; Secure<\/strong><br \/>\nFull validation, sanitization, and capability checks included.<\/p><\/li>\n<li><p><strong>One-Click Full Cleanup<\/strong><br \/>\nDelete unused metadata across the entire database.<\/p><\/li>\n<li><p><strong>Custom Cleanup Patterns<\/strong><br \/>\nAdd or remove ACF-like patterns (SQL LIKE rules).<\/p><\/li>\n<li><p><strong>Activation Welcome Popup<\/strong><br \/>\nOn first activation, optionally subscribe to optimization tips and anonymous diagnostic sync.<\/p><\/li>\n<li><p><strong>Deactivation Feedback<\/strong><br \/>\nIf you deactivate the plugin, an optional feedback popup appears so you can share why.<\/p><\/li>\n<\/ul>\n\n<h4>Who Is This For?<\/h4>\n\n<p><strong>Website Owners<\/strong><br \/>\n\u2013 Improve site performance and reduce database size safely.<\/p>\n\n<p><strong>Agencies &amp; Developers<\/strong><br \/>\n\u2013 Maintain clean data structures, especially on large sites.<\/p>\n\n<p><strong>ACF Users<\/strong><br \/>\n\u2013 Automatically remove leftover fields that accumulate over time.<\/p>\n\n<p><strong>Performance Optimizers<\/strong><br \/>\n\u2013 Speed up queries by removing thousands of useless meta rows.<\/p>\n\n<h4>Why Mega Database Cleanup Is Different<\/h4>\n\n<ul>\n<li>Designed for <strong>large databases<\/strong>  <\/li>\n<li>Uses safe preview mode  <\/li>\n<li>Runs scheduled cleanups automatically  <\/li>\n<li>Creates a backup of every deleted row  <\/li>\n<li><strong>Safety Vault<\/strong> prevents permanent loss of revisions and trashed data<\/li>\n<li>Preserves the <strong>Latest 3 entries<\/strong> for absolute safety  <\/li>\n<li>Uses optimized SQL queries for predictable performance<\/li>\n<\/ul>\n\n<h3>Privacy Policy<\/h3>\n\n<p>Mega Database Cleanup is committed to transparency regarding user data:<\/p>\n\n<ul>\n<li><strong>No external data transmission<\/strong> \u2014 No information ever leaves your site.<\/li>\n<li><strong>Activation popup (optional)<\/strong> \u2014 If you enter your email in the welcome popup, it is saved to your site's <code>wp_options<\/code> table (<code>mdbcp_subscriber_email<\/code>). It is never sent to any third-party server. You can skip this step entirely.<\/li>\n<li><strong>Deactivation feedback (optional)<\/strong> \u2014 If you submit a deactivation reason, it is saved locally to your site's <code>wp_options<\/code> table (<code>mdbcp_deactivation_log<\/code>). It is never sent externally. You can skip this step entirely.<\/li>\n<li><strong>Database backups<\/strong> \u2014 Backup data is stored in a dedicated custom table on your own database server.<\/li>\n<\/ul>\n\n<h3>Developer Hooks<\/h3>\n\n<h4>Filters<\/h4>\n\n<ul>\n<li><code>mega_db_cleanup_patterns<\/code> \u2013 Modify cleanup patterns  <\/li>\n<li><code>mega_db_cleanup_retention_limit<\/code> \u2013 Change default \"keep latest N\" count  <\/li>\n<\/ul>\n\n<h4>Actions<\/h4>\n\n<ul>\n<li><code>mega_db_cleanup_before_delete<\/code> \u2013 Fires before deletion  <\/li>\n<li><code>mega_db_cleanup_after_delete<\/code> \u2013 Fires after deletion<\/li>\n<\/ul>\n\n<h3>Credits<\/h3>\n\n<p>Developed with \u2764\ufe0f by <a href=\"https:\/\/www.megawix.com\">MegaWix Technologies<\/a><\/p>\n\n<ul>\n<li>Plugin Development: MegaWix Technologies<\/li>\n<li>Testing &amp; QA: MegaWix Technologies<\/li>\n<\/ul>\n\n<h3>Support<\/h3>\n\n<p>Need help? Have a question or feature request?<\/p>\n\n<ul>\n<li>Website: https:\/\/www.megawix.com<\/li>\n<li>Email: info@megawix.com<\/li>\n<\/ul>\n\n<p>We are committed to providing reliable support and regular updates to ensure this plugin remains compatible with the latest WordPress versions.<\/p>\n\n<!--section=installation-->\n<h4>Automatic Installation<\/h4>\n\n<ol>\n<li>Log in to <strong>WordPress Admin \u2192 Plugins \u2192 Add New<\/strong>  <\/li>\n<li>Search for <strong>Mega Database Cleanup<\/strong>  <\/li>\n<li>Click <strong>Install Now<\/strong> \u2192 <strong>Activate<\/strong>  <\/li>\n<li>Navigate to <strong>Mega DB Cleanup<\/strong> in your WordPress sidebar<\/li>\n<\/ol>\n\n<h4>Manual Installation<\/h4>\n\n<ol>\n<li>Download the plugin ZIP  <\/li>\n<li>Go to <strong>Plugins \u2192 Add New \u2192 Upload Plugin<\/strong>  <\/li>\n<li>Select the ZIP and install  <\/li>\n<li>Click <strong>Activate Plugin<\/strong><\/li>\n<\/ol>\n\n<h4>Initial Setup<\/h4>\n\n<ol>\n<li>Open <strong>Mega DB Cleanup<\/strong> from your WordPress sidebar  <\/li>\n<li>Enable ACF Cleanup (optional)  <\/li>\n<li>Enable Preview Mode (recommended)  <\/li>\n<li>Add patterns if needed  <\/li>\n<li>Enable scheduled cleanup (optional)  <\/li>\n<li>Save changes<\/li>\n<\/ol>\n\n<p>You're ready to analyze or clean your database!<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20delete%20important%20data%3F\"><h3>Does this delete important data?<\/h3><\/dt>\n<dd><p>No \u2014 the plugin only targets metadata that is clearly empty, unused, or orphaned.<br \/>\nWith the new Safety Vault and Snapshot systems, you can restore deleted data at any time.<\/p><\/dd>\n<dt id=\"is%20there%20a%20preview%20mode%3F\"><h3>Is there a preview mode?<\/h3><\/dt>\n<dd><p>Yes. Preview mode allows you to see exactly which meta rows are considered empty before removing anything.<\/p><\/dd>\n<dt id=\"does%20this%20support%20acf%20fields%3F\"><h3>Does this support ACF fields?<\/h3><\/dt>\n<dd><p>Yes! It includes a dedicated ACF cleanup engine that uses pattern rules to identify real orphan fields.<\/p><\/dd>\n<dt id=\"what%20is%20the%20health%20score%3F\"><h3>What is the Health Score?<\/h3><\/dt>\n<dd><p>It is a percentage-based calculation that tells you how optimized your database is based on the amount of junk data found.<\/p><\/dd>\n<dt id=\"what%20if%20i%20delete%20something%20by%20mistake%3F\"><h3>What if I delete something by mistake?<\/h3><\/dt>\n<dd><p>If backups\/snapshots are enabled, deleted metadata is stored in a dedicated table so you can restore it from the plugin dashboard.<\/p><\/dd>\n<dt id=\"how%20safe%20is%20the%20scheduled%20cleanup%3F\"><h3>How safe is the scheduled cleanup?<\/h3><\/dt>\n<dd><p>Very safe \u2014 it follows the same rules as manual cleanup, including retention rules and backups.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>Major Overhaul: Completely redesigned modular class-based architecture.<\/li>\n<li>New: Health Score Dashboard with real-time database diagnostics.<\/li>\n<li>New: Support for User, Term, and Comment metadata cleanup.<\/li>\n<li>New: Targeted cleanup modules for Revisions, Trash, Spam, and Transients.<\/li>\n<li>New: Safety Vault system to temporary secure deleted data.<\/li>\n<li>New: Metadata Snapshot system for manual backups and restoration.<\/li>\n<li>New: Modern tabbed UI with improved user experience.<\/li>\n<li>Added: Telemetry system for anonymous site optimization diagnostics.<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Fixed: Critical PHP compatibility issue by replacing modern arrow functions with traditional anonymous functions, ensuring support for older server environments.<\/li>\n<li>Fixed: Resolved a glitch that caused plugin deactivation during the update process due to script execution timeouts on some servers.<\/li>\n<li>Improved: Better handling of plugin state during version transitions.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Added optional activation popup: subscribe to plugin update tips (email stored locally only)<\/li>\n<li>Added deactivation feedback popup: 6 selectable reasons + custom text (stored locally only)<\/li>\n<li>Plugin now appears as a top-level menu item in the WordPress sidebar<\/li>\n<li>Quick-access link added to the WordPress admin bar (header)<\/li>\n<li>All new features are fully WordPress.org compliant<\/li>\n<\/ul>\n\n<h4>1.0.0 \u2013 Initial Release<\/h4>\n\n<ul>\n<li>Empty meta scanner and preview mode  <\/li>\n<li>ACF orphan cleanup with pattern-based detection  <\/li>\n<li>Scheduled automatic cleanup (hourly\/daily\/weekly)  <\/li>\n<li>Backup table to store deleted meta rows  <\/li>\n<li>Retention rule: keep latest N entries per meta_key  <\/li>\n<li>One-click delete all empty metadata  <\/li>\n<li>Add\/remove ACF patterns  <\/li>\n<li>Inline logs and real-time reports  <\/li>\n<li>Fully optimized SQL cleanup  <\/li>\n<li>Admin UI with jQuery enhancements<\/li>\n<\/ul>","raw_excerpt":"A powerful and safe WP database cleanup tool with ACF orphan removal, empty meta scanning, scheduled automation, backups, and real-time preview mode.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/268375","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=268375"}],"author":[{"embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/megawixtech"}],"wp:attachment":[{"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=268375"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=268375"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=268375"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=268375"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=268375"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=268375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}