Form Forge creates three custom tables on activation.
wp_formforge_forms
sql
CREATE TABLE wp_formforge_forms (
id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
title varchar(255) NOT NULL DEFAULT '',
fields longtext DEFAULT '',
settings text DEFAULT '',
conditional_logic text DEFAULT '',
status varchar(20) NOT NULL DEFAULT 'publish',
created_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;wp_formforge_submissions
sql
CREATE TABLE wp_formforge_submissions (
id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
form_id bigint(20) unsigned NOT NULL,
data longtext NOT NULL DEFAULT '',
ip_address varchar(45) DEFAULT '',
user_agent varchar(255) DEFAULT '',
user_id bigint(20) unsigned DEFAULT 0,
status varchar(20) NOT NULL DEFAULT 'new',
created_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id),
KEY form_id (form_id),
KEY status (status)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;wp_formforge_analytics
sql
CREATE TABLE wp_formforge_analytics (
id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
form_id bigint(20) unsigned NOT NULL,
event_type varchar(50) NOT NULL DEFAULT 'view',
created_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id),
KEY form_event (form_id, event_type, created_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;wp_options Keys
| Option Key | Description |
|---|---|
formforge_settings | Global plugin settings (maps, reCAPTCHA) |
formforge_stripe_settings | Stripe API keys and webhook secret |
formforge_license_data | License key and plan data |
formforge_api_key_enc | Encrypted AI API key |
Table Maintenance
php
global $wpdb;
// Purge old analytics data (keep last 90 days)
$wpdb->query(
"DELETE FROM {$wpdb->prefix}formforge_analytics
WHERE created_at < DATE_SUB(NOW(), INTERVAL 90 DAY)"
);
// Purge old abandoned submissions (keep last 30 days)
$wpdb->query(
"DELETE FROM {$wpdb->prefix}formforge_submissions
WHERE status = 'abandoned'
AND created_at < DATE_SUB(NOW(), INTERVAL 30 DAY)"
);—