Purrge

By Eldhose

0+ active installationsVersion 1.0.1

A lightweight database maintenance utility. Purges expired transients, orphaned metadata, old revisions, and spam to make your database purr.

Description

Purrge keeps your WordPress database fast, lean, and purring happily without the bulk and bloat of heavyweight maintenance suites.

Over time, active WordPress installations accumulate hundreds of megabytes of expired transients, old post revisions, abandoned auto-drafts, spam comments, and orphaned metadata left behind by deleted plugins. Purrge detects and scoops out this junk safely.

What Purrge Cleans

  • Expired & Orphaned Transients: Cleans out expired timeout options and their corresponding transient values from the options table.
  • Old Post Revisions & Granular Selector: Safely retains your latest N revisions per post (default: 3) or open the Granular Revisions Manager to inspect post revisions hierarchically, select specific ones with quick-presets, and delete only the revisions you choose.
  • Auto-Drafts & Trash: Cleans out abandoned auto-drafts and empties trashed posts/pages.
  • Spam & Trash Comments: Purges comments flagged as spam, trashed comments, and outdated pingbacks/trackbacks.
  • Orphaned Metadata: Detects and purges dangling rows in postmeta, termmeta, commentmeta, and term_relationships that have lost their parent entities.
  • Interactive Database Tables Inspector: Live explorer of all database tables with row counts, data size, index size, and origin plugin classification (Core, WooCommerce, Elementor, Eventward, etc.).
  • Table Maintenance & Clearing: Optimize tables on demand, safely empty (truncate) non-core log/session tables, or drop leftover orphan tables from uninstalled plugins (with strict core table protection).
  • Database Table Overhead: Defragments tables with unused allocated storage (OPTIMIZE TABLE) to reclaim disk space.

Key Highlights

  • Dry-Run Inspection First: Live dashboard statistics calculate your total database size, table count, and exact clutter rows before anything is deleted.
  • Real-time AJAX Execution: Clean individual items or perform a satisfying “Deep Purrge All” in one click with smooth progress feedback—no full-page reloads.
  • Automated Background Sweeps: Optional scheduled cleanup via WP-Cron (Daily, Weekly, or Monthly) to keep your database tidy on autopilot.
  • Zero Dependency / Lightweight: Pure WordPress APIs and vanilla JavaScript. No external libraries, tracking, or bloat.

Installation

  1. Upload the purrge directory to the /wp-content/plugins/ directory, or install directly via your WordPress Admin Plugins screen.
  2. Activate the plugin through the Plugins screen in WordPress.
  3. Navigate to the top-level Purrge menu in your WordPress admin sidebar to inspect your database and begin cleaning.

FAQ

Is Purrge safe to use?

Yes. Purrge relies on safe WordPress query practices and cleans associated child metadata (like postmeta and commentmeta) before deleting parent IDs. Destructive actions (like permanently emptying trashed posts) require explicit confirmation.

Will purging revisions delete my published content?

No. Revisions are simply past edit histories. Purrge retains the latest revisions (customizable in settings, default: 3) so you can still revert recent changes, while shedding older versions.

Can I automate cleanups?

Yes. In the Purrge Settings sidebar, you can set the Automated Background Sweep to run Daily, Weekly, or Monthly.

Changelog

1.0.1

  • Changed default Automated Background Sweep schedule to Disabled (Manual Only) so background cleanups are strictly opt-in on fresh installs.
  • Updated the admin dashboard header logo to match the new Purrge icon.
  • Updated the Automated Sweep stat card to refresh live immediately when saving settings.

1.0.0

  • Initial release of Purrge.
  • Real-time database scanner and overhead calculator.
  • Single-item and Deep Purrge All AJAX cleanup actions.
  • Interactive Database Tables Manager with row counts, data/index size, and plugin origin classification.
  • Table maintenance tools: safe optimize, non-core truncate, and non-core drop with strict core table protection.
  • Dedicated Manage Revisions tab with hierarchical post view, quick selection rules, and granular revision purging.
  • Configurable post revision retention thresholds.
  • WP-Cron automated maintenance scheduler.
  • Top-level WordPress Admin navigation.