WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Akismet bloating SQL database (2 posts)

  1. joetaxpayer
    Member
    Posted 2 years ago #

    My SQL database is getting large. I looked and saw there are 150 pages (at 30 lines per page) of commentmeta data, which reference akismet history, as in "admin changed the comment status to delete"

    Is there a plugin or other simple tool to clean this up? I tried removing Akismet for a while to try to delete the extra data, but it stayed. The advise I've seen so far suggests things beyond my ability. I can delete manually, but that would take quite a while.
    Curious why this is accumulating.

  2. joetaxpayer
    Member
    Posted 2 years ago #

    Wow. Someone emailed a link to this info;
    Check this two SQL clean up script if you have Akismet plugin installed in your WordPress. The first one will clean up wp_commentmeta entries which have no relation to wp_comments.
    While the second one will clean up Akismet related metadata in wp_commentmeta table.

    DELETEFROM wp_commentmeta WHERE comment_id NOTIN(SELECT comment_id FROM wp_comments);

    DELETEFROM wp_commentmeta WHERE meta_key LIKE'%akismet%';

    I was able to run these and the bloat is gone.

Topic Closed

This topic has been closed to new replies.

About this Topic