Reducing the database size (3 posts)

  1. princejindal8
    Posted 3 years ago #


    Is it safe to run the following query to clean up my wp_commentmeta table of my database?

    DELETE FROM wp_commentmeta WHERE comment_id NOT IN (SELECT comment_id FROM wp_comments)

    Would it cause any problem or is it safe to run this query?
    My Akismet plugin continues to add statistical data to this table and so my database has grown large and my web host is throttling my account multiple hours a day, being on a pro account.

    So, I thought of firstly cleaning the database, and I found the above query. Please, let me know, if it is safe to run the above query on my database?

  2. Tara
    Volunteer Moderator
    Posted 3 years ago #

    Try this pluig to clean and optimize DB: http://wordpress.org/extend/plugins/rvg-optimize-database/

    Always backup everything (including your database) before doing any actions, just in case.

  3. princejindal8
    Posted 3 years ago #

    Thanks t-p.
    I will try that. Hope it solves the problem.

Topic Closed

This topic has been closed to new replies.

About this Topic