Refaxination scans wp-content/uploads and cross-references every file against the database.
Attachments, post content, post meta, options, and third-party plugins, to identify files that are no longer referenced anywhere.
Features:
This plugin does not auto-delete anything. Every file operation is logged and reversible.
Scan the filesystem for files:
wp refaxination scan files
Scan the database for references:
wp refaxination scan refs
Generate a report:
wp refaxination report
Run with --batch=100 to process in batches (recommended for large sites):
wp refaxination scan files --batch=100