过期域名预定抢注

 找回密碼
 免费注册

使用網站加速插件W3 TOTAL CACHE對比

[複製鏈接]
發表於 2014-12-11 18:19:36 | 顯示全部樓層 |閱讀模式
一直覺得自己的網站速度很慢,換了幾個空間都不理想。(由於還沒開始盈利,買不起太好的。)最近才知道,基本wp的網站都使用WP SUPER CACHE或者W3 TOTAL CACHE來提升速度。據說W3 TOTAL CACHE效果更好,所以就選擇了這個插件,廢話不多說了,直接上圖,這是在http://www.webpagetest.org/ 測試的結果。" ]3 |+ V  v% `- B% n% \7 v
使用前: 使用前.jpg ) h4 T% _# v/ }9 e  o
% ]& @% O4 W+ V; U% b7 [) I
使用後: 使用后.jpg - X* {8 z1 @' s6 W; ?: v  C
可以看到First Byte響應時間明顯減少。但是從First Byte到Start Render的時間並沒有減少。我想請教Start Render和什麼有關?有什麼辦法縮短嗎?另外Keep-alive如何開啟?我這個評測不怎麼高。。 测试.jpg 8 R- S1 }" o- [

: s' M: s; D* g1 D+ ^0 H
回復

使用道具 舉報

 樓主| 發表於 2014-12-11 18:52:39 | 顯示全部樓層
附學啦網的設置教程,不過網站已經打不開了。。幸好我保存了:  \& h0 I2 r" @  |

6 v6 e& f) a3 W" \" _4 C3 K相信很多人下載之後不太會設置這款非常好用的wordpress緩存插件,這次就給大家介紹下這款插件的設置方法,也是經過實踐的結果。史上最全的w3 total  cache設置教程。我配置選項如下:
, V$ j% A' F6 Y" Y3 f0 S# T- t& z# m, w+ g
General Settings
6 h5 l; U; }3 b: m7 x0 k; S w3-total-cache-1.jpg
! z' x, c6 a9 X+ p0 u& u& w1 d' z2 N
Page Cache設置Page cache – 勾選啟用.: F7 i3 A* t- Z! m3 v/ G7 C! H2 r' e
Page cache method – 一般選擇 「Disk:  Enhanced」如果VPS memcache緩存開啟的話,選擇memcache應該是不錯的。
$ @) k- ], A0 B1 f, ?9 ]0 x2 C# K3 N3 T; h
Minify設置# q/ k! m1 W1 y7 M1 L  ~
w3-total-cache-minify1.jpg 8 N; f  E& c" e# r

+ m0 x0 R6 r" V/ G: LMinify – 勾選啟用。# C, T+ F- L# |* Q
Minify mode – 選擇「Manual」模式。! p' e3 S/ K7 T. C8 j
Minify cache method –  選擇「xcache」緩存方式,如果你的VPS支持APC、memcache、xcache等PHP緩存加速器,那麼你可以嘗試選擇這些加速器。
* ?& H: G- l8 Y5 \# a* }, B; yHTML minifier – 選擇「Default」。9 B- n8 h( h8 L# z# Y
JS minifier – 選擇「JSMin (default)」* m6 x/ p% Y( t/ B, D1 f; I
CSS minifier – 選擇「Default」
" B) ^$ Q6 r" L* ]6 l! m1 R( ?+ {$ k! i3 n9 t
Database Cache設置. s5 H9 x) n, w) I3 r  D1 P
w3-total-cache-database.jpg 6 n6 C2 j; e1 L7 x$ M

