Removing attachments that have been replaced by newer versions

Author
Topic
#1374

On a client site, we have many PDFs that are periodically updated. The client uploads the new version to the page, but doesn’t delete the old version.

Now I am wanting to use Smart Cleanup Tools to remove these old versions. Is this possible? It seems that WordPress still sees these PDF files as being “attached” to the page, even though they are not linked any more.

I thought I would be able to use this plugin, but now I’m not sure that “missing parent posts” or “unattached” really are going to delete the right files.

Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
Author
Replies
  • #1376

    Hello,

    These two are doing as the name says:

    – “missing parent posts” -> attachment is in the system, it has attached flag on, but the post it should be attached to is removed
    – “unattached -> attachment is not attached to any posts.

    You can also select attachment type to target only PDF files in this case. Make sure you backup your data just in case when you run it for the first time in case you run into any problems.

    Regards,
    Milan

  • #1377

    Thank you for the clarification. Unfortunately neither of these functions will do what we need. Here’s what we require:

    Find and delete attachments that ARE attached to posts BUT are not linked in the post content.

    Would you accept a feature request for this functionality? If necessary, we could pay to have such a feature included, so please provide a quote if you’re interested.

  • #1378

    Hi,

    This is tricky thing to. Can you tell me, you are only linking to these attachments through post content? How it is done, direct link, shortcode or what? Let me think about it, if this takes significant time to be done, I will not be able to add it to plugin since there is no interest for this.

    Milan

  • #1383

    Yes, we are only linking to these attachments through post content, and it is done through direct link (not shortcode).

    Let me know what you decide, thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Removing attachments that have been replaced by newer versions’ is closed to new replies.