How to import data from a MySQL database

By downloading your database table as a CSV file, you can import it to Gravity Forms using GravityImport.

Watch this video for a full tutorial on how to do this:

This article is based on the video from GravityKit Live!, using the example CSV structure from the demo. For a generic getting started, check out Getting Started with GravityImport: How to Import Entries into Gravity Forms.

If you have a database table you want to move into Gravity Forms (instead of keeping it in a database table), you can use the GravityImport add‑on to create a new form and import the data automatically.

Prerequisites

  • A WordPress site with Gravity Forms installed and activated.
  • GravityKit Import Entries add‑on installed and activated.
  • A CSV export of your database table.

1. Export Your Database Table to CSV

  1. Open your database in your preferred database manager.
  2. Locate the table you want to export.
  3. Use the export function to save it as a CSV file.

    (Most database tools have an “Export” or “Download as CSV” option.)

2. Open the GravityImport "Import Entries" screen

Log into your WordPress admin dashboard, then:

  1. Navigate to the Forms menu, click Import/Export, then select Import Entries.

    (If using the GravityKit demo site, visit: gravityimport.try.gravitykit.com).

  2. Ensure the Import Entries add‑on is activated.

3. Upload Your CSV File

  1. In the Upload CSV field, click Choose File and select your exported CSV.
  2. Choose Create a New Form.
  3. Give the form a name (e.g., "Imported Form").

4. Map CSV Columns to Gravity Forms Fields

GravityImport will read your CSV columns and let you choose the Gravity Forms field type for each.

  1. For First Name and Last Name, choose the Name field type.
    • Map CSV first_name → Name (First)
    • Map CSV last_name → Name (Last)
  2. For addresses, select the Address field type.
    • Map CSV columns to Address Line 1Address Line 2CityStateZIP.
    • If the dataset has columns you don’t need (e.g., County), check Do Not Import.
  3. Map Phone to the Phone field type.
  4. Map Fax to the Phone field type.
  5. Map Email to the Email field type.
  6. Map Website to the Website (URL) field type.

5. (Optional) Filter Which Rows Are Imported

You can choose to only import certain rows. For example:

  • Only import entries where the State column is CA.

6. (Optional) Enable Email Notifications

If you want Gravity Forms to send notifications (e.g., “Form Submitted” emails) for imported entries:

  • Enable Email Notifications.

7. Complete the Import

  1. Click Create Form and Continue with Import.
  2. When the process finishes, click View Imported Records.

8. Review the Imported Form & Entries

  • You’ll now see your imported entries in Gravity Forms with all mapped fields.
  • The form is automatically created for you.
  • You can also choose to import into an existing form instead of creating a new one.

✅ You’ve successfully moved your database table data into Gravity Forms!

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us