Skip to content

WordPress form database overflow — entry tables, meta bloat, and cleanup

WordPress form entry tables grow past 500MB on busy sites, slowing the admin and backups. This is how to audit Gravity Forms, WPForms, Fluent Forms, and Ninja Forms entries and prune safely.

A WordPress form table that started at 5MB three years ago is now 800MB, the admin entries page takes 40 seconds to load, and the nightly backup has crept past two hours. This is the most common database-growth pattern we see on WordPress sites with active lead capture, especially when nobody ever exported or pruned. Worse, the entry tables on Gravity Forms and WPForms have separate _meta tables that grow faster than the entry table itself.

What’s happening

Each major form plugin stores submissions across two or more tables: Gravity Forms uses wp_gf_entry and wp_gf_entry_meta; WPForms uses wp_wpforms_entries, wp_wpforms_entry_meta, and wp_wpforms_entry_fields; Fluent Forms uses wp_fluentform_submissions and wp_fluentform_submission_meta; Ninja Forms stores everything serialized in wp_nf3_submissions plus wp_postmeta rows of the nf_sub custom post type. Spam submissions, partial entries, and abandoned multi-step forms all accumulate. None of these plugins prune by default.

How to verify

Look at table sizes directly:

wp db query "SELECT table_name, ROUND(data_length/1024/1024,1) AS mb, table_rows FROM information_schema.tables WHERE table_schema=DATABASE() AND table_name LIKE '%form%' OR table_name LIKE '%nf3%' OR table_name LIKE '%fluentform%' ORDER BY data_length DESC;"
wp db query "SELECT YEAR(date_created), COUNT(*) FROM wp_wpforms_entries GROUP BY 1;"
wp db query "SELECT YEAR(date_created), COUNT(*) FROM wp_gf_entry GROUP BY 1;"
wp db size --tables

Most sites discover 70% of their form rows are spam from a single week three years ago, or test entries from initial setup that were never deleted.

The fix

  1. Export first, always: before any pruning, export the last 24 months of entries to CSV from the plugin’s UI. Store the CSV in S3 or another archive. Compliance regimes (GDPR, PIPEDA) often require keeping consent records, not full submissions.
  2. Delete spam entries: each plugin’s UI has a Spam tab — filter by spam status, “Empty trash” / “Delete all spam”. For Gravity Forms with thousands of spam rows, run wp db query "DELETE FROM wp_gf_entry WHERE status='spam';" after backup.
  3. Prune by age: keep 12-24 months of live entries. Anything older lives in the CSV archive. Each plugin has a “delete entries older than X days” tool — Gravity Forms via Cron Add-on, WPForms via WPForms > Tools > Entries, Fluent Forms via Settings > Cleanup.
  4. Drop partial entries: forms with multi-step save-progress generate partial entries that never converted. Delete them after 30 days unless they have legal hold.
  5. Optimize tables: after large deletes, run wp db optimize to reclaim the disk space. InnoDB does not return space to the OS until the table is rebuilt.
  6. Schedule recurring cleanup: add a WP-Cron task or a system cron wp command to enforce the retention policy automatically.

When a WordPress entries database has crossed into multi-gigabyte territory, the cleanup needs to fit a real retention policy — covered in our enterprise WordPress retainer. To define retention and execute the first prune without losing compliance evidence, book a scoping call.