WordPress plugin intelligence profile

Post Media Cleanup

Automatically deletes all associated media files when a post is permanently deleted.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 7.0
Current version2.4.0
WordPress coverageTested up to WordPress 7.0
Minimum stackWP 5.0 · PHP 7.4
Directory statusactive
Last directory update9 Oct 202624d ago
Active installations10Adoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Post Media Cleanup version 2.4.0 as active, updated 24d ago and tested up to WordPress 7.0.

Overview

About this plugin

Post Media Cleanup removes orphaned media files from your server when you permanently delete a post.

When you permanently delete a post, this plugin automatically finds and removes:

  • Featured image
  • Images and files embedded in post content
  • PDFs and any linked files in content
  • All attachments uploaded directly to the post

Key Features

  • Only fires on permanent deletion — moving to trash is always safe
  • Skip Shared Media — never deletes a file used by another post
  • Works per post type — configure exactly which types trigger cleanup
  • Compatible with S3 and cloud storage
  • Multisite ready
  • Developer friendly — filter hooks to extend behaviour

For Developers

Add extra attachments to the deletion list:

add_filter( 'postmediaweb_attachment_ids_to_delete', function( $ids, $post_id ) { $extra = get_post_meta( $post_id, 'my_custom_pdf', true ); if ( $extra ) $ids[] = (int) $extra; return $ids; }, 10, 2 );

Prevent a specific attachment from being deleted:

add_filter( 'postmediaweb_should_delete_attachment', function( $should, $att_id, $post_id ) { if ( $att_id === 999 ) return false; return $should; }, 10, 3 );

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • attachments
  • cleanup
  • delete
  • images
  • media
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 7.0

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 7.0.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to7.0
Minimum requirementsWordPress 5.0 · PHP 7.4
Update activity9 Oct 202624d ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

Version2.2.02.4.0
WordPress compatibility7.0.67.0.7
Version2.1.02.2.0
WordPress compatibility7.0.47.0.6
Version1.0.02.1.0
Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.