{"id":1966,"date":"2008-07-27T11:03:40","date_gmt":"2008-07-27T14:03:40","guid":{"rendered":"http:\/\/www.hoogervorst.ca\/arthur\/?p=1966"},"modified":"2008-07-27T11:04:17","modified_gmt":"2008-07-27T14:04:17","slug":"do-update-now","status":"publish","type":"post","link":"http:\/\/www.hoogervorst.ca\/arthur\/?p=1966","title":{"rendered":"Do Update Now;"},"content":{"rendered":"<p><span class=\"dropcap\">J<\/span>ust a couple of minutes ago, I was looking through the wp_posts table and thought enough was enough. There&#8217;s a thread over at WordPress where users have been complaining about the bloat and where developers have shrug it off with &#8216;Space is cheap&#8217;. Or, &#8216;You can delete it easily&#8217;. Think of the queries, think of the queries!\n<\/p>\n<p>First off, there&#8217;s a setting you should set in your wp-config file:\n<\/p>\n<p>\n<code>define('WP_POST_REVISIONS', false);<br \/>\n<\/code>\n<\/p>\n<p>To check (and compare) how many revision entries your wp_posts table has:\n<\/p>\n<p><code>select<br \/>\n   count(*),<br \/>\n   post_status,<br \/>\n   post_type<br \/>\n   from wp_posts group<br \/>\n   by post_status, post_type;<br \/>\n<\/code>\n<\/p>\n<p>You can delete the bloat by issuing:\n<\/p>\n<p><code>delete from wp_posts where post_type = 'revision';<\/code>\n<\/p>\n<p>If you have access to SSH, you should check the main wordpress folder: since moving to version 2.4, I&#8217;ve seen files called &#8216;core&#8217; in that directory. These are (literally) core dumps and they are huge. Obviously, WP crashes the server at times (I feel sorry for my host): so much for &#8216;light-weight&#8217; or &#8216;state of the art&#8217;. Oh wait, I can hear the punch-line, what is it?<\/p>\n<p>Oh yes: &#8220;Code is Poetry&#8221;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just a couple of minutes ago, I was looking through the wp_posts table and thought enough was enough. There&#8217;s a thread over at WordPress where users have been complaining about the bloat and where developers have shrug it off with &hellip; <a href=\"http:\/\/www.hoogervorst.ca\/arthur\/?p=1966\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[15,16],"tags":[577],"_links":{"self":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts\/1966"}],"collection":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1966"}],"version-history":[{"count":1,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts\/1966\/revisions"}],"predecessor-version":[{"id":1967,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts\/1966\/revisions\/1967"}],"wp:attachment":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1966"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}