' X( I) J7 o# UDatabase Cache – 勾選啟用。
. S& L5 x& l8 f' w. j9 ?Database Cache Method – 選擇適合你的PHP加速器,這裡我選擇「XCache」。/ J4 J+ N/ P, }3 q8 {* O
# @" f1 E( u, s3 K7 @4 j* r2 z
Object Cache設置! X, [, o, W- J
w3-total-cache-ObjectCache.jpg 2 Q  k- h3 W0 C! v) @$ }
/ H# o, M7 Q& k4 n
Object Cache – 勾選啟用。
4 u  h, ^4 N2 D  I3 k$ `Object Cache Method – 選擇適合你的一種加速器模式,同上,這裡選「XCache」。2 w+ F" j* `; ~4 R1 T
+ j, v8 j: B) `
Browser Cache設置- E/ v7 ~0 w+ ]1 z) [) Q
w3-total-cache-BrowserCache.jpg % I8 |( `% W5 o  @
Browser Cache – 勾選啟用。& g, O" A  P5 c6 S2 M% C* |
CDN – 略過,不用設置。
' Z! e! k  @; A  TReverse Proxy – 略過,不用設置。
* W: U" o% E( K. r. dMonitoring – 略過,不用設置。: v9 x# M) A& Z' S4 w
Licensing – 略過,不用設置。" {. H& B" n- ?& \+ D9 p9 f4 L
miscellaneous – 略過,不用設置。, b# [* U/ I, V$ `( R8 e
Debug – 略過,不用設置。只需在開啟緩存加速器時測試時開啟使用。
; e# n3 H$ q' ]8 j* X; ~, A! eImport / Export Settings – 參數設置導入及導出功能。0 E* j6 o9 S/ C. T, P0 n

" n# \# o- W0 ]
. Q3 i9 x' a  nAdvanced Settings – Page Cache設置- }/ `" N1 u. ~" M
w3-total-cache-PageCache.jpg
- X9 y( C4 r' p# M/ \* |! d; a/ v. `/ e0 {' p/ I; T2 }
General4 ~. J. m8 U4 c/ r4 d! N
Cache front page – 勾選開啟
9 i- z. y( j0 GCache feeds – 勾選開啟1 ^2 x% ?8 A- _9 _9 |
Cache SSL (https) requests – 不勾選(如果你的網站使用SSL可以勾選開啟)
! v6 k& M" t# q5 z- oCache URIs with query string variables – 勾選開啟
) w: t9 P7 H; y8 vCache 404 (not found) pages – 不勾選
7 M7 ]3 e+ Y7 u/ rCache requests only for  site address – 勾選開啟
7 K% M( J; Y+ |' y0 l. j" L- rDon』t cache pages for logged in users – 勾選開啟
5 B# R7 {" D3 L; A) q# I# QDon』t cache pages for following user roles – 不勾選
9 T9 x  A+ r+ c# u7 o5 G3 D3 b; b# {2 I* @% _2 C% I- j# @* Y8 z
Cache Preload
4 W& l# w- _6 g0 D& [* A. pAutomatically prime the page cache – 勾選開啟
# ?/ e) J5 U& e7 D" h+ CUpdate interval – 輸入 1000
! l, Y' x, M' `7 b5 TPages per interval – 輸入 15
7 v6 i  t# h* }/ D) HSitemap URL – 輸入網站地圖路徑(/sitemap.xml)' Z# p3 I/ h- M
Preload the post cache upon publish events. – 勾選開啟
9 Y) p$ j) p- W. Z, E% s/ P+ X2 b
: G! ?3 ?2 o/ F3 _5 l- Q* c) z: APurge Policy: Page Cache. N  S4 X& j0 V! R
Specify the pages and feeds to purge when posts are created, edited, or  comments posted – 勾選開啟( Front Page, Posts, page, Post page, Blog feed)
$ e7 G% ^; x7 u/ H0 ?* l6 @! `. @& P" SSpecify the feed types to purge – 勾選開啟 rss2 (default)
  L1 n  H3 ?$ |4 V: QPurge Limit: 輸入 15
$ Q& [5 q  M% y. Y  |) C& f7 SAdditional pages: 略過不設置8 i+ Y( k7 G% s. ^
Purge sitemaps:略過不設置( ?- S; Q7 @+ |2 P/ _

' _* Z) U0 C$ M+ _Advanced$ _& h9 F+ y0 W% ?7 N! c" y
Late initialization:勾選開啟3 ^6 e/ p1 @  i% n! E
其餘所有選項默認。, N* R: X) s, n2 D

7 Z" C: E  z# o- wAdvanced Settings – Minify設置7 }/ I6 a1 m- b# y: _# I( N
w3-total-cache-ADminify.jpg
7 A' {! l- J5 [8 t- @
  l6 L4 y4 s, t. k; V/ H% }) wGeneral$ G4 F9 N) r8 T
