🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 30, 2026

How to Audit and Clean Up the Gravity Forms Uploads Folder (Orphaned and Missing Files)

GravityExtra
How to Audit and Clean Up the Gravity Forms Uploads Folder (Orphaned and Missing Files)

Open the file manager of almost any WordPress site that has run Gravity Forms for a few years and look inside wp-content/uploads/gravity_forms. You will find one folder per form, each with year and month folders below it, and thousands of CVs, photos, invoices, scans and screenshots. Some of those files belong to entries your team still works with. Many do not. Entries get deleted, forms get retired, visitors abandon multi-file uploads halfway, and the files stay behind. Nobody notices until the hosting plan runs out of disk space, the nightly backup doubles in size, or a privacy request asks you to prove which personal documents you still keep.

This guide explains why the Gravity Forms upload folder grows out of step with your entries, how to measure it per form and per month, how to find orphaned and missing files, and how to clean up safely with a quarantine instead of a delete key. The tool we use is the Gravity Forms Uploads Storage Audit add-on, but the ideas apply however you choose to work.

Why the uploads folder grows out of control

When a visitor submits a form with a File Upload field, Gravity Forms saves the file into a folder named after the form ID and a hash, under the year and month of the upload, and stores the file’s URL in the entry. That link between entry and file is the only thing that tells you a file is still needed. Several everyday events break it:

  • Deleted forms. Retire an old campaign form and its entries, and the whole folder of that form can stay on disk with nothing pointing at it.
  • Database clean-ups. Entry clean-up scripts, retention tools or a direct SQL delete remove the entry rows but not the files.
  • Abandoned uploads. Multi-file fields upload files to a temp folder as soon as the visitor picks them. If the form is never submitted, those temp files sit there.
  • Edited entries. Replace a file on an entry and the old file usually stays where it was.
  • Migrations. Move a site and forget the uploads, or restore a database without its files, and you get the opposite problem: entries that point at files that no longer exist.

None of this is a bug in Gravity Forms. It is simply that the file system and the database are two separate stores, and nothing keeps them in sync over the years.

What it costs you

Disk space is the obvious cost. Many managed hosts charge by storage or cap the number of files, and form uploads are often the biggest single folder after the media library. The less visible costs matter more:

  • Backups take longer and cost more when they copy gigabytes of files nobody needs.
  • Privacy and data minimisation. Data protection rules expect you to keep personal data only as long as needed. A CV from a candidate whose entry you deleted three years ago is still personal data if the file is on your server.
  • Broken workflows. Missing files show up at the worst moment, when a colleague opens an entry and the attachment link returns a 404.

Step 1: measure storage per form and per month

Before deleting anything, find out where the space goes. After installing the add-on and activating the licence, open Forms → Uploads Audit and press Start scan. The scan reads the file references in the entries of all forms, the temp files kept by saved drafts and the signature fields, then walks the upload folders and matches the two lists. It runs as a series of short admin requests, each one stopping after a few seconds, so it works on shared hosting and on sites with hundreds of thousands of uploads alike. Nothing is changed during a scan.

The overview shows the total size of the upload folders and the space taken by orphans, then storage per form and storage per month. Two patterns stand out on most sites: a single form (often a job application or a support form with screenshots) holding most of the space, and folders of forms that were deleted long ago, labelled Deleted form with their ID. The per-month table shows how fast the folder grows, which helps when you plan hosting or set a retention policy.

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

Step 2: find orphaned files

An orphaned file is a file on disk that no entry and no saved draft refers to. The Orphaned tab lists them with their form, type, size and date. The add-on is deliberately careful about what counts:

  • Files used by spam or trashed entries are not orphans, because those entries can still be restored.
  • Temp files are only orphans once they are older than 24 hours, and never when a Save and Continue draft still needs them.
  • Files in folders the add-on does not recognise are reported under Other but never marked as orphans.
  • .htaccess and index files, which protect the folders from directory listing, are never listed at all.

