{"id":302094,"date":"2026-06-19T09:10:19","date_gmt":"2026-06-19T09:10:19","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/unlinked-media-cleaner\/"},"modified":"2026-06-19T09:24:44","modified_gmt":"2026-06-19T09:24:44","slug":"s404-orphaned-attachment-scanner","status":"publish","type":"plugin","link":"https:\/\/mri.wordpress.org\/plugins\/s404-orphaned-attachment-scanner\/","author":22006238,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.4","stable_tag":"1.1.4","tested":"7.1","requires":"6.3","requires_php":"8.2","requires_plugins":null,"header_name":"s404 Orphaned Attachment Scanner","header_author":"Surviving404","header_description":"Scans your WordPress Media Library for orphaned attachments and gives you a safe way to delete them. Supporting trash is optional but recommended; enable it via 'define( \"MEDIA_TRASH\", true );' in your wp-config.php.","assets_banners_color":"17234b","last_updated":"2026-06-19 09:24:44","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":56,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"surviving404","date":"2026-06-19 09:21:18"},"1.1.4":{"tag":"1.1.4","author":"surviving404","date":"2026-06-19 09:24:44"}},"upgrade_notice":{"1.0.0":"<p>Initial release. No upgrade steps needed.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3578299,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3578299,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3578299,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3578299,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.4"],"block_files":[],"assets_screenshots":{"Screenshot-1.png":{"filename":"Screenshot-1.png","revision":3578299,"resolution":"1","location":"assets","locale":"","width":1233,"height":888},"Screenshot-2.png":{"filename":"Screenshot-2.png","revision":3578299,"resolution":"2","location":"assets","locale":"","width":1252,"height":821}},"screenshots":{"1":"Dashboard \u2014 scan controls with format filters","2":"Results table \u2014 sorted by file size with bulk actions","3":"Settings page \u2014 tabbed interface","4":"Deletion log"}},"plugin_section":[],"plugin_tags":[2264,4659,163,84,267125],"plugin_category":[50],"plugin_contributors":[258679],"plugin_business_model":[],"class_list":["post-302094","plugin","type-plugin","status-publish","hentry","plugin_tags-attachment","plugin_tags-cleaner","plugin_tags-images","plugin_tags-media","plugin_tags-orphaned","plugin_category-media","plugin_contributors-surviving404","plugin_committers-surviving404"],"banners":{"banner":"https:\/\/ps.w.org\/s404-orphaned-attachment-scanner\/assets\/banner-772x250.png?rev=3578299","banner_2x":"https:\/\/ps.w.org\/s404-orphaned-attachment-scanner\/assets\/banner-1544x500.png?rev=3578299","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/s404-orphaned-attachment-scanner\/assets\/icon-128x128.png?rev=3578299","icon_2x":"https:\/\/ps.w.org\/s404-orphaned-attachment-scanner\/assets\/icon-256x256.png?rev=3578299","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/s404-orphaned-attachment-scanner\/assets\/Screenshot-1.png?rev=3578299","caption":"Dashboard \u2014 scan controls with format filters"},{"src":"https:\/\/ps.w.org\/s404-orphaned-attachment-scanner\/assets\/Screenshot-2.png?rev=3578299","caption":"Results table \u2014 sorted by file size with bulk actions"}],"raw_content":"<!--section=description-->\n<p><strong>s404 Orphaned Attachment Scanner<\/strong> helps you find and remove media files that are sitting in your WordPress Media Library but are not used anywhere in your installation \u2014 not in posts, pages, widgets, theme customizer, ACF fields, WooCommerce products, page-builder data, or any active plugin's settings.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li><strong>Batched AJAX scan<\/strong> \u2014 never times out on large libraries<\/li>\n<li><strong>9 detection layers<\/strong> \u2014 post content, post meta, featured images, widgets, theme customizer, ACF, WooCommerce, page builders (Elementor, Beaver Builder, Divi, Bricks\u2026), ALL active plugin wp_options<\/li>\n<li><strong>Filesystem scan<\/strong> \u2014 checks theme files and optionally the entire WP installation for hard-coded references<\/li>\n<li><strong>Format filtering<\/strong> \u2014 scan only images, video, audio, documents, or specific formats (JPEG, PNG, WebP, SVG\u2026)<\/li>\n<li><strong>Age threshold<\/strong> \u2014 only flag files older than N days, protecting freshly uploaded assets<\/li>\n<li><strong>Trash &amp; Permanent Delete<\/strong> \u2014 move items to Trash for safety (requires <code>define('MEDIA_TRASH', true);<\/code> in your <code>wp-config.php<\/code> to enable the media bin)<\/li>\n<li><strong>Deletion log<\/strong> \u2014 every action is recorded with timestamp and username in your local history<\/li>\n<li><strong>Bulk actions<\/strong> \u2014 select, trash, delete, exclude, or export to CSV<\/li>\n<li><strong>Exclusion list<\/strong> \u2014 permanently hide specific IDs, MIME types, or path patterns from scan results<\/li>\n<li><strong>Scheduled scans<\/strong> \u2014 WP-Cron with daily\/weekly\/monthly frequency and optional email report<\/li>\n<li><strong>Developer hooks<\/strong> \u2014 <code>s404as_is_attachment_used<\/code> filter, <code>s404as_before_delete<\/code> \/ <code>s404as_after_delete<\/code> actions<\/li>\n<\/ul>\n\n<h4>Usage<\/h4>\n\n<ol>\n<li>Go to <strong>Tools \u2192 S404OrphanedAttachmentScanner<\/strong><\/li>\n<li>Optionally select format filters<\/li>\n<li>Click <strong>Start Scan<\/strong><\/li>\n<li>Review results \u2014 preview thumbnails, file sizes, MIME types<\/li>\n<li>Select items and use bulk actions, or use per-row buttons<\/li>\n<li>Export a CSV for your records before deleting<\/li>\n<\/ol>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>s404-orphaned-attachment-scanner<\/code> folder to <code>\/wp-content\/plugins\/<\/code><\/li>\n<li>Activate through <strong>Plugins \u2192 Installed Plugins<\/strong><\/li>\n<li>Navigate to <strong>Tools \u2192 S404OrphanedAttachmentScanner<\/strong><\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"will%20this%20delete%20anything%20automatically%3F\"><h3>Will this delete anything automatically?<\/h3><\/dt>\n<dd><p>No. The plugin never deletes anything automatically. All destructive actions require explicit user confirmation.<\/p><\/dd>\n<dt id=\"what%20is%20the%20%22filesystem%22%20detector%3F\"><h3>What is the \"Filesystem\" detector?<\/h3><\/dt>\n<dd><p>It searches your active theme's PHP\/HTML\/JS\/CSS files for any hard-coded references to an image's filename or URL. You can also enable full-installation scanning (all files under ABSPATH) in Settings.<\/p><\/dd>\n<dt id=\"can%20i%20protect%20specific%20images%20from%20being%20flagged%3F\"><h3>Can I protect specific images from being flagged?<\/h3><\/dt>\n<dd><p>Yes \u2014 add their attachment IDs to the Exclusions list in Settings, or click the \"Exclude\" button on any result row.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20woocommerce%20%2F%20acf%20%2F%20elementor%3F\"><h3>Does it work with WooCommerce \/ ACF \/ Elementor?<\/h3><\/dt>\n<dd><p>Yes. The relevant detectors activate automatically when those plugins are present.<\/p><\/dd>\n<dt id=\"why%20is%20the%20%22trash%22%20button%20not%20working%20or%20missing%20in%20media%20library%3F\"><h3>Why is the \"Trash\" button not working or missing in Media Library?<\/h3><\/dt>\n<dd><p>By default, WordPress disables the recycle bin for media files. To enable it and make the \"Move to Trash\" button functional, add this line to your <code>wp-config.php<\/code> file:\n    define( 'MEDIA_TRASH', true );<\/p><\/dd>\n<dt id=\"what%20php%20version%20is%20required%3F\"><h3>What PHP version is required?<\/h3><\/dt>\n<dd><p>PHP 7.4 or higher.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"Scan your WordPress Media Library for orphaned attachments and safely delete them to reclaim disk space.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/302094","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=302094"}],"author":[{"embeddable":true,"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/surviving404"}],"wp:attachment":[{"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=302094"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=302094"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=302094"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=302094"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=302094"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/mri.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=302094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}