🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms Uploads Storage Audit Setup Guide

Updated 8 min read Gravity Forms Files, Storage & Databases
On this page
  1. Video walkthrough
  2. What you need
  3. Install and activate
  4. Run your first scan
  5. The overview
  6. Largest files
  7. Orphaned files
  8. Missing files
  9. Export reports as CSV
  10. Move orphans to the quarantine
  11. Restore from the quarantine
  12. Purge the quarantine permanently
  13. Activity log
  14. Settings
  15. Custom upload folders
  16. What the add-on never touches
  17. Uninstalling
  18. Frequently asked questions
  19. Will the scan slow my site down?
  20. Does it work with uploads sent to cloud storage?
  21. Can I undo a clean-up?

Video walkthrough

Gravity Forms Uploads Storage Audit Setup Guide: Orphaned Files, Missing Files & Quarantine
Video setup guide: Gravity Forms Uploads Storage Audit Watch on YouTube

The Gravity Forms Uploads Storage Audit add-on shows you exactly what is stored in your Gravity Forms upload folder and cleans it up safely. It scans the folder in small batches, compares every file with the file references kept in the entries of all your forms, and reports storage per form and per month, the largest files, orphaned files that no entry uses and missing files that an entry points to but are gone from disk. Orphans can be moved to a protected quarantine folder, restored with one click, and only purged for good after you type a confirmation word. This guide covers installing it, running a scan, reading each report, exporting CSV files and cleaning up.

What you need

You need Gravity Forms 2.9 or newer and WordPress 6.5 or newer on PHP 7.4 or newer. The add-on works on any host: the scan runs through normal admin requests, so there is nothing to install on the server and no command line. Everything happens on your own site; the add-on makes no outside connection beyond checking gravityextra.com for your licence and plugin updates.

To scan and view reports a user needs the Gravity Forms edit settings capability. Moving files to the quarantine, restoring them and purging the quarantine also need the WordPress manage options capability, which administrators have.

Install and activate

  • Upload the add-on zip in Plugins → Add New → Upload Plugin and activate it.
  • Go to Forms → Settings → Uploads Audit, enter your GravityExtra licence key and press Activate License.
  • A new menu item, Forms → Uploads Audit, opens the audit screen.

Without an active licence the audit screen only shows a note with a link to the licence settings, and the scan, the clean-up actions and the CSV exports are switched off.

Run your first scan

On Forms → Uploads Audit press Start scan. A progress bar shows each phase as it runs:

  • Reading file references in entries — every entry value of every form that points into an upload folder: single file uploads, multi-file lists, post images, in active, spam and trashed entries alike.
  • Reading saved drafts — temp files that a Save and Continue draft still needs, so they are never treated as leftovers.
  • Reading signature fields — signature images stored as a bare file name.
  • Listing files on disk — a walk through the upload folders, one slice of one folder per request.
  • Finding orphaned files and Finding missing files — matching the two lists.

The scan only reads; it never changes a file. Each request stops after about four seconds and the browser sends the next one, so even a site with hundreds of thousands of uploads never runs into a PHP or proxy time-out. If you close the tab, the scan waits; open the screen again and press Resume scan, or Cancel to drop it. When it finishes, the page reloads with the report. Run Scan again whenever you want fresh numbers: a new scan replaces the previous results but keeps the quarantine and the activity log.

The overview

The overview shows four totals: how much is stored in the upload folders, how many orphaned files there are and how much space they take, how many missing files were found, and what is in the quarantine. Below them, Storage per form lists every form with its file count, size, a size bar and its number of orphans, biggest first. Folders of forms that were deleted show up as Deleted form #ID, which is usually where the most forgotten space hides. Storage per month uses the year and month folders Gravity Forms creates, so you can see how fast uploads grow.

The Uploads Audit overview: totals for stored files, orphaned files, missing files and the quarantine, with storage per form and per month
The overview: totals, storage per form and storage per month.

Largest files

The Largest files tab lists the 100 biggest files with their form, type, size, date and how they are used — for example 1 entry (active) or 1 entry (trash). It is a quick way to find the video someone uploaded to a contact form, or a form whose file size limit is set too high.

Orphaned files

An orphaned file is on disk but no entry of any form and no saved draft refers to it. Typical orphans are:

  • files of entries that were deleted while their files stayed behind (for example after a direct database clean-up or a failed delete),
  • the whole folder of a form that was deleted,
  • temp files from abandoned multi-file uploads in the Gravity Forms temp folder, once they are older than 24 hours (you can change the age in the settings),
  • files left after an entry was edited and a new file replaced the old one.

Files referenced by spam or trashed entries are not orphans: those entries can still be restored, so their files are kept. Files in folders the add-on does not recognise (for example an export folder another tool writes into the upload folder) are listed under their type Other but never marked as orphans.

