{"id":2368,"date":"2007-06-13T18:05:22","date_gmt":"2007-06-13T12:35:22","guid":{"rendered":"https:\/\/www.quickonlinetips.com\/archives\/2007\/06\/reduce-database-backup-size-delete-akismet-blocked-spam\/"},"modified":"2026-10-15T14:25:11","modified_gmt":"2026-10-15T08:55:11","slug":"reduce-database-backup-size-delete-akismet-blocked-spam","status":"publish","type":"post","link":"https:\/\/www.quickonlinetips.com\/archives\/2007\/06\/reduce-database-backup-size-delete-akismet-blocked-spam\/","title":{"rendered":"Reduce WordPress Database Size: Delete Akismet Spam Before Backup"},"content":{"rendered":"<p>Does your connection time out while you back up a huge WordPress database? The useful part of your database is often much smaller than it looks. This guide shows how to <strong>reduce WordPress database size<\/strong> before a backup by deleting spam comments caught by Akismet and clearing other junk, based on what worked on this blog.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-large wp-image-67279\" src=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/reduce-wordpress-database-size-2026-1024x538.webp\" alt=\"Reduce WordPress database size guide card\" width=\"1024\" height=\"538\" srcset=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/reduce-wordpress-database-size-2026-1024x538.webp 1024w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/reduce-wordpress-database-size-2026-300x158.webp 300w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/reduce-wordpress-database-size-2026-150x79.webp 150w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/reduce-wordpress-database-size-2026-768x403.webp 768w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/reduce-wordpress-database-size-2026.webp 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p><strong>Quick answer:<\/strong> Stored spam comments can make up a large share of a WordPress database. Go to Comments, open the Spam tab, check for any real comments, then click Empty Spam. Also clear old pending comments, trashed items and extra post revisions. Your next backup will be smaller, faster to download and less likely to fail.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_90 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6b00ef5a9d3f5\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #1a202c;color:#1a202c\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #1a202c;color:#1a202c\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6b00ef5a9d3f5\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2007\/06\/reduce-database-backup-size-delete-akismet-blocked-spam\/#How_spam_comments_bloated_my_database_backup\" >How spam comments bloated my database backup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2007\/06\/reduce-database-backup-size-delete-akismet-blocked-spam\/#How_to_reduce_WordPress_database_size_before_a_backup\" >How to reduce WordPress database size before a backup<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2007\/06\/reduce-database-backup-size-delete-akismet-blocked-spam\/#Let_Akismet_clean_up_spam_to_reduce_WordPress_database_size\" >Let Akismet clean up spam to reduce WordPress database size<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2007\/06\/reduce-database-backup-size-delete-akismet-blocked-spam\/#Back_up_your_WordPress_database_the_easy_way\" >Back up your WordPress database the easy way<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2007\/06\/reduce-database-backup-size-delete-akismet-blocked-spam\/#FAQ\" >FAQ<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2007\/06\/reduce-database-backup-size-delete-akismet-blocked-spam\/#Do_spam_comments_slow_down_WordPress\" >Do spam comments slow down WordPress?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2007\/06\/reduce-database-backup-size-delete-akismet-blocked-spam\/#Is_it_safe_to_empty_the_spam_folder\" >Is it safe to empty the spam folder?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2007\/06\/reduce-database-backup-size-delete-akismet-blocked-spam\/#How_long_does_Akismet_keep_spam\" >How long does Akismet keep spam?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2007\/06\/reduce-database-backup-size-delete-akismet-blocked-spam\/#What_else_makes_a_WordPress_database_large\" >What else makes a WordPress database large?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"How_spam_comments_bloated_my_database_backup\"><\/span>How spam comments bloated my database backup<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>When I backed up my WordPress database with phpMyAdmin before a WordPress upgrade, the file was over 41MB. It took ages to download and I couldn&#8217;t get an error-free copy. Then I realised the tables that really mattered were not that big.<\/p>\n<p>I use the Akismet plugin, which had blocked over 400,000 spam comments on this blog by then. That day, Akismet was storing over 20,000 comments marked as spam (about a week&#8217;s worth of spam for us). I deleted all of them, backed up again, and the new .sql file was just 7MB. Zipped, it shrank to 2MB.<\/p>\n<p>My weekly automatic backups also varied from 3MB to 7MB, and the difference came down to how much Akismet spam had piled up when each backup ran.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_to_reduce_WordPress_database_size_before_a_backup\"><\/span>How to reduce WordPress database size before a backup<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ol>\n<li><strong>Empty the spam folder.<\/strong> In your dashboard go to Comments and click the Spam tab. Skim for any genuine comments and mark them Not Spam, then click Empty Spam to delete the rest permanently.<\/li>\n<li><strong>Clear the moderation queue.<\/strong> Approve real pending comments and delete the junk. Thousands of pending comments also take up space.<\/li>\n<li><strong>Empty the trash.<\/strong> Trashed comments, posts and pages stay in the database until they are emptied. See how to <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2011\/04\/automatically-empty-wordpress-trash-daily\/\">empty WordPress trash automatically<\/a>.<\/li>\n<li><strong>Limit post revisions.<\/strong> Every save can create a revision. Our guide explains how to <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2011\/06\/delete-post-revisions-in-wordpress\/\">delete post revisions in WordPress and limit them<\/a>.<\/li>\n<li><strong>Optimize the tables.<\/strong> After deleting data, optimizing tables reclaims unused space. Follow our steps to <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2011\/06\/optimize-wordpress-database\/\">optimize the WordPress database safely<\/a>.<\/li>\n<li><strong>Compress the backup.<\/strong> A zipped or gzipped .sql file is usually a fraction of the original size.<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"Let_Akismet_clean_up_spam_to_reduce_WordPress_database_size\"><\/span>Let Akismet clean up spam to reduce WordPress database size<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><a href=\"https:\/\/akismet.com\/\" target=\"_blank\" rel=\"noopener\">Akismet<\/a> now deletes old spam automatically. By default it keeps spam comments for about 15 days before removing them, so the spam folder no longer grows forever the way it did in 2007. If you get a lot of spam, emptying the folder by hand before a backup still helps. Fewer spam comments arriving in the first place helps too; see these <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2014\/09\/4-best-wordpress-plugins-to-stop-comment-spam\/\">WordPress plugins to stop comment spam<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Back_up_your_WordPress_database_the_easy_way\"><\/span>Back up your WordPress database the easy way<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Large database files cause timeouts and broken downloads in phpMyAdmin, so a smaller database makes every method more reliable. Today you can back up with a plugin such as <a href=\"https:\/\/updraftplus.com\/\" target=\"_blank\" rel=\"noopener\">UpdraftPlus<\/a>, which can send backups to cloud storage on a schedule, or use your web host&#8217;s backup tools. Our full guide covers how to <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/10\/backup-restore-wordpress-database\/\">back up and restore a WordPress database<\/a> step by step.<\/p>\n<p>Whichever method you use, the steps above to reduce WordPress database size will make each backup quicker. Always keep at least one recent backup before you delete anything in bulk, and test that you can restore it.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"FAQ\"><\/span>FAQ<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Do_spam_comments_slow_down_WordPress\"><\/span>Do spam comments slow down WordPress?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>A huge number of stored spam comments makes the comments tables bigger, which can slow down backups and some admin screens. Emptying spam regularly keeps things lean.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Is_it_safe_to_empty_the_spam_folder\"><\/span>Is it safe to empty the spam folder?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Yes, but it is permanent. Quickly check for real comments first and mark them Not Spam before you click Empty Spam.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_long_does_Akismet_keep_spam\"><\/span>How long does Akismet keep spam?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>By default Akismet keeps spam comments for about 15 days, then deletes them automatically.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"What_else_makes_a_WordPress_database_large\"><\/span>What else makes a WordPress database large?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Post revisions, trashed items, old plugin tables and expired temporary data (transients) are common causes. Clean them up, then optimize the tables.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Does your connection time out while you back up a huge WordPress database? The useful part of your database is&#8230;<\/p>\n","protected":false},"author":4,"featured_media":67279,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[6],"tags":[17],"class_list":["post-2368","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogging","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/2368","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/comments?post=2368"}],"version-history":[{"count":2,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/2368\/revisions"}],"predecessor-version":[{"id":67286,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/2368\/revisions\/67286"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media\/67279"}],"wp:attachment":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media?parent=2368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/categories?post=2368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/tags?post=2368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}