Autoremove Attachments
by Polygon Themes 5 (15 reviews)

Autoremove Attachments

Remove child attachments when parent post, page or custom post type is deleted.

Autoremove Attachments ranks #4,136 among WordPress.org plugins with 3,000+ active installations, is #455 of 6,303 in the Media category, a 5/5 rating from 15 reviews, and was last updated May 10, 2026. Data from WordPress.org, refreshed twice daily — see methodology.

Tested up to WP 6.9.7 (Current: 7.1)
v1.3.1 Current Version v1.3.1
Updated 4 months ago Last Update on 10 May, 2026
Refreshed 6 hours ago Last Refreshed on
#455 of 6,303 in Media Top 5% by installs Downloads -34.5% this week
View on WordPress.org
Rank
#4,136
-13 this week
Active Installs
3K+
-21.2%
KW Avg Position
76.5
No change
Downloads
39K
+9 today
Support Resolved
100%
No change
Rating
100%
Review 5 out of 5
5 (15 reviews)

Next Milestone 4K

Total Progress 80.1%
3K+ 4K+
490
Ranks to Climb
-
Growth Needed
8,000,000
Active Installs
Pro

Unlock Exact Install Count

See the precise estimated active installs for this plugin, calculated from real-time ranking data.

  • Exact install estimates within tiers
  • Track install growth over time
  • Milestone progress predictions
Upgrade to Pro
Need 199 more installs to reach 4K+

Rank Changes

4,119 4,125 4,131 4,136 4,142 09-09-2026 10-09-2026 11-09-2026 12-09-2026 13-09-2026 14-09-2026 15-09-2026 16-09-2026
4,119 4,128 4,137 4,145 4,154 01-09-2026 02-09-2026 03-09-2026 04-09-2026 05-09-2026 06-09-2026 07-09-2026 08-09-2026 09-09-2026 10-09-2026 11-09-2026 12-09-2026 13-09-2026 14-09-2026 15-09-2026 16-09-2026
Current #4,136
Change
Best #

Upgrade to Pro

Unlock 30-day and 90-day rank history charts with a Pro subscription.

Upgrade Now

Active Installs Growth

Active Installs 0,000,000+
Growth +0.0%
Peak 0,000,000

Downloads Growth

0 10 20 30 40 09-09-2026 10-09-2026 11-09-2026 12-09-2026 13-09-2026 14-09-2026 15-09-2026 16-09-2026
0 10 20 30 40 01-09-2026 02-09-2026 03-09-2026 04-09-2026 05-09-2026 06-09-2026 07-09-2026 08-09-2026 09-09-2026 10-09-2026 11-09-2026 12-09-2026 13-09-2026 14-09-2026 15-09-2026 16-09-2026
Downloads
Growth
Peak

Upgrade to Pro

Unlock 30-day, 90-day, and yearly download history charts with a Pro subscription.

Upgrade Now

Reviews & Ratings

5.0
15 reviews
Overall 100%
5
15 (100%)
4
0 (0%)
3
0 (0%)
2
0 (0%)
1
0 (0%)

Support Threads Overview

Resolved
Unresolved
1
Total Threads
1
Resolved
0
Unresolved
100%
Resolution Rate

Security History

Source: WPVulnerability

No known vulnerabilities on record for Autoremove Attachments. Checked 1 month ago.

TL;DR

AI summary of the plugin's readme

This plugin is for WordPress site owners and administrators managing posts, pages, or custom post types with attached media files. It automatically deletes child media attachments when their parent content is permanently removed, preventing orphan files from accumulating in the Media Library.

  • Auto-deletes child attachments on parent deletion
  • Triggers only on trash emptying, not soft delete
  • Checks if attachments used elsewhere
  • Skips removal to prevent broken links
  • Disable checks for improved performance
  • WooCommerce compatibility
  • Easy Digital Downloads compatibility
  • Only removes WordPress-tracked files

Frequently Asked Questions

Common questions about Autoremove Attachments

Yes, it does. It works with posts, pages and custom post types. All child attachments are removed when the parent is deleted.
The files are removed when the parent post, page, or custom post type is permanently removed. A soft delete that places it in Trash will not trigger the removal of your attachments. The purge happens when you empty your trash.
Yes, you can. By default, all media files attached to a post, page or custom post type are removed automatically. If you need granular control you can use the filter autoremove_attachments_allowed to define custom rules for controlling when the child attachments should be removed automatically. Here is an example on how you can remove the attachments only for specific custom post types: function autoremove_attachments_custom_rule() { // Global variables. global $post_id; // Variables. $post_type = get_post_type( $post_id ); $allowed_post_types = array( 'project', 'product', ); // Default return value. $allowed_to_remove = false; // Custom rules for removing attachments. if ( in_array( $post_type, $allowed_post_types ) ) { $allowed_to_remove = true; } // Return. return $allowed_to_remove; } add_filter( 'autoremove_attachments_allowed', 'autoremove_attachments_custom_rule' ); The returned value should be true for the cases in which you want the attachments removed. (false otherwise)
Depending on how you use the plugin, the answer can be either yes, or no. If you keep the plugin running with the additional checks enabled, you have no restrictions on how you can use your attachments. (you can use your media files in multiple locations, without the fear of broken links caused by their removal) If you disable the additional checks, you need to make sure you don't reuse your media files between posts. If you do and the parent is deleted, you will end up with broken links in all the other locations where the removed attachments were used. Regardless of how you use the plugin, if you need to use an attachment over and over again, upload it from the global Media Library menu. ( Media > Add New ) This way, it won't be attached as a child to a specific post, page, or custom post type and you will be able to use it without restrictions.

Sign In / Register

You need to sign in or register to use this feature.