Support » Plugin: REST API Log » SQL to delete all entries?

  • I have taken over a site that has had this plugin running and logging for 3 years now, there are 375000 entries in the db more than doubling what it should be. I have set it to only retain the last 3 days but it isn’t working neither is wiping the entries with the button. Do you have an sql statement I could run that would clear all these entries from the db? It is a production site hosed and slowed to a crawl
    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Pete Nelson

    (@gungeekatx)

    There is a WP-CLI command that can be used to purge old records:

    wp rest-api-log purge

    It doesn’t show a status while it is purging records (something I should update), and it will take a long time to run for that many records, but it will eventually clear out the logs.

    I have tried using the dashboard to do this by selecting the number of days and it doesn’t do anything. I’ve tried the WP-CLI and this command is not registered in WP-CLI on my installation for whatever reason.

    Is there an SQL Query that I can use to select the logs in the wp_posts table?

    Plugin Author Pete Nelson

    (@gungeekatx)

    Do you have the plugin activated? If so, the CLI command should be available:

    wp help rest-api-log

    Thank you. It is working now. Slowly but working. Much appreciated.

    Robin

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘SQL to delete all entries?’ is closed to new replies.