<?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>pzg&#039;s blog &#187; wp_posts</title>
	<atom:link href="http://pzg.me/tag/wp_posts/feed/" rel="self" type="application/rss+xml" />
	<link>http://pzg.me</link>
	<description>苦了一辈子，一路走好</description>
	<lastBuildDate>Thu, 26 Apr 2012 08:13:05 +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>wordpress数据库清理</title>
		<link>http://pzg.me/web/779/wordpress-database-clean-up/</link>
		<comments>http://pzg.me/web/779/wordpress-database-clean-up/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 03:19:44 +0000</pubDate>
		<dc:creator>countmeon</dc:creator>
				<category><![CDATA[网页设计]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp_commentmeta]]></category>
		<category><![CDATA[wp_options]]></category>
		<category><![CDATA[wp_postmeta]]></category>
		<category><![CDATA[wp_posts]]></category>

		<guid isPermaLink="false">http://pzg.me/?p=779</guid>
		<description><![CDATA[换了新主题，数据库也顺带的清理下，这次清理了三个数据库表，由于越来越懒其中两个数据库表使用插件清理。 清理数据表为： wp_options， wp_posts， wp_postmeta wp_options 我使用一款插件来完成cl... ]]></description>
			<content:encoded><![CDATA[<p>换了新主题，数据库也顺带的清理下，这次清理了三个数据库表，由于越来越懒其中两个数据库表使用插件清理。</p>
<p>清理数据表为： wp_options， wp_posts， wp_postmeta</p>
<p><strong>wp_options</strong></p>
<p>我使用一款插件来完成clean-options，具体可以看下<a href="http://pzg.me/web/314/wp_options-data-sheet-optimization-and-cleaning-up-litter-data/" title="链接到 wp_options数据表优化和清理垃圾数据" >wp_options数据表优化和清理垃圾数据</a>。 网上也经常采取删除这个数据库表的方法来处理。不过会丢失一些设置。</p>
<p><strong>wp_posts</strong></p>
<p>我也是使用的一款插件处理的 WP Cleaner 可以参见 <a href="http://pzg.me/web/280/wp-cleaner-no-longer-need-to-delete-a-revised-version-of/" title="链接到 WP Cleaner 删除wordpress不再需要的修订版" >WP Cleaner 删除wordpress不再需要的修订版</a>。另外如果你不信任插件的话可以自己使用sql语句处理更多可以看我另外的两篇文章，<a href="http://pzg.me/i/206/disable-wordpress-version-of-the-article-management-and-delete-the-existing-version-of-history-article/" title="链接到 禁用wordpress文章版本管理功能和删除已有的历史记录文章版本" >禁用wordpress文章版本管理功能和删除已有的历史记录文章版本</a>和<a href="http://pzg.me/web/532/disable-wordpress-articles-of-functional-and-only-way-to-stay-in-auto-save-feature/" title="链接到 禁用 WordPress 文章修订功能并只留自动保存功能的方法" >禁用 WordPress 文章修订功能并只留自动保存功能的方法</a>。这两篇文章。</p>
<p><strong>wp_postmeta</strong></p>
<p>这个是网上找的两条SQL语句删除了1000多条数据。目前测试博客完全正常，看了下删除条目也是安全的，所以这里给出SQL语句</p>
<p>DELETE FROM wp_postmeta WHERE meta_key = '_edit_lock';<br />
DELETE FROM wp_postmeta WHERE meta_key = '_edit_last';</p>
<p>另外我除了这两条还执行了一些其他语句由于有些风险，这里就不给出了。其实大部分无用的数据均在这三个表中，清理过后应该不会又太多的冗余数据了，2.9以后多出wp_commentmeta数据表来，看来是关联评论的，目前数据量不多暂不去研究。</p>
]]></content:encoded>
			<wfw:commentRss>http://pzg.me/web/779/wordpress-database-clean-up/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

