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

Pending

Import WP Pro Updated 2 days ago 2 Replies

Sylvain asked 2 days 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

2 days 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

2 days 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.