WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Upload Janitor

Clean up unused images and other files from your uploads folder.

How does it work?

This plugin inspects every file within the uploads folder. For each file, it searches pages or posts that reference the file. That is, the plugin searches for the part of each file's path that comes after the path to the uploads folder, such as 2010/01/my great but forgotten image.jpg.

The path is searched as-is, as well as URL-encoded with '%20' for spaces, and the same with '+' for spaces - 2010/01/my%20great%20but%20forgotten%20image.jpg and 2010/01/my+great+but+forgotten+image.jpg. HTML entity-encoded forms of all of these are also searched.

If no matches are found, then the file is considered unused.

Note that this plugin plays it safe, and does not distinguish between older post/page revisions and the current version of a post/page. If a revision references a file, the file will be considered still in use.

Restoring

If something goes wrong, you can always restore. If you have shell access to your site, this is easy. Simply log in, navigate to your wp-content/plugins directory, and locate the Upload Janitor archive - it will look like upload_janitor_archive_YYYY-mm-dd.tar.gz. Then, type:

    tar zxf <archive name> .

This will restore all files within the archive.

If you do not have shell access to your server, you will have to download the archive, extract it, then upload the contents back to your server. The archive will be accessible at http://your-blog.com/wp-content/uploads/upload_janitor_archive_YYYY-mm-dd.tar.gz

Requires: 2.6 or higher
Compatible up to: 2.9.2
Last Updated: 2010-1-20
Downloads: 4,986

Ratings

3 stars
3.7 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,4,4
100,1,1
0,3,0
0,1,0
0,1,0
0,2,0
100,1,1
0,1,0
100,2,2
0,1,0