Rewrite URL structure – 不勾選
9 i& u/ p9 c5 `Disable minify for logged in users – 不勾選5 ?  ]1 |' H" I6 \
Minify error notification:不開啟 (Disabled ), p& u) H6 M& C0 q% t' @; s$ A2 b
HTML & XMLHTML minify  settings - 如果可能啟用(如果可用盡量開啟,由於我開啟後測試發現模板有問題,此選項及以下選項均未開啟。)
' ^! c# e7 P7 NInline CSS minification –取消選中
! e6 @& g, p( L* ]$ K, {Inline JS minification – 取消選中
& Z) U) ?6 m4 ^4 ^2 e% TDon』t minify feeds – 取消選中3 y) `: A  O$ ~' ~  o* j$ s
Line Break Removal – 取消選中& I2 b2 m! Q- x3 }
JSJS minify settings – 勾選啟用(啟用此選項需要密切關注網頁是否有錯位及其它不兼容現象發生), y, W  C+ X( H! K
Operations in areas – 全部選擇 Minify, 和 Embed Type 「Default (blocking」。
& m% l' f6 U! {4 \  w* T- w4 LPreserved comment removal –選中開啟
7 f/ d* n; C3 L, L+ a6 l' s3 ~, E2 cLine break removal – 選中開啟(由於開啟此項我網站網頁出現問題,遂未開啟此項)
! }/ T2 x* I- p0 E5 BCSSCSS minify settings – 選中開啟(開啟此項也需密切關注網頁是否有問題發生)+ ~9 Q/ s) J2 `$ @. j! N4 I" E+ l
Combine only – 取消選中
( U1 H' C7 z5 x/ y+ m. i+ e" }Preserved comment removal (not applied when combine only is active) –勾選開啟% B! s# N( L  X5 y
Line break removal (not applied when combine only is active) – 勾選開啟
8 c$ p( }0 @; O8 @+ l- `, @0 h3 U" T$ h@import handling – 選擇 「None」
. A. S% Z! i5 F; x  D! \) C, dAdvancedUpdate external files every:輸入 21600: Q+ ?. K$ @' n
Garbage collection interval – 輸入86400, I" ^, f, h$ n! h
餘下選項全部留空並保留默認。
. ?2 J* k" m& }+ a' }# Y0 q8 B  w5 ]' B0 L: v
Advanced Settings – Database Cache設置
8 C6 ]8 D7 q4 j# Y. G w3-total-cache-database2.jpg
) h1 k9 Q/ G& \! A  r3 s( |5 p3 ^+ I# D! `
GeneralDon』t cache queries for logged in users – 勾選啟用3 N+ y5 Q$ }' w5 C. K0 k0 ^
AdvancedMaximum lifetime of cache objects – 輸入 180 seconds
& ^4 C+ h. V) A/ S' ~' YGarbage collection interval – 輸入 3600 seconds# j) s4 }" c6 H% F
Never cache the following pages – 留空
4 N/ f1 p* p/ m; w' WIgnored query stems – 保留默認
$ K* f5 a9 p/ E* E3 K  K/ U% r+ ^1 I. ZReject query words – 保留默認
# w8 p+ \& y+ f
( m3 |; K% R9 NAdvanced Settings – Object Cache3 X. I8 O( ]- B; s' w1 B
w3-total-cache-ObjectCache1.jpg
# x0 q! S0 W: J: @3 {7 o7 r/ f- q; ?; U' Q& Z( g/ Q
Advanced
5 W0 r, i6 \- ^7 e  L  X9 L* }0 ~, BDefault lifetime of cache objects – 輸入 180 seconds
3 }( u/ z, B3 s3 V+ YGarbage collection interval – 輸入 3600 seconds(如果是磁盤存儲模式)0 l- E# E5 S0 s/ t! o$ c& N$ R
Global groups –保留默認
4 ~# x) w5 |1 P; ~3 uNon-persistent groups –保留默認' u$ J! D! u) `+ x7 @

" }) O5 O0 P" YAdvanced Settings – Browser Cache設置+ j, U. |( V* j
w3-total-cache-BrowserCache1.jpg : A+ ~; ?- H% s# ^$ h9 S1 j5 O4 H

4 `* ^! L$ H6 V# S4 C9 y+ |GeneralSet Last-Modified header – 勾選啟用
6 W4 Z4 a: D- e2 n/ ?! D  CSet expires header – 勾選啟用6 M. l4 x/ V( o
Set cache control header – 勾選啟用8 }8 _+ x4 H% {$ t- j' I. O1 A
Set entity tag (eTag) – 勾選啟用2 k" l. |% z2 I* s
Set W3 Total Cache header – 勾選啟用
8 S# o! r% l; |+ X- K0 mEnable HTTP (gzip) compression – 勾選啟用
4 j  ~! ~7 L" O; F2 KPrevent caching of objects after settings change – 留空. p' q0 g1 J' {' ?. `
Prevent caching exception list – 留空
  t' n. k$ D, i5 s% y# CDisable cookies for static files – 留空
$ r- F) }1 m! e4 VDo not process 404 errors for static objects with WordPress – 留空2 n9 w4 p7 t# B7 ^( H; o7 A9 j
404 error exception list – 保留默認值
6 w% x) `3 P' d* ~: [- {0 rCSS & JSSet Last-Modified header – 勾選啟用5 Y. }2 w6 V* r+ l2 T" |2 S
Set expires header – 勾選啟用$ O& C& `7 X5 I# D
Expires header lifetime – 輸入 31536000 seconds% j' ?4 N' `2 _1 Y
Set cache control header – 勾選啟用
* z) g3 x2 \& U: x( HCache Control policy – 選擇 「cache with max-age (「public,  max-age=EXPIRES_SECNDS」)
' @; L/ @9 ?* F( B! C6 USet entity tag (eTag) – 勾選啟用
3 h$ K% G1 L! ?Set W3 Total Cache header – 勾選啟用; p% [- a& ]; {: k. Y6 m, m2 ~
Enable HTTP (gzip) compression – 勾選啟用
. I* Y( t, y9 z. P, tPrevent caching of objects after settings change – 留空
* `5 N& Y% s& O/ EDisable cookies for static files – 留空) `7 l9 o" x4 V) i# X
HTML & XMLSet Last-Modified header – 勾選啟用
% Y, P+ X% S, }( M' f* ZSet expires header – 勾選啟用
$ z5 @6 \: [& t. e7 `Expires header lifetime – 輸入 3200 seconds( j( P; q& f2 c
Set cache control header – 勾選啟用
1 j6 w7 H2 o8 T% X, sCache Control policy – 選擇 「cache with max-age (「public,  max-age=EXPIRES_SECONDS」)
3 e$ C. Q4 R4 `& t1 i& Q% N9 Z$ pSet entity tag (eTag) – 勾選啟用
  u1 z4 M( @7 ]# fSet W3 Total Cache header – 勾選啟用
1 s4 b$ b0 i1 nEnable HTTP (gzip) compression – 勾選啟用
) x  r" i+ S1 d  F5 dMedia & Other FilesSet Last-Modified header – 勾選啟用( {, U/ b9 r4 K* ^$ b% X4 I
Set expires header – 勾選啟用, w/ _; S" |6 E, ~8 P
Expires header lifetime – 輸入 31536000 seconds9 s3 V4 G+ D. y: Z) P
Set cache control header – 勾選啟用
" B  Q) P3 ]" @5 }0 dCache Control policy – 選擇 「cache with max-age (「public,  max-age=EXPIRES_SECONDS」)% q/ J# E# x! Q' ~& J6 V
Set entity tag (eTag) – 勾選啟用. ?7 r9 t; D( ?& {
Set W3 Total Cache header – 勾選啟用5 j* r$ U2 g" ~; k& o, V$ x+ {: J# p
Enable HTTP (gzip) compression – 勾選啟用
& e; F( G0 C, H$ t# E/ h! ]. ]Prevent caching of objects after settings change – 不勾選
: i. j$ O' v# v9 j& ]8 @) ^Disable cookies for static files – 不勾選
* q2 C: Y- h: L其餘選項如果用不到全都不用設置。! r/ c; x' a) C5 ^& ~/ [
& k2 _+ k9 p& Z8 S6 I# L1 j" S

4 ^# Z) F2 H, W; b& `9 z2 E
回復 给力 爆菊

使用道具 舉報

發表於 2014-12-11 20:09:53 | 顯示全部樓層
虛擬主機商,不喜歡這個插件,開大了占資源。- J1 O3 H0 [/ I6 j
回復 给力 爆菊

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 免费注册

本版積分規則

點基

GMT+8, 2025-12-3 09:44

By DZ X3.5

小黑屋

快速回復 返回頂部 返回列表