<?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>&#60;title&#62; &#187; mysql</title>
	<atom:link href="http://www.adammoro.com/blog/tag/mysql/feed" rel="self" type="application/rss+xml" />
	<link>http://www.adammoro.com/blog</link>
	<description>Internet Marketing, Web Development and Programming Stuff</description>
	<lastBuildDate>Fri, 19 Nov 2010 19:58:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Remove WordPress Post Revisions for Database Optimization</title>
		<link>http://www.adammoro.com/blog/remove-wordpress-revisions.html</link>
		<comments>http://www.adammoro.com/blog/remove-wordpress-revisions.html#comments</comments>
		<pubDate>Tue, 09 Mar 2010 14:33:28 +0000</pubDate>
		<dc:creator>Adam Moro</dc:creator>
				<category><![CDATA[Code Snippets & Examples]]></category>
		<category><![CDATA[Content Management]]></category>
		<category><![CDATA[Database Management]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.adammoro.com/blog/?p=136</guid>
		<description><![CDATA[Ever since WordPress introduced autosaving and revision control features, larger blogs have seen a significant increase in the size of their databases. If your WordPress installation has slowed dramatically or you are simply looking to optimize your database by removing countless records you'll never end up actually needing, run the following query on your WordPress ...]]></description>
			<content:encoded><![CDATA[<p>Ever since WordPress introduced autosaving and revision control features, larger blogs have seen a significant increase in the size of their databases. If your WordPress installation has slowed dramatically or you are simply looking to optimize your database by removing countless records you'll never end up actually needing, run the following query on your WordPress database:</p>
<pre>delete from wp_posts where post_type = "revision";</pre>
<p>If you're wondering how to use this query, it may not be the best idea to do it yourself and you should probably have your database administrator help you out with this. Then again, if you have a DBA you probably aren't reading this post so here's how you use it.</p>
<p>Using <a title="phpMyAdmin" href="http://www.phpmyadmin.net/home_page/index.php">phpMyAdmin</a>, <a title="SQLyog" href="http://www.webyog.com/en/">SQLyog</a>, <a title="Sequel Pro" href="http://code.google.com/p/sequel-pro/">Sequel Pro</a> or another <a title="MySQL GUI tools" href="http://www.google.com/search?q=MySQL+GUI+tool">MySQL GUI tool</a>, login to MySQL and select the appropriate WordPress database (if you have more than one WordPress database, be very careful making sure you are selecting the database connected to the blog you are working on). Then run the query from above and you're done. For example, if you're using phpMyAdmin, click on "SQL" from the top menu, paste in the query and click, "Go."</p>
<p>If you do not have access to a MySQL GUI tool, you can do this from a Unix shell such as Terminal. To login to MySQL from Terminal, run the following command:</p>
<pre>mysql -u &lt;username&gt; -p&lt;password&gt; &lt;database&gt;</pre>
<p>An sample command for the above command example is:</p>
<pre>mysql -u root -pyourpassword wordpress</pre>
<p>Then, simply copy the query provided at the start of this post into the command line (as depicted below):</p>
<pre>mysql&gt; delete from wp_posts where post_type = "revision";</pre>
<p>Hit, "return" and you're done!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adammoro.com/blog/remove-wordpress-revisions.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

