Support » Plugin: REST API Log » This will bloat your SQL Database

  • amykant

    (@amykant)


    This was a legacy plugin for a client’s website… I would not recommend it! It bloated our disk usage and one of the tables ended up with 22 million rows.

    Here are the queries we used to clean things up.

    -- Run first
    delete m
    from wp_posts p
    join wp_postmeta m on p.ID = m.post_id
    where post_type = 'wp-rest-api-log'
    
    -- Run second
    delete
    from wp_posts
    where post_type = 'wp-rest-api-log'
    
    -- Run third
    DELETE wp_term_relationships FROM wp_term_relationships
        LEFT JOIN wp_posts ON wp_term_relationships.object_id = wp_posts.ID
        WHERE wp_posts.ID is NULL;
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this review.