Attic — Safe Database Cleanup (Undo-Friendly)
Attic — Safe Database Cleanup (Undo-Friendly)

Attic — Safe Database Cleanup (Undo-Friendly)

0/5 (0 ratings) — active installs Updated Sep 10, 2026

Every plugin you’ve ever installed left something behind. Bloated options, dead cron jobs, orphaned database tables, leftover transients — years of “uninstalled” plugins that never actually cleaned up after themselves. This bloat slows down every page load, because WordPress autoloads a lot of it on every single request. If Site Health told you that you have too many autoloaded options, this is what to do about it.

Attic finds it. Safely.

The problem with every other cleanup plugin: they delete first and ask questions later. One false positive and you’ve lost site settings.

How Attic is different — Quarantine, Never Delete:
– Tables you quarantine are renamed, not dropped — restorable by default for 30 days (configurable)
– Every option is backed up before removal
– Nothing is called orphaned with confidence until Attic has confirmed the owning plugin’s actual files are gone from disk and searched your code for references — weak evidence stays at “review” rather than becoming a recommendation

What Attic finds:

  • Autoloaded option bloat — oversized options that load on every page request, ranked by size against Site Health’s 800 KB line.
  • Ghost cron events — scheduled hooks with no registered callback, firing forever and doing nothing.
  • Orphaned tables — tables no installed plugin claims, with reclaimable megabytes up front.
  • Stranded transients — expired timeout pairs and orphaned rows.
  • Leftovers from deleted plugins — data whose owning plugin is absent from disk entirely.
  • Orphaned meta — post meta, comment meta, user meta, and term meta whose parent row no longer exists.

Two rules outrank every feature:

  1. Quarantine, never delete. Options are stored before removal. Tables are renamed (wp_attic_quarantined_*), never dropped until a purge window passes.
  2. Nothing is called orphaned until your code has been searched for it. Attic reads through your plugins, mu-plugins and themes, plus wp-config.php, looking for every candidate name before promoting anything to high confidence. (PHP, JS, JSON and .inc files; node_modules, vendor, dist and build directories are skipped.)

Every finding shows its evidence inline: which rule fired, what it attributed to and whether that plugin exists on disk, how many code references were found, and the size. A finding you cannot audit is a finding you should not act on.

Who this is for:
– Site owners who’ve installed/removed a lot of plugins over the years
– Agencies maintaining client sites and doing housekeeping
– Anyone whose Site Health page flags “autoloaded options” and doesn’t know what to do about it

How is this different from WP-Optimize or Advanced Database Cleaner?

Those are established cleanup tools with direct delete/optimize actions. Attic takes a different default: nothing is permanently deleted up front — flagged tables are renamed (wp_attic_quarantined_*) and options are backed up first, with one-click restore inside the purge window (default 30 days, configurable). Permanent removal only happens once a quarantined batch passes the purge window un-restored, or if you purge it yourself on purpose. Attic also checks plugin files on disk and searches your code for references before promoting findings to high confidence, so uncertain items stay at “review.”

WP-CLI

Run scans from the command line for automation and CI/CD pipelines:

  • wp attic scan — run a full database audit
  • wp attic findings — list and filter findings
  • wp attic quarantine — manage quarantine batches
  • wp attic status — check plugin status
  • wp attic map status — inspect the bundled attribution map

Scheduled Scans

Catch regressions without manual triggers. Schedule scans via WP-Cron or system cron, and receive an email digest when complete:

  • Daily, weekly, or monthly scan frequency
  • Email summary with findings count, new vs resolved findings, and total autoloaded size
  • Comparison between scans to detect regressions

Trend Charts

Visualize your database health over time:

  • Autoload size trend over the last 10 scans
  • 800 KB Site Health limit indicator
  • Trend direction (increasing, decreasing, stable)
  • Export chart as PNG or table as CSV

Multisite Support

Network admin dashboard for managing database health across all sites:

  • Aggregated findings across the network
  • Per-site scan status and autoload metrics
  • Network-wide scan capability
  • Proper handling of network-active plugins

Attribution Map

A curated map of plugin prefixes to their owning plugin, used to attribute
orphaned data. The map ships with the plugin and is updated with plugin
releases — Attic makes no outbound network requests.

  • wp attic map status — show the bundled map version and entry count
  • Add your own attributions with the attic_prefix_map_entries filter

Third-party libraries

Attic bundles Chart.js 4.4.4 (MIT) at assets/vendor/chart.umd.min.js, used
only to draw the autoload trend chart in the admin. It is served from your own
site. Attic makes no outbound network requests of any kind.

Filters

Protecting things from ever being flagged:

  • attic_protected_options — additional never-flag option names
  • attic_protected_cron_hooks — additional never-flag cron hooks
  • attic_protected_tables — additional never-flag tables
  • attic_protected_transients — additional never-flag transient names

Attribution and scanning:

  • attic_prefix_map_entries — add or override attribution map entries
  • attic_prefix_map_path — load the attribution map from a different file
  • attic_reference_scan_roots — where the code search looks; for unusual layouts and custom content directories
  • attic_scan_rules — add or remove detection rules

Behaviour:

  • attic_manage_capability — which capability may scan and quarantine (default manage_options)
  • attic_purge_after_days — override the quarantine purge window
  • attic_tracked_autoload_options — which options usage tracking watches
  • attic_track_autoload_usage — return false to disable usage tracking entirely