How to bulk delete entries older than x days using MySQL?

I’ve got over 30k entries with massive and long field values that I want to cleanup.

Previously I tried the WP-CLI to filter and delete old entries, but stuck at the export step since is still took me decades… It’s been 4 days and I still haven’t successfully exported 5000 entries… I guess it’s because my entries have lots of long text and HTML value that slowed down the whole exporting process.

So I have to look back on MySQL method which I left on How to cleanly delete Gravity Forms entries with SQL? - Get Help - Gravity Forms

So basically I wish the SQL queries can do:

  1. Filter the entries older than x days
  2. Bulk delete the entries completely including the entry, entry_meta, entry_notes, gravityflow_activity_log etc…

Is there a possible solution to this?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.