<?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>Sinchen部落格 &#187; 靜態HTML</title>
	<atom:link href="http://scl13.com/tag/%e9%9d%9c%e6%85%8bhtml/feed/" rel="self" type="application/rss+xml" />
	<link>http://scl13.com</link>
	<description>3C開箱文兼心得分享‧正妹攝影讓你賞心悅目</description>
	<lastBuildDate>Thu, 29 Jul 2010 01:07:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<atom:link rel='hub' href='http://scl13.com/?pushpress=hub'/>
		<item>
		<title>WordPress 外掛Wp Super Cache安裝教學與設定</title>
		<link>http://scl13.com/wordpress-wp-super-cache/</link>
		<comments>http://scl13.com/wordpress-wp-super-cache/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 08:46:37 +0000</pubDate>
		<dc:creator>Sinchen</dc:creator>
				<category><![CDATA[WordPress心得]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Wp Super Cache]]></category>
		<category><![CDATA[外掛]]></category>
		<category><![CDATA[安裝教]]></category>
		<category><![CDATA[靜態HTML]]></category>

		<guid isPermaLink="false">http://scl13.com/?p=600</guid>
		<description><![CDATA[以下心得是安裝過4個WP之後，得到的快速安裝心得，其實wp super cache外掛的安裝法，在網路上已經很多了，但都沒有我心得的這種，所以一定要跟大家分享啦。]]></description>
			<content:encoded><![CDATA[<p>作者:<a href='http://scl13.com'>Sinchen</a> 發表於 <a href='http://scl13.com/wordpress-wp-super-cache/'>Scl13.com</a></p><p>以下心得是安裝過4個WP之後，得到的快速安裝心得，其實wp super cache外掛的安裝法，在網路上已經很多了，但都沒有我心得的這種，所以一定要跟大家分享啦。</p>
<ol class="noimg">
<li>先下載<a href="http://downloads.wordpress.org/plugin/wp-super-cache.0.9.3.1.zip">wp super cache</a>外掛回來。網址:<a href="http://wordpress.org/extend/plugins/wp-super-cache/">http://wordpress.org/extend/plugins/wp-super-cache/</a></li>
<li>連線至FTP將<strong>wp-content</strong>資料夾權限設定為<strong>777</strong>。也將<strong>.htaccess</strong>此檔案的權限設定為<strong>777</strong>(若沒使用固定網址的WP並不會有這個檔案，請上傳一個空的文件檔後將其名改為<strong>.htaccess</strong>)</li>
<li>在<strong>wp-config.php</strong>內增加此代碼 <span class="s2">define(&#8216;WP_CACHE&#8217;, true);</span></li>
<li>將Wp Super Cache外掛上傳至FTP的外掛目錄下(wp-content/plugins/)</li>
<li>至WP後台啟用外掛，外掛設定頁中的第一個選項<strong>ON (WP Cache and Super Cache enabled)</strong></li>
<li>將wp-content資料夾權限給回<strong>755</strong>，<strong>.htaccess</strong>的權限改為<strong>666</strong>(我不確定他原先是多少，不過我都設定666沒啥問題)</li>
</ol>
<p><span id="more-600"></span><br />
wp super cache外掛的安裝就這樣搞定拉，若擔心有沒有安裝成功，以下有驗證的方法:</p>
<p>FTP中的<strong>wp-content</strong>資料夾會增加以下的檔案</p>
<ul class="noimg">
<li>cache資料夾</li>
<li>advanced-cache.php</li>
<li>wp-cache-config.php</li>
</ul>
<p>以上<strong>2個PHP文件與一個資料夾是外掛自動產生的</strong>，將<strong>.htaccess</strong>文件下載回來，確定內部有<span class="s2"># BEGIN WPSuperCache</span>字樣與一堆英文字即可，連到您的網站首頁之後，進入後台外掛控制頁中，應該會發現，原本<strong>0 Cached Pages</strong>變成<strong>1 Cached Pages</strong>了。像這樣就是外掛正常運作啦。</p>
<p>而後台的設定都是英文，靠GOOGLE的幫助下我找到了設定的解說，也提供給大家參考。</p>
<blockquote><p>作者:<a href="http://99dev.net/">【知行合一】-Poople’s Blog</a><br />
原文網址:已失效，故不連結http://99dev.net/archives/369<br />
文章繁體中文化:<a href="http://scl13.com">Sicnhen</a></p></blockquote>
<blockquote><p><span class="s2">WP Super Cache Status</span><br />
首先有三個選項：<br />
<span class="s2">ON (WP Cache and Super Cache enabled)</span><br />
<span class="s2">HALF ON (Super Cache Disabled, only legacy WP-Cache caching.)</span><br />
<span class="s2">OFF (WP Cache and Super Cache disabled)</span><br />
預設情況下，WP Super Cache 是沒有開啟的，所以在這裡選擇下，需選擇第一個，就是 Super Cache，暫存為靜態HTML，如果第二種情況呢，則和 WP-Cache 一致。</p>
<p><span class="s2">Proudly tell the world your server is Digg proof! (places a message in your blog’s footer)</span><br />
這個是說在你的 footer 顯示一條資訊告訴讀者本部落格已經暫存了，一般不建議這麼做。</p>
<p><span class="s2">Clear all cache files when a post or page is published. (This may significantly slow down saving of posts.)</span><br />
這個是說發佈新日誌的時候清理所有暫存，這個肯定不能這麼幹了←意思是不要打開這開關。</p>
<p><span class="s2">Cache Contents</span><br />
這裡顯示你部落格快取檔案和過期檔的數量，你可以手工刪除快取檔案和過期檔，因為 WP Super Cache 有垃圾回收機制，所以這裡不幫不用手動刪除，如果當你測試某個外掛程式，看不到效果的時候，如果確定是暫存的原因，你可以到這裡手動刪除測試下。</p>
<p><span class="s2">Super Cache Compression</span><br />
啟動這個則會成生 gzip 壓縮，加快你網站的讀取速度。</p>
<p><span class="s2">Mod Rewrite Rules</span><br />
WP Super Cache 是通過 Mod Rewrite 實現靜態HTML的，所以這裡在是顯示添加的 Mod Rewrite 規則。</p>
<p><span class="s2">Expiry Time and Garbage Collection</span><br />
垃圾收過期時間和集，這裡主要設置快取檔案過期時間，和多久刪除一次過期的快取檔案。個人建議：一般暫存時間設置為1天（86400）左右，暫存刪除時間為1個小時一次。</p>
<p><span class="s2">Accepted filenames, rejected URIs</span><br />
這裡設置一些連結不需要暫存，並且可以設置特例。</p>
<p><span class="s2">Rejected User Agents</span><br />
這裡設置某些 User Agents 來訪問的時候不會暫存。比如 Google 和百度爬蟲等。</p>
<p><span class="s2">Lock Down</span><br />
一般情況下，某篇日誌如果有了新留言，就會更新快取檔案，不過這篇日誌是否已經到了暫存時間，但是在某種情況，你預料到你的部落格可能會有很大流量和留言，候重複更新快取檔案可能並不是很好的選擇，速度反而更慢，這個時候你就可以鎖定快取檔案，新留言不再更新暫存日誌。<br />
外掛程式作者也給出了一段代碼，如果你的部落格鎖定了之後，可以通過判斷一個變數 WPLOCKDOWN 是否存在告來訴讀者，你部落格已經鎖定，待會才會更新，當然了，一般部落格不建議使用。</p>
<p><span class="s2">Directly Cached Files</span><br />
直接快取檔案，根據永久連結直接暫存，比如你的關於頁面是不太更新，你就可以直接暫存它到你的 about 目錄下（假如你的關於頁面的 slug 是 about），這個直接暫存不會過期。適合一些經常性不更新的靜態頁面。</p>
<p><span class="s2">Fix Configuration</span><br />
因為上面那麼多配置，你可能搞糊塗了，那麼這裡可以讓你一鍵恢復到默認。</p>
<p><span class="s2">Cache Plugins</span><br />
暫存外掛程式還支援附加外掛程式，比如作者自己就提供一個外掛程式：No Adverts for Friends，不對朋友顯示廣告。<br />
附加說明</p></blockquote>
<p><b>PermLink:</b> <a href='http://scl13.com/wordpress-wp-super-cache/'>http://scl13.com/wordpress-wp-super-cache/</a></p><p><b><a href='http://scl13.com/wordpress-wp-super-cache/#comment'>回覆(5)</a></b> | <b><a href='http://www.plurk.com/Sinchen'>跟Sinchen一起噗浪</a></b>]]></content:encoded>
			<wfw:commentRss>http://scl13.com/wordpress-wp-super-cache/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
