Files directory getting out of control? Audit it!

Drupal Career Online begins March 1!

The next semester of our 12-week, 2x/week, best-practice-focused Drupal Career Online begins on March 1, 2021! Learn more!

If you manage a Drupal site that has constantly changing content, you may have concerns about the size and contents of the /sites/default/files/ directory. For most Drupal site maintainers, this can often be a source of anxiety, not ever really knowing what it contains and what, if any of the uploaded files are obsolete. 

Any method you utilize to solve potential issues is going to be tedious, but the Audit Files module can help make it a little less painful. This module provides several reports (generated using some user-configurable parameters) that can help you wrangle things:

Audit files module screenshot.

As an example, the "Not in database" report will show you a list of files that exist in /sites/default/files/, but are not managed (have not been uploaded via a file field) in Drupal. This list might include files directly uploaded via SFTP or some other method, so be careful what you delete, but it will definitely give you a head-start on identifying files that might be safely deleted.

If you feel that your site's files directory is a bit out-of-control, this module may be a good first step in cleaning things up.
 

Add new comment

The content of this field is kept private and will not be shown publicly.

Sign up to receive email notifications of whenever we publish a new blog post or quicktip!

Name