Handling DEV, QA, and PROD Environments (Ignoring Entries) [RESOLVED]

Hi Everyone,

We have three environments for our website: DEV, QA, and PROD. We do all of our development (including all Gravity Forms design) in DEV, our testing in QA, and the live site is in PROD.

What I want to do is copy over everything that Gravity forms needs from DEV → QA → PROD except for the entries. We never want DEV, or QA, entries to copy over the entries on the PROD site. Entries on the PROD site are created by users and all entries on DEV and QA are just for testing.

We use WP Engine for a host and they suggested using a plugin to copy the databases over and exclude certain tables.

Does anyone have any experience with this or recommendations?

Which tables should we exclude so that entries are not copied over?

  • {prefix}_gf_entry
  • {prefix}_gf_entry_meta
  • {prefix}_gf_entry_notes

Any experienced help would be appreciated.

Would another option be to delete all forms and entries on the PROD site and then run a Gravity Forms Import / export?

Thanks,

Hi Everyone,

I was able to accomplish what I wanted by automating a database deploy using WP CLI and ignoring the entry database tables that I mentioned above:

  • {prefix}_gf_entry
  • {prefix}_gf_entry_meta
  • {prefix}_gf_entry_notes

This allows us to copy over any form changes but not overwrite the entries created by end users on the production side:

I export the database like this to exclude those tables:

wp db export --exclude_tables=wp_gf_entry,wp_gf_entry_meta,wp_gf_entry_notes ./database.sql

Thanks

2 Likes

Thank you for sharing your solution. I’ll leave this open, but RESOLVED, in case anyone has any questions about the approach.