WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. localrich
    Member
    Posted 7 months 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.

    HELP

    Thanks!

    http://wordpress.org/plugins/delightful-downloads/

  2. A5hleyRich
    Member
    Plugin Author

    Posted 7 months 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.

    Ashley

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.