WordPress – Delete Thousands of Images in Media Library

Our WordPress media library is susceptible to filling up with unnecessary files, as we are constantly uploading files to test how they will look on our site. Another reason that can cause us to have a lot of unnecessary files is that we replace images due to changes in the style of our website.

Either way, you may want to remove hundreds of files from your media library and at this point, it is difficult for you to do so, as you have to find the files to remove from thousands of other files. And that will surely take hours and hours.

That’s why we want to show you how to remove hundreds of files from your media library using a spreadsheet that allows you to massively apply changes to thousands of files. Just follow a few simple steps.

1- Install the Media Library Spreadsheet plugin

This plugin allows you to apply massive editions to your files. It displays all your files on a spreadsheet where you can quickly edit the files.

You can download the plugin here:

Download Media Library Spreadsheet Plugin - or - Read more

Once installed and activated, go to Sheet Editor > Edit Media, and you’ll see the media spreadsheet with all your files.

2- Open the “Bulk Edit” tool

This tool will allow you to delete hundreds of images in just a few seconds. It’s located on the plugin’s toolbar, so just click on it.

3- Filter the files you’ll delete

We want to show you how easy it is to filter the files in order to delete them. You just need to select the I want to search rows to update option in the Select the rows that you want to update dropdown.

This will open a Search tool, and we want to show you these three options to filter your files.

For this you need to enter a specific keyword in the Contains keyword field.

Then, tick the Enable advanced filters checkbox and use these values.

  • Field key: Format
  • Operator: CONTAINS
  • Value: image

Now, just click on Run search and the plugin will filter all the images containing the selected keyword.

 

To filter the files by date, you need to tick the Enable advanced filters checkbox and select these values.

  • Field key: Format
  • Operator: CONTAINS
  • Value: image

Now you need to enter the dates in the Initial date and Final date fields. If it’s a specific day, enter the same date in both fields.

Finally, click on Run search and all your images uploaded on the selected date will be filtered.

You can delete all the .png or all the .jpeg images. For that, just tick the Enable advanced filters and select these values:

  • Field key: Format
  • Operator: CONTAINS
  • Value: “jpeg” or “png”

Finally, click on Run search and your images will be filtered.

 

4- Delete the filtered images

Once you have filtered your images, select these values in the Bulk Edit fields.

  • Select the rows that you want to update: I want to select rows to update
  • What field do you want to edit: Status
  • Select type of edit: Set value
  • Replace existing value with this value: Delete completely
  • Click on Execute now

Done!

It’s that simple. You can delete thousands of files with just these simple steps.

You can download the plugin here:

Download Media Library Spreadsheet Plugin - or - Read more

Do you need help?

You can receive instant help in the live chat during business hours, or you can contact us and we will help you via email.

Close Menu