{"id":314134,"date":"2026-06-01T18:38:20","date_gmt":"2026-06-01T18:38:20","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/ultimate-media-cleanup\/"},"modified":"2026-06-01T18:37:43","modified_gmt":"2026-06-01T18:37:43","slug":"coffeewp-media-cleanup","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/coffeewp-media-cleanup\/","author":20193771,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.3.2","stable_tag":"1.3.2","tested":"7.0","requires":"5.8","requires_php":"7.4","requires_plugins":null,"header_name":"CoffeeWP Media Cleanup \u2013 Scan and Remove Unused Media and Orphan Thumbnails","header_author":"Elie Hanna","header_description":"Manage thumbnail sizes, scan media files, detect unused media, and clean up with backup safety.","assets_banners_color":"","last_updated":"2026-06-01 18:37:43","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":51,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.3.2":{"tag":"1.3.2","author":"eliehanna","date":"2026-06-01 18:37:43"}},"upgrade_notice":{"1.3.2":"<p>First public release.<\/p>"},"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.3.2"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"Pre-scan settings step \u2014 pick thumbnail sizes, set batch size, see page-builder compatibility.","2":"Scan step \u2014 live progress as the wizard walks the uploads tree.","3":"Results step \u2014 stats grid, sortable \/ filterable table, batch action bar.","4":"Actions modal \u2014 pick which clean actions to run on the selected rows, with safety disclaimer.","5":"Trash view \u2014 listing of moved files with restore + permanent-delete controls.","6":"Logs view \u2014 daily activity log files with download links."}},"plugin_section":[],"plugin_tags":[1346,3786,84,187,2956],"plugin_category":[50,52],"plugin_contributors":[212138],"plugin_business_model":[],"class_list":["post-314134","plugin","type-plugin","status-publish","hentry","plugin_tags-attachments","plugin_tags-cleanup","plugin_tags-media","plugin_tags-optimization","plugin_tags-thumbnails","plugin_category-media","plugin_category-performance","plugin_contributors-eliehanna","plugin_committers-eliehanna"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/coffeewp-media-cleanup.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>CoffeeWP Media Cleanup helps you reclaim disk space and tidy up your WordPress media library without risking data loss. Every destructive action moves files to an internal trash so you can recover anything you did not mean to delete.<\/p>\n\n<p>A guided three-step wizard walks you through the work:<\/p>\n\n<ol>\n<li><strong>Pre-scan settings<\/strong> \u2014 review detected page-builder compatibility, pick which thumbnail sizes WordPress should generate, and choose a batch size that fits your server.<\/li>\n<li><strong>Scan<\/strong> \u2014 walk your uploads tree and detect which files are unused, broken, or missing.<\/li>\n<li><strong>Results<\/strong> \u2014 see what is unused, what is broken, what is missing, which thumbnails are stale, and run targeted clean actions on selected rows or across the whole result set.<\/li>\n<\/ol>\n\n<p><strong>Clean actions:<\/strong><\/p>\n\n<ul>\n<li>Delete unused media (file moves to trash; attachment record soft-deleted).<\/li>\n<li>Delete missing files (clears DB rows whose backing file is gone).<\/li>\n<li>Delete broken-link records (clears attachment posts whose files never existed).<\/li>\n<li>Delete orphan thumbnails (removes derivative files with no attachment parent).<\/li>\n<li>Regenerate missing thumbnails (re-runs WordPress's image-size pipeline).<\/li>\n<li>Add orphan files to the Media Library (creates attachment records for unattached files).<\/li>\n<\/ul>\n\n<p><strong>Trash + restore:<\/strong><\/p>\n\n<p>A dedicated Trash view lists every file the plugin has moved out. Restore any item with one click, permanently delete individual rows, or empty the trash. Optional auto-delete after N days. Trashed files live under <code>wp-content\/uploads\/cwpm\/trash\/<\/code> and are protected from being overwritten by new uploads (filename collisions are detected and avoided).<\/p>\n\n<p><strong>Activity log:<\/strong><\/p>\n\n<p>Every clean action writes to a daily log file at <code>wp-content\/uploads\/cwpm\/logs\/<\/code>. The Logs view shows each file with size and download link. Optional auto-delete after 30 days.<\/p>\n\n<p><strong>Designed to be safe:<\/strong><\/p>\n\n<ul>\n<li>Soft-delete by default \u2014 no file is ever permanently removed except via the explicit \"Empty trash\" or \"Permanent delete\" controls.<\/li>\n<li>Per-row checkboxes and a typed-confirmation disclaimer modal gate the destructive actions.<\/li>\n<\/ul>\n\n<h3>External Services<\/h3>\n\n<p>This plugin does not connect to any external services. No data leaves your WordPress install.<\/p>\n\n<h3>Third-Party Libraries<\/h3>\n\n<p>The plugin bundles these GPL-compatible libraries (LICENSE files shipped alongside each):<\/p>\n\n<ul>\n<li><strong>Color Punch<\/strong> (MIT) \u2014 internal CSS \/ JS UI framework. Shipped at <code>assets\/vendor\/color-punch\/<\/code>.<\/li>\n<li><strong>Font Awesome Free<\/strong> (CC BY 4.0 icons + SIL OFL 1.1 fonts + MIT code) \u2014 icon font. Shipped at <code>assets\/vendor\/font-awesome\/<\/code>. Upstream: https:\/\/fontawesome.com\/<\/li>\n<li><strong>Rubik<\/strong>, <strong>Outfit<\/strong>, <strong>Fira Code<\/strong> fonts (SIL OFL 1.1) \u2014 bundled with Color Punch under <code>assets\/vendor\/color-punch\/fonts\/<\/code>.<\/li>\n<li><strong>Catppuccin<\/strong> color palette (MIT) \u2014 applied via Color Punch theme variants. Upstream: https:\/\/github.com\/catppuccin\/catppuccin<\/li>\n<\/ul>\n\n<h3>Data + Storage<\/h3>\n\n<p><strong>Custom database tables<\/strong> (created on activation, dropped only on uninstall when you enable \"Delete data on uninstall\"):<\/p>\n\n<ul>\n<li><code>{prefix}_cwpm_scan_results<\/code> \u2014 per-file scan output (rel_path, attachment_id, usage flags, thumbnail status).<\/li>\n<li><code>{prefix}_cwpm_trash<\/code> \u2014 trashed-file ledger (rel_path, original_path, file_name, file_size, trashed_at).<\/li>\n<li><code>{prefix}_cwpm_file_hashes<\/code> \u2014 md5 hashes computed during scan; reserved for future identity-matching features.<\/li>\n<\/ul>\n\n<p><strong>On-disk storage<\/strong> (under <code>wp-content\/uploads\/cwpm\/<\/code>):<\/p>\n\n<ul>\n<li><code>wp-content\/uploads\/cwpm\/trash\/<\/code> \u2014 files moved by the trash system. Recoverable until you Permanent-Delete or Empty-Trash.<\/li>\n<li><code>wp-content\/uploads\/cwpm\/logs\/<\/code> \u2014 daily activity logs (one file per day, e.g. <code>cwpm-2026-05-13.log<\/code>).<\/li>\n<\/ul>\n\n<p>Both folders contain <code>.htaccess<\/code> + <code>index.php<\/code> stubs to prevent direct web access.<\/p>\n\n<p><strong>Options + transients:<\/strong> all keys start with <code>cwpm_<\/code>. Stored in <code>wp_options<\/code>. Per-user preferences (theme, table density) stored in <code>wp_usermeta<\/code> with the same prefix.<\/p>\n\n<p><strong>Custom post type:<\/strong> <code>cwpm-trash<\/code> \u2014 used as a soft-delete state for attachment posts. The attachment record stays in <code>wp_posts<\/code> but is hidden from the Media Library until restored.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin folder to <code>\/wp-content\/plugins\/coffeewp-media-cleanup\/<\/code>, or install from the WordPress Plugins screen.<\/li>\n<li>Activate <strong>CoffeeWP Media Cleanup<\/strong> from the Plugins screen.<\/li>\n<li>Open <strong>Media Cleanup<\/strong> in the WordPress admin sidebar.<\/li>\n<li>Step through Pre-scan settings \u2192 Scan \u2192 Results. The first scan may take several minutes on large libraries; the wizard reports progress and resumes if your browser times out.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20plugin%20modify%20original%20media%20files%3F\"><h3>Does this plugin modify original media files?<\/h3><\/dt>\n<dd><p>No. Originals are never altered. Files marked unused are moved to <code>wp-content\/uploads\/cwpm\/trash\/<\/code> and can be restored. Cleanup actions only remove derivative thumbnails or trash unused files.<\/p><\/dd>\n<dt id=\"what%20happens%20when%20i%20delete%20an%20%22unused%22%20file%3F\"><h3>What happens when I delete an \"unused\" file?<\/h3><\/dt>\n<dd><p>The file moves to <code>wp-content\/uploads\/cwpm\/trash\/&lt;year&gt;\/&lt;month&gt;\/&lt;filename&gt;<\/code> and the attachment's <code>post_type<\/code> changes to <code>cwpm-trash<\/code> (it disappears from the Media Library but still exists in the database). Restore from the Trash view to undo. Permanent delete only happens via \"Empty trash\", \"Permanent delete\" on a single row, or the auto-delete-after-N-days setting if you enable it.<\/p><\/dd>\n<dt id=\"how%20is%20%22unused%22%20detected%3F\"><h3>How is \"unused\" detected?<\/h3><\/dt>\n<dd><p>The scanner inspects post content (including Gutenberg blocks, the classic editor, post excerpts), post meta (serialized + JSON arrays), widget content, theme support (custom logo, site icon, header \/ background image), WooCommerce product images and gallery IDs, and <code>wp-image-N<\/code> CSS classes. WPML \/ Polylang translations resolve back to the original attachment.<\/p><\/dd>\n<dt id=\"will%20it%20slow%20down%20my%20site%3F\"><h3>Will it slow down my site?<\/h3><\/dt>\n<dd><p>The scanner runs only when you trigger it from the admin wizard \u2014 no work happens on the public site or in cron. Each scan request is batched (default 50 files per request) to stay within typical PHP execution limits; the batch size is configurable.<\/p><\/dd>\n<dt id=\"will%20deleting%20the%20plugin%20remove%20all%20my%20data%3F\"><h3>Will deleting the plugin remove all my data?<\/h3><\/dt>\n<dd><p>By default, no. Uninstalling the plugin from the Plugins screen preserves the custom tables, options, and the <code>wp-content\/uploads\/cwpm\/<\/code> folder so an accidental delete is recoverable. To opt into a complete teardown on uninstall, enable \"Delete data on uninstall\" in the plugin settings before deleting.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.3.2<\/h4>\n\n<ul>\n<li>First public release.<\/li>\n<\/ul>","raw_excerpt":"Step-by-step wizard to clean unused media, orphan thumbnails, and broken attachments \u2014 safely, with one-click restore.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/314134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=314134"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/eliehanna"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=314134"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=314134"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=314134"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=314134"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=314134"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=314134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}