The Orphaned tab: files no entry uses, with checkboxes, Quarantine selected and Quarantine all orphans buttons and a CSV export
Orphaned files with the quarantine buttons and a CSV export.

Missing files

A missing file is the opposite problem: an entry refers to a file that is no longer on disk. The Missing tab lists the file, its form, the entry with a link to open it, and the entry status. Missing files usually come from a migration that left the uploads behind, a backup restored without its uploads, or a manual clean-up in the file manager. Use the list to restore the files from a backup before someone needs them.

The Missing tab: a file an entry refers to that is gone from disk, with a link to the entry and its status
A missing file with a link to the entry that refers to it.

Export reports as CSV

Every report has an Export CSV button: storage per form, storage per month, largest files, orphans, missing files and the quarantine. The files open cleanly in any spreadsheet app. Cells that start with a formula character are escaped so a crafted file name can never run as a formula. Each export is noted in the activity log.

Move orphans to the quarantine

On the Orphaned tab, tick the files you want to clear and press Quarantine selected, or press Quarantine all orphans. Nothing is deleted: each file is moved into a quarantine folder inside the Gravity Forms upload folder, keeping its folder structure. The quarantine folder has a random name, its own .htaccess rule that denies web access and an empty index file. Right before each move the add-on checks the file again:

  • it is still inside its upload folder and is not a link,
  • it is not an .htaccess, index.html, index.php or web.config file,
  • its size and date did not change since the scan,
  • no entry and no saved draft refers to it now (a quick live check of the database).

If any check fails, the file stays where it is and the screen lists it with the reason, for example An entry or a saved draft refers to this file now. Run a new scan. Large selections are processed in batches of 100, so moving thousands of orphans is safe too.

Restore from the quarantine

The Quarantine tab lists every quarantined file with its original path, form, size, date and the user who moved it. Tick files and press Restore selected, or Restore all, to move them back to exactly where they were. A restore never overwrites: if a file with the same name has appeared in that place, the file stays in the quarantine and the reason is shown. A good habit is to quarantine, use the site normally for a week or two, and only then purge.

The Quarantine tab: quarantined files with Restore buttons and the permanent purge box that needs PURGE typed
The quarantine with Restore buttons and the typed-confirmation purge.

Purge the quarantine permanently

At the bottom of the Quarantine tab, the Purge permanently box shows how many files and how much space a purge frees. The button stays disabled until you type PURGE in capital letters, and the server checks the word again, so a stray click or a forged request cannot delete anything. Only files inside the quarantine folder can ever be purged. The purge is written to the activity log with the date, the user, the number of files and their size.

Activity log

The Activity log tab keeps the last 500 actions: each scan with its totals, each move to the quarantine, each restore, each purge and each CSV export, with the user who did it. It answers the question who deleted that file and when without guesswork.

Settings

Forms → Settings → Uploads Audit has three options once the licence is active:

  • Scan batch size (default 500): how many files or database rows each step handles. Lower it on very slow storage; each step also stops after about four seconds whatever the batch size.
  • Temp files count as orphans after (hours) (default 24): Gravity Forms keeps uploads of multi-file fields in a temp folder until the form is submitted. Younger temp files are never listed as orphans.
  • Custom upload folders: allow quarantine of orphans found in custom folders (off by default, see below).

Custom upload folders

If your site changes where uploads go with the gform_upload_path filter, the add-on asks Gravity Forms for each form’s folder and scans the custom folders as well (the year and month part of the path is recognised). Because a custom folder might also hold files that are not form uploads, orphans in custom folders are reported but only moved to the quarantine when you tick Allow quarantine of orphans found in custom upload folders. A custom folder that is, or contains, the WordPress uploads, content, plugins, themes or install folder is never scanned; a note on the audit screen tells you which one was skipped and why.

What the add-on never touches

  • Files outside the Gravity Forms upload folders and your custom form upload folders.
  • .htaccess, index.html, index.php, web.config and other dot files that protect the folders.
  • Links: they are neither followed nor moved.
  • Files used by any entry, in any status, or by a saved draft.

Uninstalling

Deleting the add-on removes its settings, its scan tables and the activity log. Files in the quarantine are left on disk on purpose — the add-on deletes files only through the typed purge — so restore or purge the quarantine before you uninstall.

Frequently asked questions

Will the scan slow my site down?

No. It runs only while the audit screen is open, in short requests, and only reads. Visitors are not affected.

Does it work with uploads sent to cloud storage?

It audits the files that are on your server. If another add-on copies uploads to cloud storage and deletes the local copy, those entries show up as missing files; that is expected and the list tells you which entries rely on the remote copy.

Can I undo a clean-up?

Yes, until you purge. Every quarantined file can be restored to its exact place.

Still need help?

Our support team answers tickets every day, usually within a few hours.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr