<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Lester Chan's WordPress Plugins &#187; disable</title>
	<atom:link href="http://lesterchan.net/wordpress/tag/disable/feed/" rel="self" type="application/rss+xml" />
	<link>http://lesterchan.net/wordpress</link>
	<description>Lester Chan's WordPress Plugins Development Blog</description>
	<lastBuildDate>Tue, 22 May 2012 12:02:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How To Turn Off Post Revision In WordPress 2.6</title>
		<link>http://lesterchan.net/wordpress/2008/07/17/how-to-turn-off-post-revision-in-wordpress-26/</link>
		<comments>http://lesterchan.net/wordpress/2008/07/17/how-to-turn-off-post-revision-in-wordpress-26/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 16:29:26 +0000</pubDate>
		<dc:creator>Lester Chan</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[disable]]></category>
		<category><![CDATA[off]]></category>
		<category><![CDATA[revision]]></category>

		<guid isPermaLink="false">http://lesterchan.net/wordpress/?p=188</guid>
		<description><![CDATA[One of the irritating feature for me in WordPress 2.6 is the post revision. I am the only author of my blog and hence this feature is useless to me. Just in case you are wondering how post revision works, &#8230; <a href="http://lesterchan.net/wordpress/2008/07/17/how-to-turn-off-post-revision-in-wordpress-26/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the irritating feature for me in WordPress 2.6 is the post revision. I am the only author of my blog and hence this feature is useless to me.</p>
<p>Just in case you are wondering how post revision works, whenever a post is edited, <strong>a new row</strong> will be created in wp_posts table. Hence if your posts or pages got edited  10 times, you will have 10 new rows in wp_posts table.</p>
<p><strong>In no time</strong> your wp_posts table will be filled up and the post ID will be huge.</p>
<p>To turn off this feature, add this following code to <strong>wp-config.php</strong>:</p>
<pre lang="php" line="1">
define('WP_POST_REVISIONS', false);
</pre>
<p>You can also delete all post revisions by running this query in phpMyAdmin:</p>
<pre lang="sql" line="1">
DELETE a,b,c
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = 'revision'
</pre>
<p>Be sure to backup your database first before performing any queries in phpMyAdmin.</p>
<p>*UPDATE* Auto Saves does not create a revision of the post.</p>
<p>*UPDATE 2* Updated SQL query from <a href="http://andreineculau.com/blog/2008/07/delete-wordpress-26-revisions/">Andrei Neculau</a> as the previous query does not delete from wp_postmeta and wp_term_relationships tables.</p>
]]></content:encoded>
			<wfw:commentRss>http://lesterchan.net/wordpress/2008/07/17/how-to-turn-off-post-revision-in-wordpress-26/feed/</wfw:commentRss>
		<slash:comments>150</slash:comments>
		</item>
	</channel>
</rss>

