Clarification about media deletion when using the “Delete unused records” option

Pending

Import WP Pro Updated 3 weeks ago 3 Replies

Sylvain asked 3 weeks ago on October 16, 2025 at 1:02 pm

Hi,

 

I have a question regarding the “Delete – Allow deletion of previously imported records that are no longer in the import file” option.

 

From my understanding, this feature removes posts or custom post types that are no longer present in the import file, but it does not delete the associated media files (e.g. images uploaded through the import).

 

Could you please confirm if this is correct?

And if so, what’s the recommended way to automatically remove unused media files (those that were attached to deleted posts) after an import?

 

Thanks a lot for your help!

Best regards,

J

James replied Support Agent

3 weeks ago on October 16, 2025 at 5:15 pm

Yes, enabling this option on the importer will only delete the record if it has previosuly been imported and is no longer present, and media files are kept as they may be connected to multiple records based on other imports.

If you want to remove redundent media items you could use a media cleaner plugin, or i can have a look and see if anything is possible to auto remove items but this depends if any connection already exists, if not i can possibly have a look at adding a connection but this will only effect things going forward.

James

SB

Sylvain replied

3 weeks ago on October 17, 2025 at 7:54 am

Hi,

My media related to the import are not used elsewhere, so yes, I would be very interested in an option to automatically delete them if they are linked to imported data that is no longer present in the .csv file.

J

James replied Support Agent

3 weeks ago on October 20, 2025 at 9:14 pm

Hi Sylvain,

A new option has been added to the permissions tab of the importer, that if enabled will remove any attachments/media connected to a post type when it is removed.

To see if an media item / attachment is attached to a post record, open the item in the media section of wordpress and if it is connected, it will say "uploaded to"

James