{"id":8082,"date":"2017-09-20T06:00:05","date_gmt":"2017-09-20T10:00:05","guid":{"rendered":"https:\/\/blog.litespeedtech.com\/?p=8082"},"modified":"2017-09-20T06:00:05","modified_gmt":"2017-09-20T10:00:05","slug":"wpw-database-optimization","status":"publish","type":"post","link":"https:\/\/lswp.store\/index.php\/2017\/09\/20\/wpw-database-optimization\/","title":{"rendered":"WpW: Database Optimization"},"content":{"rendered":"<p><img fetchpriority=\"high\" decoding=\"async\" title=\"\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2017\/09\/null-7.jpeg\" alt=\"\" width=\"640\" height=\"320\" \/><\/p>\n<p>Welcome to another installment of <a href=\"http:\/\/blog.litespeedtech.com\/tag\/wordpress-wednesday\">WordPress Wednesday<\/a>!<\/p>\n<p>We\u2019re on quite a roll lately, with all of the new functionality being introduced into <a href=\"https:\/\/wordpress.org\/plugins\/litespeed-cache\/\">our cache plugin<\/a>. But don\u2019t worry if you haven\u2019t had a chance to figure it all out yet. That\u2019s why I\u2019m here! <strong>Today, allow me to be your guide through Database Optimization.<\/strong><\/p>\n<p><em><strong>Disclaimer<\/strong>: The information contained in this post is accurate for LSCWP v7.2 [<a href=\"https:\/\/wordpress.org\/plugins\/litespeed-cache\/#developers\">release log<\/a>]. If you are using a newer version of the plugin, some details may have changed. Please\u00a0<a href=\"https:\/\/docs.litespeedtech.com\/lscache\/lscwp\/\">refer to our documentation<\/a>\u00a0for the latest!<\/em><\/p>\n<p>From your WordPress Dashboard, navigate to <strong>LiteSpeed Cache &gt; Database<\/strong>. You\u2019ll notice some icons and buttons, and you may also notice that the page has been split up into two tabs: <b>Manage <\/b>and <strong>DB Optimization Settings<\/strong>.<\/p>\n<h2>Manage<\/h2>\n<p>Database optimization is a useful tool when it comes to speeding up your site. We\u2019ve included it here because there\u2019s nothing we love more than an accelerated internet! This is one of many such \u201cextras\u201d we\u2019ve adding to the plugin.<\/p>\n<p>Our DB Optimizer gives you an easy way to keep your WordPress database slim, trim, and as efficient as possible.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-large wp-image-13119\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2017\/09\/DBOpt-1024x630.png\" alt=\"Database Optimization in LSCWP\" width=\"1024\" height=\"630\" srcset=\"https:\/\/lswp.store\/wp-content\/uploads\/2017\/09\/DBOpt-1024x630.png 1024w, https:\/\/lswp.store\/wp-content\/uploads\/2017\/09\/DBOpt-300x185.png 300w, https:\/\/lswp.store\/wp-content\/uploads\/2017\/09\/DBOpt-768x472.png 768w, https:\/\/lswp.store\/wp-content\/uploads\/2017\/09\/DBOpt-600x369.png 600w, https:\/\/lswp.store\/wp-content\/uploads\/2017\/09\/DBOpt.png 1055w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><br \/>\nYou&#8217;ll notice that some of the buttons have green check-marks while others have red X&#8217;s. The check marks indicate that the area has already been cleaned-up. If you see a red X, it is an indication that you have an opportunity to do some optimization.<\/p>\n<p><strong>A word of caution:<\/strong> as with most tools of this nature, it is a good idea to have a current backup of your database before you begin pressing buttons!<\/p>\n<p>So let\u2019s take a look at each of those buttons and see what they do.<\/p>\n<h3>Clean All<\/h3>\n<p>This button is for the site admin in a rush. It allows you to clean up everything at once by executing all of the other cleanup buttons with a single click.<\/p>\n<p>NOTE: <strong>Optimize Tables<\/strong>\u00a0is different than the other buttons, so it\u2019s not included in <strong>Clean All<\/strong>. Its functionality is explained in more detail below.<\/p>\n<h3>Post Revisions<\/h3>\n<p>When you edit an existing post, WordPress saves a copy of the original version, just in case you make a mistake and need to revert back. If you edit the post 8 times, you will have 8 revisions saved. That\u2019s 8 full copies of the post, each just a little bit different than the others. This button removes all but the most recent revision from the database.<\/p>\n<p>The <strong>Post Revisions<\/strong> button has the potential to free up a considerable amount of space, if you are prone to frequent edits. Just be aware that you will sacrifice your ability to ever restore old versions of posts. This is a sacrifice that most site owners can easily live with, though.<\/p>\n<h3>Orphaned Post Meta<\/h3>\n<p>If you&#8217;ve deleted posts in the past, there is a chance that some metadata records from those posts remain. This button cleans them up.<\/p>\n<h3>Auto Drafts<\/h3>\n<p>When you create or edit a post, WordPress automatically saves drafts now and then. This is to protect you in case you unexpectedly lose your connection, or your computer crashes. If you know that all of your posts are either published or saved correctly as drafts, then it is safe to press this button and remove the automatic drafts.<\/p>\n<h3>Trashed Posts<\/h3>\n<p>If you\u2019ve put a post or page into the trash, then that\u2019s a pretty good sign that you don\u2019t need it anymore. Press this button to permanently empty that garbage can.<\/p>\n<h3>Spam Comments<\/h3>\n<p>There should be no need to keep comments that have been marked as spam. Press this button to erase them once and for all.<\/p>\n<h3>Trashed Comments<\/h3>\n<p>Trashed comments, too, take up space. Press this button to permanently delete them.<\/p>\n<h3>Trackbacks &amp; Pingbacks<\/h3>\n<p>When other blogs link to you (or when you link back to other posts on your own blog), it can create trackbacks or pingbacks. These are stored as comments and can be seen in the <strong>Comments<\/strong> section of your WordPress Admin. Additionally, some themes display trackbacks and pingbacks in among the comments on a post. If keeping a record of these external (and internal) links is not important to you, press this button to clear them from the database.<\/p>\n<h3>Expired Transients<\/h3>\n<p>Transients are the result of a form of caching that can happen in the WordPress database with the results of remote API calls. This option clears all of the expired transients from the database.<\/p>\n<h3>All Transients<\/h3>\n<p>This option clears <em>all<\/em> of the transients in the database, whether expired or not.<\/p>\n<h3>Optimize Tables<\/h3>\n<p>This button is different than the others. It\u2019s the cleanup after the cleanup, if you will. When you delete large amounts of information from your database, it leaves gaps. The <strong>Optimize Tables<\/strong> button reclaims that disk space and reorganizes the table indexes for better efficiency. It\u2019s a useful last step once you\u2019ve done all you care to with the other buttons.<\/p>\n<p><img decoding=\"async\" title=\"\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2017\/09\/null-8.jpeg\" alt=\"\" width=\"672\" height=\"448\" \/><\/p>\n<p>Keeping your database clean and free of trash is a great way to keep your WordPress site running efficiently. We hope you\u2019ll give the new DB Optimizer tab a try! Be sure to let us know if you have any questions, or any suggestions for future enhancements. We\u2019d love to hear from you!<\/p>\n<p>Be sure to meet us back here next week to talk about more LSCWP features!<\/p>\n<p>&#8212;<br \/>\nHave some of your own ideas for future <a href=\"http:\/\/blog.litespeedtech.com\/tag\/wordpress-wednesday\">WordPress Wednesday<\/a> topics? Leave us a comment!<\/p>\n<p>Don\u2019t forget to meet us back here next week for the next installment. In the meantime, here are a few other things you can do:<\/p>\n<ul>\n<li>Subscribe to the <a href=\"http:\/\/blog.litespeedtech.com\/tag\/wordpress-wednesday\/feed\/\">WordPress Wednesday RSS feed<\/a><\/li>\n<li>Download <a href=\"https:\/\/wordpress.org\/plugins\/litespeed-cache\/\">LiteSpeed Cache for WordPress plugin<\/a><\/li>\n<li>Learn more about the plugin <a href=\"https:\/\/www.litespeedtech.com\/products\/cache-plugins\/wordpress-acceleration\">on our website<\/a><\/li>\n<\/ul>\n<p>\u2014<br \/>\n<em>This content was last verified and updated in July of 2025. If you find an inaccuracy, please let us know! In the meantime, see <a href=\"https:\/\/docs.litespeedtech.com\/\">our documentation site<\/a>\u00a0for the most up-to-date information.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>LSCache for WordPress now has a Database Optimization section. Learn how to use it to speed up your site!<\/p>\n","protected":false},"author":1,"featured_media":8140,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[28],"tags":[87,316,317],"class_list":["post-8082","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cache","tag-database-optimization","tag-wordpress","tag-wordpress-wednesday"],"jetpack_featured_media_url":"https:\/\/lswp.store\/wp-content\/uploads\/2017\/09\/wpw19.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts\/8082","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/comments?post=8082"}],"version-history":[{"count":0,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts\/8082\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/media\/8140"}],"wp:attachment":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/media?parent=8082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/categories?post=8082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/tags?post=8082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}