A simple plugin to delete attached media files e.g. images/videos/documents, when the post is deleted. Supports Elementor, Divi Builder, Thrive Archit …
As of April 2026, Delete Post with Attachments is a WordPress post plugin with 1.0K+ active installations and a 4.2/5 rating from 6 reviews. It has been downloaded 9.1K+ times in total. Requires WordPress 4.1+ and PHP 5.6+. Available on WordPress.org since 2021. Download volume is stable this week. Top alternative: Header and Footer Scripts.
By default, when you delete a post or page, any associated media files or attachments to that post do not get deleted. Keeping these orphan files to your server will eat up a lot of precious web space for no reason.
Using this plugin when you delete a post, any associated attachments will also get deleted automatically.
Before deleting any media file or attachment the plugin smartly checks that the attachment is not in use elsewhere, i.e. on any other post, page, or product.
Works with popular Page Builders:
Works with all popular plugins such as:
Features:
Perfect! No more bulky trash files left behind!!!!! Thank you so much!
It does what it says. Thanks.
This plugin is very useful for deleting unused posts and deleting media that takes up space. Please continue developing this plugin because it really helps save storage. Thank you very much
I downloaded this plugin just a few minutes ago and already know it’s exactly what I need. The only thing I’d like to see changed is the opacity setting of the announcement banners that are displayed. They’re a bit hard to read until you hover over them. I’m going to try and contact the developer to see if I can get a modification done.
Thank you
| WordPress | 4.1+ requiredTested up to 6.8.5 |
| PHP | 5.6+ required |
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.