Title: Auto Attachments Cleaner
Author: Stefano
Published: <strong>December 22, 2024</strong>
Last modified: March 1, 2025

---

Search plugins

![](https://ps.w.org/auto-attachments-cleaner/assets/banner-772x250.png?rev=3211920)

![](https://ps.w.org/auto-attachments-cleaner/assets/icon-256x256.png?rev=3211920)

# Auto Attachments Cleaner

 By [Stefano](https://profiles.wordpress.org/stefacchio/)

[Download](https://downloads.wordpress.org/plugin/auto-attachments-cleaner.1.0.4.zip)

 * [Details](https://test.wordpress.org/plugins/auto-attachments-cleaner/#description)
 * [Reviews](https://test.wordpress.org/plugins/auto-attachments-cleaner/#reviews)
 *  [Installation](https://test.wordpress.org/plugins/auto-attachments-cleaner/#installation)
 * [Development](https://test.wordpress.org/plugins/auto-attachments-cleaner/#developers)

 [Support](https://wordpress.org/support/plugin/auto-attachments-cleaner/)

## Description

Automatically deletes attachments (images, videos, files etc…) linked to a page,
post or custom post type when it is deleted.
 Support Woo Commerce and all plugins
that support Custom Post Types.

This plugin deletes also relative thumbnails of images.

Goodbye junk, orphaned and forgotten files clogging up server space over time!

#### Author Plugin Website

Here you can find other premium plugins:
 [Stefano Fattori – WordPress Plugins](https://www.stefanofattori.it/wordpress/plugins/)

## Screenshots

 * [[
 * Post deleted notice
 * [[
 * Plugin settings
 * [[
 * Where plugin works (trash)
 * [[
 * Warning notice on Trash Page

## Installation

 1. Upload `auto-attachment-cleaner` folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Select the post types on which the plugin should work on the page `Settings > Auto
    Attachments Cleaner` and save settings

## FAQ

### When are attachments deleted?

When the post is permanently deleted from the trash or the trash is emptied

### Are all thumbnails created by wordpress also deleted?

Yes, a native WordPress function is used for deleting images, which also deletes
all thumbnails created

### Is Woo Commerce supported?

Yes Woo Commerce is supported, all plugin that works with Custom Post Type are compatible.

## Reviews

![](https://secure.gravatar.com/avatar/d2ddc9ed9b33207eb55a2fbebc6dedd4908d0451ba43787dcf28adf387415b25?
s=60&d=retro&r=g)

### 󠀁[Really useful!](https://wordpress.org/support/topic/really-useful-318/)󠁿

 [jessica1490](https://profiles.wordpress.org/jessica1490/) March 8, 2025

I’ve been looking for this feature for years! I’ve finally found it… really useful
plugin, well done and working, so I don’t have to delete each file manually any 
more!

![](https://secure.gravatar.com/avatar/0750c31ad2e4acbd1e971a549974bf676de83ffafccd57e2dd7e2139fdd9e88d?
s=60&d=retro&r=g)

### 󠀁[Very useful](https://wordpress.org/support/topic/very-useful-3582/)󠁿

 [Jose Mortellaro](https://profiles.wordpress.org/giuse/) February 28, 2025 1 reply

Very useful plugin! I recommend checking whether the images your plugin is about
to delete are attached to other posts. Otherwise, you might accidentally remove 
images you intended to keep. Additionally, it’s best to display a clear warning 
message before deletion to prevent unintended data loss.

![](https://secure.gravatar.com/avatar/91db05863fab71aeade0dec63660fe332672727d0f7d5dac4fec60fb76f8547e?
s=60&d=retro&r=g)

### 󠀁[Best plugin ever!](https://wordpress.org/support/topic/best-plugin-ever-503/)󠁿

 [Stefano](https://profiles.wordpress.org/stefacchio/) January 30, 2025

Absolutely a must-have for not taking up unnecessary server space. it should be 
integrated into wordpress! Deletes attachments automatically when articles are deleted.

 [ Read all 3 reviews ](https://wordpress.org/support/plugin/auto-attachments-cleaner/reviews/)

## Contributors & Developers

“Auto Attachments Cleaner” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Stefano ](https://profiles.wordpress.org/stefacchio/)

“Auto Attachments Cleaner” has been translated into 1 locale. Thank you to [the translators](https://translate.wordpress.org/projects/wp-plugins/auto-attachments-cleaner/contributors)
for their contributions.

[Translate “Auto Attachments Cleaner” into your language.](https://translate.wordpress.org/projects/wp-plugins/auto-attachments-cleaner)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/auto-attachments-cleaner/),
check out the [SVN repository](https://plugins.svn.wordpress.org/auto-attachments-cleaner/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/auto-attachments-cleaner/)
by [RSS](https://plugins.trac.wordpress.org/log/auto-attachments-cleaner/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.4

 * [NEW] – Introduced Warning notice on Empty Trash button and on post row actions
   near to ‘permanently delete’ link

#### 1.0.3

 * [FIX] – Bug Fix

#### 1.0.2

 * [OPTIMIZATION] – Improve performance query

#### 1.0.1

 * [FIX] – Fixed settings link into plugins page
 * [FIX] – Fixed notice when delete multiple posts

#### 1.0.0

 * Plugin created

## Meta

 *  Version **1.0.4**
 *  Last updated **1 year ago**
 *  Active installations **80+**
 *  WordPress version ** 5.0 or higher **
 *  Tested up to **6.7.5**
 *  PHP version ** 7.0 or higher **
 *  Languages
 * [English (US)](https://wordpress.org/plugins/auto-attachments-cleaner/) and [Italian](https://it.wordpress.org/plugins/auto-attachments-cleaner/).
 *  [Translate into your language](https://translate.wordpress.org/projects/wp-plugins/auto-attachments-cleaner)
 * Tags
 * [attachments](https://test.wordpress.org/plugins/tags/attachments/)[custom posts type](https://test.wordpress.org/plugins/tags/custom-posts-type/)
   [media](https://test.wordpress.org/plugins/tags/media/)[pages](https://test.wordpress.org/plugins/tags/pages/)
   [posts](https://test.wordpress.org/plugins/tags/posts/)
 *  [Advanced View](https://test.wordpress.org/plugins/auto-attachments-cleaner/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  3 5-star reviews     ](https://wordpress.org/support/plugin/auto-attachments-cleaner/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/auto-attachments-cleaner/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/auto-attachments-cleaner/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/auto-attachments-cleaner/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/auto-attachments-cleaner/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/auto-attachments-cleaner/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/auto-attachments-cleaner/reviews/)

## Contributors

 *   [ Stefano ](https://profiles.wordpress.org/stefacchio/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/auto-attachments-cleaner/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://www.stefanofattori.it/donazione-wordpress-community-temi-plugins/)