Delightful Downloads
Huge amount of data need to purge (2 posts)

  1. localrich
    Posted 1 year ago #

    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.




  2. A5hleyRich
    Plugin Author

    Posted 1 year ago #

    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.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Delightful Downloads
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.