So here’s my issue. I run sites that have a ton of Gravity Forms entries. Like tens of thousands. These need to be exported periodically so they can be analyzed further, and to clean out the database.
Since the export files are so large, using Gravity Forms’ normal web-based export function isn’t really an option because it always times out long before it has a chance to finish.
My current (really inefficient process) is this:
- Dump the entire database.
- Import the database locally.
- Run a custom SQL query to extract the entry data I want, corresponding to a particular form and its fields.
- Export that as a CSV (essentially containing exactly what a GF export file would contain) and pass it on.
I know doing this over the CLI would be way more efficient, I’m just unsure the best way of going about it, even after browsing through the code of community commands.
Has anyone ever made a Gravity Forms export WP-CLI plugin? And if not, and if you had to, how would you go about it?