=== DB Sweeper ===
Contributors: yodsira
Tags: database, cleanup, optimization, revisions, transients
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Safe database cleanup: a dry-run report first, exact numbers, a journal of everything removed - clean your database with zero guesswork.

== Description ==

"Can I safely clean my WordPress database?" - the question every site owner asks, usually right after a scary blog post about bloat. DB Sweeper answers it the careful way:

* **Dry-run by default.** The scan only counts rows - revisions, autosaves, expired transients, spam and trashed comments, pingbacks/trackbacks, orphan post meta. Nothing is touched until you review the report.
* **Clean with checkboxes.** Pick the categories you want; every delete runs in small batches without locking your site.
* **Revision age control.** Only revisions older than 30 / 60 / 90 days - or any age.
* **A journal, not amnesia.** Every cleanup records what was removed, when, and how many rows.

No caching framework, no "performance suite", no upsell nagging - just the cleanup, done honestly.

The Pro version adds scheduled cleanups, OPTIMIZE TABLE, an autoload report (with a WordPress-core whitelist that cannot be broken), automatic gzipped snapshots before every cleanup and orphan term/comment meta cleanup.

== Installation ==

1. Upload the `db-sweeper` folder to `/wp-content/plugins/` or install the ZIP via Plugins - Add New.
2. Activate, then open Tools - DB Sweeper.
3. Press "Run dry-run scan", review the report, tick what you want gone, press "Clean selected".

== Frequently Asked Questions ==

= Is the dry-run really read-only? =

Yes. The scan issues only SELECT COUNT(*) queries.

= What about my backup plugin? =

DB Sweeper complements it - it reduces what needs backing up. Pro additionally writes its own snapshot of the affected tables before each cleanup into uploads/db-sweeper-backups/.

= I uninstalled the plugin - where are my snapshots? =

They stay in uploads/db-sweeper-backups/ (7-day retention while the plugin is active). Delete the folder manually if you want them gone sooner.

== Changelog ==

= 1.0.0 =
* Initial release: dry-run scanner, batched cleanup by category, revision age selector, journal.
