Support » Plugin: Delightful Downloads » Huge amount of data need to purge

  • We have not been paying attention to the downloads and it has grown to over 15mil. As a result we are having huge issues with posts because the plugin writes to the wp_posts table for every download. Is there and easy way to clear this data out? I have full access tot he server I tried to delete the entries with type = dedo_log but it crashed the mysql table.



Viewing 1 replies (of 1 total)
  • Plugin Author A5hleyRich


    Hi there,

    You will need to delete the data in chunks. The following will delete the oldest logs in blocks of 1000. You may be able to increase the limit so that more logs can be deleted per run, but this all depends on your MySQL server performance. Remember to change the table name prefix to whatever you have setup in wp_config.php.

    Remember to backup your database first!

    DELETE FROM wp_posts WHERE post_type = 'dedo_log' ORDER BY post_date ASC LIMIT 1000

    You may also want to remove log meta data from the postmeta table:

    DELETE FROM wp_postmeta WHERE meta_key = '_dedo_log_download' OR meta_key = '_dedo_log_ip' ORDER BY meta_id ASC LIMIT 1000

    Automatic purging of old logs will be implemented in an upcoming update, but until then you may wish to run the delete commands on a regular basis.


Viewing 1 replies (of 1 total)
  • The topic ‘Huge amount of data need to purge’ is closed to new replies.