CF7 Database
Contact Form 7 sends an email and keeps nothing. This keeps it.
Every submission goes into its own database table, with a column for each field of the form. Uploaded files are copied into the media library before Contact Form 7 removes them. From the form's own screen you can view the entries and export them.
Free, GPL-2.0 or later. Published by Pepro Dev; I wrote it and maintain it. Maintenance means it still installs and works on current WordPress; the last release was October 2024. Figures from the WordPress.org API, 30 September 2026.
What it does
Nothing to configure. Activate it and the next submission is saved.
A table of its own
Submissions go into a separate database table, not into posts, so they do not slow down or clutter the rest of the site.
Columns from the form
The list is built from the form's own fields, with Contact Form 7's tag names as headers, including radio, checkbox and select fields.
Files kept
Uploads are copied into the media library under a unique name and linked from the entry.
Export
Excel, CSV, HTML, plain text, or straight to the printer.
How it saves
The timing matters. Contact Form 7 deletes uploaded files once the email is sent, so the plugin does its work one step earlier.
It hooks wpcf7_before_send_mail, the last moment the submission and its temporary files both exist. It copies each upload into the uploads folder, registers it as an attachment, and puts its URL into the entry in place of the temporary path. Then it writes the entry.
The table is created with dbDelta on activation. Some hosts refused, so 1.5.2 added a way to force it again. 1.8.0 closed a hole that let an unauthenticated request update or regenerate the table's structure.
add_action('wpcf7_before_send_mail', ...); $submission = WPCF7_Submission::get_instance(); $data = $submission->get_posted_data(); foreach ($submission->uploaded_files() as $field => $path) { // copy out of CF7's temp folder, before it is emptied $data[$field] = 'FILEURL:' . $this->save_cf7_attachment($path, ...); } $this->save_cf7_submission(..., $data, $form_id);
Getting started
Needs Contact Form 7. Tested with Contact Form 7 5.9 and later.
Install
Plugins, Add New, search for "PeproDev CF7 Database", then Install and Activate.
Submit a form
There are no settings. The next submission is saved.
Find the entries
Under the Contact menu, or with View Submissions on the form's edit screen.
Releases
Thirteen versions in the changelog since July 2020. WordPress.org keeps only the current one, so older dates are the changelog's.
| Version | Released | What changed |
|---|---|---|
| 2.0.0 | 6 Oct 2024 | Compatibility with Contact Form 7 5.9 and WordPress 6.6. |
| 1.9.0 | not dated | A security fix; WordPress 6.5 compatibility. |
| 1.8.0 | not dated | Fixed an unauthenticated database structure update. |
| 1.5.2 | not dated | A way to force the table to be created, for hosts that refused; Contact Form 7 5.5. |
| 1.5.0 | 19 May 2021 | Moved under the Contact menu; a header filter hook; View Submissions on the form screen. |
| 1.2.0 | not dated | Uploaded files saved to the media library. |
| first release | 18 Jul 2020 | Listed on WordPress.org. |
Hindsight
Two decisions from 2020 I would make differently.
// open-source/
More open source
The other projects with a page of their own. The rest, 56 in all, are in the explorer, each with its status and where the numbers come from.
- Receipt Uploader for WooCommerce1,000+ installs, rated 5.0 from 14
- upload-url-to-serverOne PHP file, 32 releases since 2020
- Justify It and Lorem SazAdobe XD plugins, 11,015 downloads, archived
- CF7 DatabaseContact Form 7 submissions, kept and exported
- Gravity Forms OTP VerificationA one-time code before the entry is saved
- Block External RequestWordPress's outbound calls, under control
- Slipnet for macOSA Mac client for a DNS-tunnelling VPN
- BDM, BlackSwan Download ManagerSegmented downloads on the Mac, with browser extensions
- Firefox add-onsFive published, 4.6 average rating