---
title: "How to import data from a MySQL database"
date: 2026-04-23
author: "GravityKit"
link: "https://www.gravitykit.com/docs/gravityimport/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:

https://www.youtube.com/watch?v=OSqPWANJO9s This article is based on the [video from GravityKit Live!](https://www.youtube.com/watch?v=OSqPWANJO9s), 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**](https://www.gravitykit.com/docs/gravityimport/gravity-forms-import-entries/)**.**

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**

- Open your database in your preferred database manager.
- Locate the table you want to export.
- 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:

- Navigate to the **Forms** menu, click **Import/Export**, then select **Import Entries**.
    
    *(If using the GravityKit demo site, visit:* [*gravityimport.try.gravitykit.com*](https://gravityimport.try.gravitykit.com/)*)*.
- Ensure the **Import Entries** add‑on is activated.

## **3. Upload Your CSV File**

- In the **Upload CSV** field, click **Choose File** and select your exported CSV.
- Choose **Create a New Form**.
- 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.

- For **First Name** and **Last Name**, choose the **Name** field type.
    - Map CSV first\_name → Name (First)
    - Map CSV last\_name → Name (Last)

- For addresses, select the **Address** field type.
    - Map CSV columns to **Address Line 1**, **Address Line 2**, **City**, **State**, **ZIP**.
    - If the dataset has columns you don’t need (e.g., County), check **Do Not Import**.

- Map **Phone** to the **Phone** field type.
- Map **Fax** to the **Phone** field type.
- Map **Email** to the **Email** field type.
- 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!**