Sort through the list and you will usually find three groups: the folders of deleted forms, files from entries removed by a clean-up, and old temp files. The first two are often the bulk of the reclaimable space.

Step 3: find missing files

The Missing tab answers the reverse question: which entries point at files that are gone? Each row shows the file, the form, a link to the entry and its status. If the list is long, check your last migration or restore. If only a few files are missing, you can often recover them from a backup before anyone needs them. Either way, it is better to learn about it from a report than from a colleague who cannot open an attachment.

Step 4: export the reports

Every report exports to CSV with one click: per form, per month, largest files, orphans, missing files and the quarantine. Share the per-form report with whoever owns each form, attach the orphan list to a change request, or keep the export as a record of what you removed. Cells that start with a spreadsheet formula character are escaped, so a strangely named upload cannot turn into a formula when the file is opened.

Step 5: quarantine instead of delete

Here is the most important habit in any clean-up: never delete first. The add-on does not even offer a direct delete. Select orphans on the Orphaned tab and press Quarantine selected, or Quarantine all orphans. Each file is moved, with its folder structure, into a quarantine folder inside the Gravity Forms upload folder. That folder has a random name and its own rule that denies web access, so quarantined files cannot be downloaded by anyone who guesses a URL.

The Quarantine tab: quarantined files with Restore buttons and the permanent purge box that needs PURGE typed
Quarantined files can be restored with one click; the purge needs PURGE typed.

Just before each move, the add-on checks the file again: it must still be inside the upload folder, it must not be a link or a protection file, its size and date must match the scan, and a live look at the database must confirm that no entry or draft refers to it. If a colleague restored an entry from the trash a minute after your scan, its file is left alone and the screen tells you why. Thousands of files are moved in batches of a hundred, so the clean-up is as safe on a big site as the scan.

Step 6: restore what you need, then purge

Leave the quarantine alone for a week or two while the site runs normally. If anything turns out to be needed, open the Quarantine tab, tick the file and press Restore selected. It goes back to exactly the path it came from. A restore never overwrites a file that has appeared in the same place in the meantime.

When you are confident, use the Purge permanently box at the bottom of the tab. The button stays disabled until you type PURGE in capital letters, and the server checks the word again, so a stray click cannot delete anything. Only files inside the quarantine folder can be purged. The purge, like every scan, move, restore and export, is written to the activity log with the user, the number of files and their size.

Custom upload folders

Some sites send uploads to a different folder with the gform_upload_path filter, for example to keep each client’s documents together. The add-on asks Gravity Forms for each form’s folder, so custom folders are scanned and reported too. Because a custom folder might also hold files that are not form uploads, orphans found there are only quarantined when you allow it in the settings. A custom folder that is, or contains, the WordPress uploads, content, plugins, themes or install folder is never scanned at all.

A simple routine for every site

  • Run a scan once a month, or before a migration or a hosting change.
  • Look at the overview for forms whose storage grows faster than expected, and review their file size limits.
  • Quarantine orphans, keep them for two weeks, then purge.
  • Fix missing files from a backup while the backup still exists.
  • Export the per-form report and keep it with your data retention records.

Privacy and security

The whole audit runs on your own server. The add-on makes no outside HTTP request beyond checking gravityextra.com for your licence and plugin updates, it never reads or moves anything outside the Gravity Forms upload folders, and the quarantine folder is closed to the web. The audit screen needs the Gravity Forms settings capability, and every move, restore and purge also needs an administrator. For the full setup, read the Uploads Storage Audit documentation.

Wrapping up

The Gravity Forms upload folder is where years of form history quietly piles up. Measuring it per form and per month, finding the orphans and the missing files, and cleaning up through a quarantine turns a risky manual job into a ten-minute routine you can repeat every month. Ready to see what your uploads folder really holds? Get Gravity Forms Uploads Storage Audit.

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