Keep a Clean WordPress Uploads Folder by Deleting Unused Images

Keep a Clean WordPress Uploads Folder by Deleting Unused Images

Many times while creating pages and posts a user will add images to the uploads folder that they end up not using.

If you want to keep a clean uploads folder, from time to time you’ll want to delete all of your unused images.

Media Cleaner analyzes the media entries used on your site, plugins, and themes, and lists unused media files in a separate dashboard. You can then opt to delete these files individually and they will be moved to the plugin’s internal trash, allowing you to retrieve these or delete them permanently.

Media Cleaner wordPress plugin.
Clean your Media Library of media entries and files that aren’t being used on your website.

DNUI (Delete Not Used Image) is another plugin you can use to clean out your unused images. This plugin will search for images on your database and tell you if the image is being used. If not, you have the option to delete some or all of these files.

DNUI search unused/used image in database screen
Delete unused images in your database to free up space.

Note: The plugin page on WordPress.org states that “This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.” However, we recently tested it on a WordPress site with version 5.3 installed (December 2019) and the plugin worked fine.

FREE EBOOK
Your step-by-step roadmap to a profitable web dev business. From landing more clients to scaling like crazy.

By downloading this ebook I consent to occasionally receive emails from WPMU DEV.
We keep your email 100% private and do not spam.

FREE EBOOK
Plan, build, and launch your next WP site without a hitch. Our checklist makes the process easy and repeatable.

By downloading this ebook I consent to occasionally receive emails from WPMU DEV.
We keep your email 100% private and do not spam.

To avoid losing or deleting important files, please make a full backup of your site, read the plugin documentation carefully, and make sure to configure all settings correctly before modifying or deleting your files. 

Another option for dealing with unused images is to delete unused thumbnail images from your site’s wp-content uploads folder and keep only the thumbnails that are being used.

Finally, if you want to proactively manage images on your WordPress site, we recommend installing and configuring the Smush plugin. Smush will automatically resize, optimize, and compress all images uploaded to your site to ensure their optimal efficiency. Also, make sure to read our Ultimate Guide To WordPress Image Optimization.

Free up some of your disk space on your WordPress installations by beginning a new habit of cleaning your uploads folders.