How do you delete backed up Images from WP Smush Pro

I have supersmushed images and instructed the plugin to save backups of the original files. Now I feel that I don't need the backups and would love to delete them. Unfortunately this site was designed by someone else so there are a bunch of /directories for media by year and month.

  • Milan

    Hello frank_gomez

    Hope you are well today and thanks for asking us. :slight_smile:

    If you have smushed your images with option Make a copy of my original images turned on, our WP Smush Pro should have created backup images of the original ones and you can find them in your wp-content/uploads/ folder, each original file will have .bak before file extension, for example it will look like image.bak.jpg.

    And to delete those files you can use FTP client like, FileZilla FTP client (under Windows, on Mac and on Linux).

    - connect to your server
    - navigate to /wp-content/uploads/ folder
    - open "Server -> Remote file search" menu
    - select "Math all of the following" option for "Search conditions"
    - select "Filename" -> "include" rule
    - type ".bak." into the text field next to the rule
    - hit "Search" and give it some fair amount of time

    You should end up with a "Result" box in the same window full of those image "bak" files.

    Make sure that those are files that you do want to remove then select them all ("CTRL+A" in Windows) and delete them (in Windows: right-click on that selected file list and choose "Delete").

    This is operation which can not be reverted back so I'd strongly advise extreme attention. Full backup of an entire site would be best solution here. And for full backup you can leverage our Snapshot Pro plugin if you wish to. :slight_smile:
    Snapshot Pro

    Hope this helps. :slight_smile:

  • Shaun

    I've just done this, for some reason I had to do it differently (perhaps my SFTP permissions).

    Here's what I did, for posterity:

    I used FileZilla, but instead of using the search feature I navigated to the folder and then clicked View -> Directory Listing Filters...

    I clicked "Edit Filter Rules" then created a new filter, called "Show only .bak files", changed the Filter conditions to "Filter out items matching none of the following", and choose "Filename contains .bak".

    I then clicked OK and ticked the filter I just created, so now the folder is filtered, and I can select all and delete!

    It would be great if the plugin had an option to delete all the .bak files it created!


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.