Upload Janitor

Upload Janitor

from 0$

Upload Janitor is a Package Installer from the Open Source WP Plugins range Clean up unused images and other files from your uploads folder.

For more information about a tailored Package Installer like Upload Janitor please contact us directly.

Reclaim disk space and clean up your uploads folder by deleting old uploads you are no longer linking to.

This plugin will identify unused files within your uploads folder, and give you the option of archiving then deleting
some or all of these files.

Before any action is taken, Upload Janitor will automatically make a ‘tar’ archive of all files to be
erased, including their original paths, so you can restore if necessary.

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

Download & install the zip archive

The plugin package installer can be downloaded from the WP2E project tab called “code”.

1 – Select the version to download if this option is available otherwise the “latest” version of the main plugin will be used.

2 – After downloading the zip archive install the plugin package installer in you local environment and activate the script from the plugin list.

3 – Under the section “Plugins” of the admin dashboard you should see a new “Dependencies & Licenses” link. Follow the instructions from this panel to finalize the installation of the missing dependencies.

Tips: Use the WP2E panel to add/suggest new dependencies to the local installation. Press F5 in the list of dependencies if the changes are not displayed right away.

Upload Janitor

typePlugin
version0.2
descriptionClean up unused images and other files from your uploads folder.