<?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>【知行合一】-Poople&#039;s Blog &#187; WordPress</title>
	<atom:link href="http://99dev.net/archives/tag/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://99dev.net</link>
	<description>智巧终归庸俗，雄谋只余虚话</description>
	<lastBuildDate>Wed, 12 Oct 2011 01:19:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>推荐超级顺手的WordPress代码插件</title>
		<link>http://99dev.net/archives/898</link>
		<comments>http://99dev.net/archives/898#comments</comments>
		<pubDate>Tue, 16 Nov 2010 08:35:14 +0000</pubDate>
		<dc:creator>蒼</dc:creator>
				<category><![CDATA[善用佳软]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://99dev.net/archives/898</guid>
		<description><![CDATA[支持特性
CodeColorer支持的语言有:（支持的语言多达数十种，以下根据使用频繁度有删减）
1234apache,applescript,apt_sources, bash,c, cmake,css,
dos, ini, inno,java,java5,javascript, make,mysql,oracle11,oracle8,
<span class="readmore"><a href="http://99dev.net/archives/898" title="推荐超级顺手的WordPress代码插件" target="_blank">阅读全文——共450字</a></span>]]></description>
			<content:encoded><![CDATA[<p><strong>支持特性</strong></p>
<p>CodeColorer支持的语言有:（支持的语言多达数十种，以下根据使用频繁度有删减）</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">apache,applescript,apt_sources, bash,c, cmake,css,<br />
dos, ini, inno,java,java5,javascript, make,mysql,oracle11,oracle8,<br />
perl,php, plsql,powershell,python,rails,reg,robots,ruby,sql,<br />
tcl,text,tsql,vim, xml, xorg_conf</div></td></tr></tbody></table></div>
<p><strong>使用方法</strong></p>
<p>使用时，将编辑器切换到HTML模式，而不是可视化。在想要插入代码的地方，输入以下代码：</p>
<blockquote><p><span style="font-family: monospace;">&lt;code lang=”lang_name”&gt;这里是代码&lt;/code&gt;</span></p></blockquote>
<p>lang_name表示语言名称</p>
<p>效果：1    </p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;This is php code&quot;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p><strong>参考资料</strong></p>
<p>CodeColorer项目主页：<a href="http://kpumuk.info/projects/wordpress-plugins/codecolorer/">http://kpumuk.info/projects/wordpress-plugins/codecolorer/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://99dev.net/archives/898/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rewrite Rules for WordPress Mu</title>
		<link>http://99dev.net/archives/876</link>
		<comments>http://99dev.net/archives/876#comments</comments>
		<pubDate>Tue, 03 Aug 2010 03:19:18 +0000</pubDate>
		<dc:creator>蒼</dc:creator>
				<category><![CDATA[Web服务器]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://99dev.net/archives/876</guid>
		<description><![CDATA[1. WordPress Mu后台开启永久链接功能
1后台-设置-永久链接-自定义结构-/blog/archives/%post_id%
2. 修改Nginx.conf，加入rewrite rules

<span class="readmore"><a href="http://99dev.net/archives/876" title="Rewrite Rules for WordPress Mu" target="_blank">阅读全文——共469字</a></span>]]></description>
			<content:encoded><![CDATA[<p>1. WordPress Mu后台开启永久链接功能</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">后台-设置-永久链接-自定义结构-/blog/archives/%post_id%</div></td></tr></tbody></table></div>
<p>2. 修改Nginx.conf，加入rewrite rules<br />
<span id="more-876"></span></p>
<div class="codecolorer-container apache default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br /></div></td><td><div class="apache codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">location / {<br />
index index.html index.htm index.php;<br />
root /data0/data_www/hangyan.com/wp;<br />
<span style="color: #adadad; font-style: italic;">#on server block</span><br />
<span style="color: #adadad; font-style: italic;">##necessary if using a multi-site plugin</span><br />
server_name_in_redirect <span style="color: #0000ff;">off</span>;<br />
<span style="color: #adadad; font-style: italic;">##necessary if running Nginx behind a reverse-proxy</span><br />
port_in_redirect <span style="color: #0000ff;">off</span>;<br />
rewrite ^.*/files/(.*) /wp-content/blogs.php?file=$1;<br />
if (!-e $request_filename) {<br />
rewrite ^.+?(/wp-.*) $1 last;<br />
rewrite ^.+?(/.*\.php)$ $1 last;<br />
rewrite ^ /index.php last;<br />
}<br />
}</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://99dev.net/archives/876/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Collection]WP Super Cache 基本介绍</title>
		<link>http://99dev.net/archives/369</link>
		<comments>http://99dev.net/archives/369#comments</comments>
		<pubDate>Sat, 27 Dec 2008 08:32:53 +0000</pubDate>
		<dc:creator>蒼</dc:creator>
				<category><![CDATA[系统架构]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://99dev.net/?p=369</guid>
		<description><![CDATA[注：本文转载至“我爱水煮鱼”，专业详细。本人强力推荐该插件，缓存效果很明显。
WP Super Cache 基本介绍
WP Super Cache 是 WordPress 官方开发人员 Donncha 开发，是当前最高效也是最灵活的 WordPress 静态缓存插件。它直接生成 HTML 文件，这样 Apache 就不用解析 PHP 脚本，通过使用这个插件，能使得你的 WordPress 博客将显著的提速。
这个插件是基于 Ricardo Galli Granada 的 WP-Cache 2。WP-Cache 2 可以缓存你的 WordPress 博客使得不用再次访问数据库，但是它产生的是 PHP 文件而不是 HTML 文件，所以还需要 PHP 引擎去解析它们。而 WP Super Cache 则直接产生 HTML 文件，所以服务器不用解析甚至一行 PHP 代码，所以缓存之后的速度就和访问你服务器上的一张图片一样快。
<span class="readmore"><a href="http://99dev.net/archives/369" title="[Collection]WP Super Cache 基本介绍" target="_blank">阅读全文——共2623字</a></span>]]></description>
			<content:encoded><![CDATA[<p>注：本文转载至“<a href="http://fairyfish.net/2008/10/27/wp-super-cache/" target="_blank">我爱水煮鱼</a>”，专业详细。本人强力推荐该插件，缓存效果很明显。</p>
<p>WP Super Cache 基本介绍<br />
WP Super Cache 是 WordPress 官方开发人员 Donncha 开发，是当前最高效也是最灵活的 WordPress 静态缓存插件。它直接生成 HTML 文件，这样 Apache 就不用解析 PHP 脚本，通过使用这个插件，能使得你的 WordPress 博客将显著的提速。<span id="more-369"></span><br />
这个插件是基于 Ricardo Galli Granada 的 WP-Cache 2。WP-Cache 2 可以缓存你的 WordPress 博客使得不用再次访问数据库，但是它产生的是 PHP 文件而不是 HTML 文件，所以还需要 PHP 引擎去解析它们。而 WP Super Cache 则直接产生 HTML 文件，所以服务器不用解析甚至一行 PHP 代码，所以缓存之后的速度就和访问你服务器上的一张图片一样快。<br />
WP Super Cache 是如何工作的</p>
<p>一半常规的缓存办法是手工把动态页面保存为 HTML 代码，WP Super Cache 也是通过同样的方式的，但是通过自动的方式完成这个过程。</p>
<p>当你一个访问者来的你的站点，他没有登入或者也没有留言，这样他得到是一个在 WordPress cache 文件夹下的 supercache 子文件夹下的纯静态文件，其实你都可以自己到上面的 supercache 目录下去查看同样的永久链接的 HTML 文件的备份。判断一个页面是否已经被缓存了，查看该页面的源代码，看看最后一行是否有 &lt;!- super cache -&gt; 或者 &lt;!- super cache gz -&gt;。</p>
<p>如果访问者已经登陆或者留了言，就会返回 WP Cache 函数生成的页面，并且最后一行会有 &lt;!- Cached page served by WP-Cache &#8211; &gt;<br />
WP Super Cache 基本使用</p>
<p>上传 WP Super Cache 到插件目录，并在 Plugin 目录下激活之后，就可以到 Setting &gt; WP Super Cache 进行详细配置。<br />
WP Super Cache Status</p>
<p>首先是三个选项：<br />
ON (WP Cache and Super Cache enabled)<br />
HALF ON (Super Cache Disabled, only legacy WP-Cache caching.)<br />
OFF (WP Cache and Super Cache disabled)</p>
<p>默认情况下，WP Super Cache 是没有开启的，所以在这里选择下，需按则第一个，就是 Super Cache，缓存为静态文件，如果第二种情况呢，则和 WP-Cache 一致。</p>
<p>Proudly tell the world your server is Digg proof! (places a message in your blog&#8217;s footer)<br />
这个是说在你的 footer 显示一条信息告诉读者该博客已经缓存了，一般不要这样做。</p>
<p>Clear all cache files when a post or page is published. (This may significantly slow down saving of posts.)<br />
这个是说发布新日志的时候清理所有缓存，这个肯定不能这么干了。<br />
Super Cache Compression</p>
<p>启动这个则会成生 gzip 压缩，节省你的带宽。<br />
Mod Rewrite Rules</p>
<p>WP Super Cache 是通过 Mod Rewrite 实现访问静态文件的，所以这里在是显示添加的 Mod Rewrite 规则。<br />
Expiry Time and Garbage Collection</p>
<p>过期时间和垃圾收集，这里主要设置缓存文件过期时间，和多久删除一次过期的缓存文件。个人建议：一般缓存时间设置为1天（86400）左右，缓存删除时间为1个小时一次。<br />
Accepted filenames, rejected URIs</p>
<p>这里设置一些链接不需要缓存，并且可以设置特例。<br />
Rejected User Agents</p>
<p>这里设置某些 User Agents 来访问的时候不会缓存。比如 Google 和百度爬虫等。<br />
Cache Contents</p>
<p>这里显示你博客缓存文件和过期文件的数量，你可以手工删除缓存文件和过期文件，因为 WP Super Cache 有垃圾回收机制，所以这里不帮不用手工删除，如果当你测试某个插件，看不到效果的时候，如果确定是缓存的原因，你可以到这里手工删除测试下。<br />
Lock Down</p>
<p>一般情况下，某篇日志如果有了新留言，就会更新缓存文件，不过这篇日志是否已经到了缓存时间，但是在某种情况，你预料到你的博客可能会有很大流量和留言，候重复更新缓存文件可能并不是很好的选择，速度反而更慢，这个时候你就可以锁定缓存文件，新留言不再更新缓存日志。</p>
<p>插件作者也给出了一段代码，如果你的博客锁定了之后，可以通过判断一个变量 WPLOCKDOWN 是否存在告来诉读者，你博客已经锁定，待会才会更新，当然了，一般博客不建议使用。<br />
Directly Cached Files</p>
<p>直接缓存文件，根据永久链接直接缓存，比如你的关于页面是不太更新，你就可以直接缓存它到你的 about 目录下（假如你的关于页面的 slug 是 about），这个直接缓存不会过期。适合一些经常性不更新的静态页面。<br />
Configuration messed up?</p>
<p>因为上面那么多配置，你可能搞糊涂了，那么这里可以让你一键恢复到默认。<br />
Cache Plugins</p>
<p>缓存插件还支持附加插件，比如作者自己就提供一个插件：No Adverts for Friends，不对朋友显示广告。<br />
附加说明<br />
登陆了和留言之后是看不到静态缓存页面的，看到的效果和原来的 WP-Cache 插件一样的，一般来说留言的同学不是那么多。<br />
这个插件通过 Mod Rewrite 来是实现访问静态缓存页面，所以首先你的主机要支持 Mod Rewrite，然后你要在 WordPress 后台启动永久链接。<br />
一些动态的时时更细的插件，如 Recent Comments，Recent Posts 等，一个很好的解决方法是通过 Javascript 来实现。所以同理 Sidebar 更新也只能在静态页面刷新的时候更新。我以后会讲解下如何实现 JS 实现 Recent Comment, Recent Post, 和 PostViews 。<br />
不要使用性能很差的主机，尽管缓存了，但是还是不行的，这里我个人推荐我和朋友一起搞的主机：WFANS 主机。<br />
还有很多依赖于刷新数据的插件，如 SK2, Bad Behaviour 等可能不起作用。缓存总归会带来一点那个灵活性的不足。</p>
<p>这个插件我也使用的时间也不是很长，如果大家有什么新的发现，也可以留言告诉我！</p>
]]></content:encoded>
			<wfw:commentRss>http://99dev.net/archives/369/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[Original]迁移至美国空间，贴点心得</title>
		<link>http://99dev.net/archives/306</link>
		<comments>http://99dev.net/archives/306#comments</comments>
		<pubDate>Sat, 22 Nov 2008 02:26:03 +0000</pubDate>
		<dc:creator>蒼</dc:creator>
				<category><![CDATA[Web服务器]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://99dev.net/archives/306</guid>
		<description><![CDATA[在DRL的小S处买了Cpanel的空间，相当划算，速度还不错。熟悉了一段时间，功能相当强大，支持perl，支持ruby，还有ssh登录等等。相当满意，就酝酿着把空间也转过来。
今天下午，用了2小时，WordPress全部迁移完毕，如果还有小bug的话，请大家在评论中附上，谢谢大家。
简要写一下迁移过程
备份·域名重新指向，这一步放在前面做有两个考量，可以间接起到暂停站点的效果，防止迁移期间有新的数据库写入；同时，也因为DNS缓存刷新需要较长时间，这里先做，迁移完毕的同时，新的域名解析也差不多生效了·停止站点运行（一般空间商的控制面板都有该功能）·备份mysql数据库，一般是用phpmyadmin，下载到本地·打包www主目录，下载到本地
<span class="readmore"><a href="http://99dev.net/archives/306" title="[Original]迁移至美国空间，贴点心得" target="_blank">阅读全文——共1023字</a></span>]]></description>
			<content:encoded><![CDATA[<p>在DRL的小S处买了Cpanel的空间，相当划算，速度还不错。熟悉了一段时间，功能相当强大，支持perl，支持ruby，还有ssh登录等等。相当满意，就酝酿着把空间也转过来。</p>
<p>今天下午，用了2小时，WordPress全部迁移完毕，如果还有小bug的话，请大家在评论中附上，谢谢大家。</p>
<p>简要写一下迁移过程</p>
<p><span id="more-306"></span><strong><font color="#004080" size="4">备份</font></strong><br />·域名重新指向，这一步放在前面做有两个考量，可以间接起到暂停站点的效果，防止迁移期间有新的数据库写入；同时，也因为DNS缓存刷新需要较长时间，这里先做，迁移完毕的同时，新的域名解析也差不多生效了<br />·停止站点运行（一般空间商的控制面板都有该功能）<br />·备份mysql数据库，一般是用phpmyadmin，下载到本地<br />·打包www主目录，下载到本地
</p>
<p><strong><font color="#004080" size="4">迁移及修改</font></strong><br />·利用ftp将备份的www目录上传到新空间<br />·在新空间使用phpmyadmin导入数据库<br />·修改WP目录下的<span style="color: #004080">wp-config.php</span>，修改如下信息</p>
<blockquote><p>// ** MySQL 设置 ** //<br />define(&#8216;DB_NAME&#8217;, &#8216;poople_db99devwp&#8217;);&nbsp;&nbsp;&nbsp; // 数据库名称<br />define(&#8216;DB_USER&#8217;, &#8216;poople_db99dev&#8217;);&nbsp;&nbsp;&nbsp;&nbsp; // 数据库用户名<br />define(&#8216;DB_PASSWORD&#8217;, &#8216;-mfLgv92LYm|&#8217;); // 数据库密码<br />define(&#8216;DB_HOST&#8217;, &#8216;localhost&#8217;);&nbsp;&nbsp;&nbsp; // 基本上，您无需更改以下选项<br />define(&#8216;DB_CHARSET&#8217;, &#8216;utf8&#8242;);<br />define(&#8216;DB_COLLATE&#8217;, ”);<br /><strong><font color="#004080" size="4"></font></strong></p>
</blockquote>
<p><strong><font color="#004080" size="4">检验成功与否</font></strong><br />如此，整个导入工作完成，接下来就等于生效。先刷新你本地的DNS缓存：<br />·Windows<br />“开始”-“运行”-“cmd”-“ipconfig /flushdns”<br />·Linux<br />/etc/rc.d/init.d/nscd restart<br />然后ping你的域名，看是否已经转往新空间了。</p>
<p><a href="http://99dev.net/wp-content/uploads/2008/11/Original_100E9/wpsuccessed.png"><img title="wp-successed" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="74" alt="wp-successed" src="http://99dev.net/wp-content/uploads/2008/11/Original_100E9/wpsuccessed_thumb.png" width="244" border="0"></a>&nbsp;<br />如果解析是对的，那你的新Blog就算成功搬家了。</p>
<p><font color="#004080" size="4"><strong>可能故障</strong></font></p>
<p>在此遇到的错误：如果你原来在WP后台启用rewrite规则，那么可能发生所有文章链接全部失效的情况。<br /><span style="color: #ff0000">rewrite错误<br />需要在WordPress后台：“设置”-“永久链接”修改成默认，然后，重复一遍，改为你喜欢的方式。</span></p>
<p><span style="color: #333399">=====借位放广告=========================================</span><br />空间是从DRL的小s处订购的，美国的site5主机<a href="http://www.site5.com/">http://www.site5.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://99dev.net/archives/306/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

