{"id":59,"date":"2009-11-24T22:10:32","date_gmt":"2009-11-25T03:10:32","guid":{"rendered":"http:\/\/wukenny.host-ed.net\/?p=59"},"modified":"2011-04-18T03:25:25","modified_gmt":"2011-04-17T22:25:25","slug":"clear-wordpress-revision-history","status":"publish","type":"post","link":"http:\/\/kennywu.info\/?p=59","title":{"rendered":"Remove WordPress Revision History"},"content":{"rendered":"<p>After a few day&#8217;s playing around with wordpress, I felt one thing is quite annoying. It does not matter how little change you made to your post, wp always save them by means of revision. The result is a waste of resources and unnecessary longer database query time. I really see no reason to save that many revisions. There are a couple of ways to get rid of this &#8220;feature&#8221;.<\/p>\n<ol>\n<li>SQL command:<br \/>\n<em>DELETE FROM wp_posts WHERE post_type = \u00e2\u20ac\u0153revision\u00e2\u20ac\u009d;<br \/>\n<\/em> select wp_posts table and run the command, make sure &#8220;\u00c2\u00a0 (double or single quote) is in proper format.<\/li>\n<li>Modify\u00c2\u00a0 wp-config.php :<br \/>\ndefine(&#8216;WP_POST_REVISIONS&#8217;, false);<br \/>\nthe file locates at the website root directory, add the code before \/* That&#8217;s all, stop editing! Happy blogging. *\/, it turn out there is still one more thing needs to be done.<\/li>\n<li>Plugin<br \/>\nCan not believe there is even a plug in for this, anyway this is the link.\u00c2\u00a0 <a title=\"Delete-Revision\" href=\"http:\/\/wordpress.org\/extend\/plugins\/delete-revision\/\">Delete-Revision<\/a><\/li>\n<\/ol>\n<p>The official document is here: <a title=\"Revision Management\" href=\"http:\/\/codex.wordpress.org\/Revision_Management\">Revision Management<\/a>. It turn out that there is only one autosave in database and the record will be updated every 60 second. The autosave has nothing to do with post revision control. The purpose is to give you something\u00c2\u00a0 in case you have system crash while editing a post, I can live with that. I would like to suggest WordPress to move this from core to something like plug in.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After a few day&#8217;s playing around with wordpress, I felt one thing is quite annoying. It does not matter how little change you made to your post, wp always save them by means of revision. The result is a waste &hellip; <a href=\"http:\/\/kennywu.info\/?p=59\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[59],"class_list":["post-59","post","type-post","status-publish","format-standard","hentry","category-lamp","tag-wordpress-post-revision"],"_links":{"self":[{"href":"http:\/\/kennywu.info\/index.php?rest_route=\/wp\/v2\/posts\/59","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/kennywu.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/kennywu.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/kennywu.info\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/kennywu.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=59"}],"version-history":[{"count":1,"href":"http:\/\/kennywu.info\/index.php?rest_route=\/wp\/v2\/posts\/59\/revisions"}],"predecessor-version":[{"id":207,"href":"http:\/\/kennywu.info\/index.php?rest_route=\/wp\/v2\/posts\/59\/revisions\/207"}],"wp:attachment":[{"href":"http:\/\/kennywu.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=59"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/kennywu.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=59"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/kennywu.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=59"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}