过期域名预定抢注

 找回密碼
 免费注册

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

[複製鏈接]
發表於 2014-12-11 18:19:36 | 顯示全部樓層 |閱讀模式
一直覺得自己的網站速度很慢,換了幾個空間都不理想。(由於還沒開始盈利,買不起太好的。)最近才知道,基本wp的網站都使用WP SUPER CACHE或者W3 TOTAL CACHE來提升速度。據說W3 TOTAL CACHE效果更好,所以就選擇了這個插件,廢話不多說了,直接上圖,這是在http://www.webpagetest.org/ 測試的結果。
/ `2 U, x; D8 ^使用前: 使用前.jpg , _: D; c3 ^. U3 a" @$ n2 p

  y% t2 D% o( U/ i使用後: 使用后.jpg
8 y7 V6 V5 F, f& R; @7 ^可以看到First Byte響應時間明顯減少。但是從First Byte到Start Render的時間並沒有減少。我想請教Start Render和什麼有關?有什麼辦法縮短嗎?另外Keep-alive如何開啟?我這個評測不怎麼高。。 测试.jpg
$ `0 n4 k$ t$ L" ^( P
, b  W9 D) Z" f. r. N5 P
回復

使用道具 舉報

 樓主| 發表於 2014-12-11 18:52:39 | 顯示全部樓層
附學啦網的設置教程,不過網站已經打不開了。。幸好我保存了:% G8 P+ B6 k4 v4 h' t! u
0 b6 }2 [6 i; v6 u
相信很多人下載之後不太會設置這款非常好用的wordpress緩存插件,這次就給大家介紹下這款插件的設置方法,也是經過實踐的結果。史上最全的w3 total  cache設置教程。我配置選項如下:
' e: N; W- V  @$ T
+ s6 l! c. _  P$ U- I$ |# oGeneral Settings
; b; H' f) w3 R) l( r w3-total-cache-1.jpg " o+ r* }2 v- C( |6 C  h2 ?
# c7 b$ C- s; H9 A; |! }
Page Cache設置Page cache – 勾選啟用.
2 B# N* H/ Y0 C" D* o& g0 MPage cache method – 一般選擇 「Disk:  Enhanced」如果VPS memcache緩存開啟的話,選擇memcache應該是不錯的。
- F% p( }8 C" l# I2 }1 f. a' y# Z1 L3 L% O' q
Minify設置! w+ v' F4 d/ W5 [) c  P& Y
w3-total-cache-minify1.jpg 0 b  G( A% m# C/ T6 V6 V
/ b6 O! p( X! }" h9 u# G
Minify – 勾選啟用。( m% j+ K' h! n, `+ {
Minify mode – 選擇「Manual」模式。
, |# _! `# d/ ~8 `3 E, ]Minify cache method –  選擇「xcache」緩存方式,如果你的VPS支持APC、memcache、xcache等PHP緩存加速器,那麼你可以嘗試選擇這些加速器。
3 Q6 P# o5 p) H7 F: B- W+ I9 KHTML minifier – 選擇「Default」。6 V3 X* T& \4 E4 b* P( Z# v3 b* u
JS minifier – 選擇「JSMin (default)」' J* Z+ R+ b! G# Y/ ^
CSS minifier – 選擇「Default」0 x9 r6 R4 c2 Y0 ?

0 |; B# N& ]" S6 @. nDatabase Cache設置, {) U$ h* D9 A( f
w3-total-cache-database.jpg : i0 I7 d* [1 H6 Q
1 g2 k3 h4 q& d! ]
Database Cache – 勾選啟用。
$ @* ^8 ]' b3 j) L; e. o0 H3 VDatabase Cache Method – 選擇適合你的PHP加速器,這裡我選擇「XCache」。
  o' p: E' q1 Q% x8 ^# }; r) y9 r
Object Cache設置+ P3 |; n( `5 u1 d
w3-total-cache-ObjectCache.jpg
) Z. o8 T) i7 L" h+ n3 M3 n. U. T2 F# f% u8 u3 [. U
Object Cache – 勾選啟用。
6 x0 z, @5 f, [! q% m+ gObject Cache Method – 選擇適合你的一種加速器模式,同上,這裡選「XCache」。
, r% ?1 P# A" q* `
$ ?' H+ \$ {% M# ^$ F5 bBrowser Cache設置
# W/ z' ]) g" U9 u* s3 W w3-total-cache-BrowserCache.jpg 3 Y- W; M8 W4 z, I" @# Y8 F( Y
Browser Cache – 勾選啟用。5 t2 t4 `% q, A
CDN – 略過,不用設置。
0 Z. g6 _6 A) ^7 nReverse Proxy – 略過,不用設置。; {( V/ y5 U: F2 r8 S
Monitoring – 略過,不用設置。# h6 k* k. m4 `8 @
Licensing – 略過,不用設置。
' B# D) X$ U- N  J' t# {) T& [miscellaneous – 略過,不用設置。
4 O" o; p5 D  \Debug – 略過,不用設置。只需在開啟緩存加速器時測試時開啟使用。7 I: b5 w" a$ x1 f, _% X
Import / Export Settings – 參數設置導入及導出功能。3 ~  ]+ |6 o' r3 d7 h
5 e1 K: S5 p0 l- A2 P
/ ?6 ]/ Z6 b9 P- D) ?9 H1 P
Advanced Settings – Page Cache設置+ }; x' `8 M: p2 g/ e' G6 Y
w3-total-cache-PageCache.jpg
) W+ h$ D# Z6 F0 j3 \2 ]% c0 B- j  E4 ]9 L# v
General
" }5 k  f1 n4 hCache front page – 勾選開啟
, z  i7 S6 b4 ]* ^- @5 QCache feeds – 勾選開啟
# Q: o2 E0 U( [! BCache SSL (https) requests – 不勾選(如果你的網站使用SSL可以勾選開啟)- ~- o. s+ f) k0 n4 w; I
Cache URIs with query string variables – 勾選開啟: Q: \" ^1 e) J* u+ v( p
Cache 404 (not found) pages – 不勾選
$ T' t8 O, U# [( Q" ]2 oCache requests only for  site address – 勾選開啟
/ L- p7 f8 j9 H9 ?+ `* F$ gDon』t cache pages for logged in users – 勾選開啟3 ?# A4 M0 S7 k0 Q
Don』t cache pages for following user roles – 不勾選
$ n5 O  e% ~7 P5 O/ z: \. I, B$ p+ H3 V. u% V
Cache Preload* G% _% [/ Z- d' S. h
Automatically prime the page cache – 勾選開啟
3 r/ R& v( t' DUpdate interval – 輸入 10004 {4 E# d7 ~( }' v; Z* k# F, I
Pages per interval – 輸入 15
8 M4 |, @$ L3 q8 x+ o$ J/ HSitemap URL – 輸入網站地圖路徑(/sitemap.xml)
" K7 @) ?% U! J5 L4 kPreload the post cache upon publish events. – 勾選開啟
5 v$ Z. T" U& t$ V
- h3 ~  j3 z+ u0 v5 V% C( PPurge Policy: Page Cache
  Y+ `1 j9 q; l/ D, cSpecify the pages and feeds to purge when posts are created, edited, or  comments posted – 勾選開啟( Front Page, Posts, page, Post page, Blog feed)+ B+ z8 P* ?. N* b) |7 ~6 D
Specify the feed types to purge – 勾選開啟 rss2 (default)
: O" l0 K1 x+ G0 ~1 n& mPurge Limit: 輸入 15* I- A6 y3 B; Q; ]" C/ i
Additional pages: 略過不設置+ S% J4 N$ F( O. u2 T0 i
Purge sitemaps:略過不設置
/ P8 G2 E  I+ f2 }
  f( z4 H6 K  I. B: ?3 |: S, q9 nAdvanced& J& y4 }; ~; v! t
Late initialization:勾選開啟2 v# a1 m/ d4 E' ]3 Q% J
其餘所有選項默認。  I- ^( \" u- L8 `0 C: M1 b
, Y* @. D9 s2 w6 |' H; K
Advanced Settings – Minify設置% W# N0 l5 f% p8 D/ l9 N2 Y
w3-total-cache-ADminify.jpg / B) `) U( b" V. f

$ ?+ G$ }. t1 k; c1 x# t+ vGeneral# L% C& c# j# ]# }- R
Rewrite URL structure – 不勾選4 }6 h7 v9 G$ P( `% e; o1 L
Disable minify for logged in users – 不勾選4 W! h0 T4 [) ^2 ]
Minify error notification:不開啟 (Disabled )- p9 y' b! `. [1 B! C9 X" V. h
HTML & XMLHTML minify  settings - 如果可能啟用(如果可用盡量開啟,由於我開啟後測試發現模板有問題,此選項及以下選項均未開啟。)
4 K( n0 @5 Z: r9 ^8 J: i. ~Inline CSS minification –取消選中
3 s9 ~. P! U6 ~# U) l/ n; ]# |: |- |Inline JS minification – 取消選中
0 [, {" r& @: ~Don』t minify feeds – 取消選中9 }, x, h4 k2 b6 l# C
Line Break Removal – 取消選中
) n! G1 f6 p/ s2 qJSJS minify settings – 勾選啟用(啟用此選項需要密切關注網頁是否有錯位及其它不兼容現象發生)
1 I2 T, W' E8 B$ uOperations in areas – 全部選擇 Minify, 和 Embed Type 「Default (blocking」。
8 A8 K8 q; a3 R% ^Preserved comment removal –選中開啟: c$ u3 k; S" a
Line break removal – 選中開啟(由於開啟此項我網站網頁出現問題,遂未開啟此項)
5 D) u% i0 t7 a# X2 _! z% a8 l8 RCSSCSS minify settings – 選中開啟(開啟此項也需密切關注網頁是否有問題發生)
7 d; M5 f. n0 z* j7 RCombine only – 取消選中) M" R. \  a) a& `0 K, J  n2 b  w
Preserved comment removal (not applied when combine only is active) –勾選開啟
) D/ a& M. S1 K: Y! i# L; sLine break removal (not applied when combine only is active) – 勾選開啟
, v+ |. u$ G8 ~$ D$ E@import handling – 選擇 「None」
% [6 g) M3 C. d* CAdvancedUpdate external files every:輸入 21600* q1 e) @: y  e4 ]
Garbage collection interval – 輸入86400
9 c0 ]$ G/ F" a  m; p' E餘下選項全部留空並保留默認。
+ [! E. g  M) e, X, K& J6 I' C2 M2 m# C# P) s
Advanced Settings – Database Cache設置- E' r( o$ z4 v
w3-total-cache-database2.jpg
# }; e" I7 g$ R, f* L
  g  f) f/ C8 R5 ?GeneralDon』t cache queries for logged in users – 勾選啟用* _+ ~. L! b1 T7 l, ?
AdvancedMaximum lifetime of cache objects – 輸入 180 seconds
# g6 z$ _6 c  ?Garbage collection interval – 輸入 3600 seconds% e$ j! L! u" X7 R
Never cache the following pages – 留空
  T8 w0 O, [3 s* e. vIgnored query stems – 保留默認; f7 k0 t7 \; R8 n; x% z
Reject query words – 保留默認) }" o. @4 Q/ [5 y& {1 T- z

4 V4 K1 {5 A) ]Advanced Settings – Object Cache3 }7 T( P! r$ M; ^
w3-total-cache-ObjectCache1.jpg 6 n) w( b" w8 d" \

' d% l  X8 y) H) U/ DAdvanced; ^) P- ~- U! [
Default lifetime of cache objects – 輸入 180 seconds( w5 G, a- z; |& C9 H5 D) a
Garbage collection interval – 輸入 3600 seconds(如果是磁盤存儲模式)
9 ^4 x' B4 e4 @/ R& U* e& \8 ~Global groups –保留默認" b3 T- Y7 c6 I: f
Non-persistent groups –保留默認8 ~2 Q8 N4 S1 V& m2 k
3 A3 b! ]1 v2 q. r% ^5 U
Advanced Settings – Browser Cache設置2 c  S+ a! g6 L( {1 j& c$ X
w3-total-cache-BrowserCache1.jpg
- x7 H/ }# @. d! p' @* T: _/ D) d: K3 j. Y6 G
GeneralSet Last-Modified header – 勾選啟用+ T. U$ Y3 h- V
Set expires header – 勾選啟用/ W7 O- K6 F7 `
Set cache control header – 勾選啟用2 \" V& R0 r+ f
Set entity tag (eTag) – 勾選啟用
! g3 }* J1 k/ E# p4 R+ RSet W3 Total Cache header – 勾選啟用
! w% S0 P) b- N' LEnable HTTP (gzip) compression – 勾選啟用
: A# p; j$ ]& p  C: U  `Prevent caching of objects after settings change – 留空
/ P7 u: \1 H4 {Prevent caching exception list – 留空
3 d- s$ t; {5 z1 E: IDisable cookies for static files – 留空
6 {# D9 x2 x$ n4 x. PDo not process 404 errors for static objects with WordPress – 留空
+ M  w1 D) X% W& n3 J404 error exception list – 保留默認值* T  g# y/ _0 y, [3 [
CSS & JSSet Last-Modified header – 勾選啟用
, p3 o+ T, O2 y8 l- ?/ hSet expires header – 勾選啟用
- |! J1 g, G* ?. h" Y6 g2 E& FExpires header lifetime – 輸入 31536000 seconds; x  D9 `) {" J2 I3 m3 A8 B! f. `
Set cache control header – 勾選啟用" n) _: |, a/ p+ N/ K
Cache Control policy – 選擇 「cache with max-age (「public,  max-age=EXPIRES_SECNDS」)  O* S$ z1 o4 Y+ P9 I
Set entity tag (eTag) – 勾選啟用3 Z+ t' f; u! W, K# i$ c; t
Set W3 Total Cache header – 勾選啟用* T& b  h9 u7 ?
Enable HTTP (gzip) compression – 勾選啟用
: r' X7 T1 P" ]$ g! \Prevent caching of objects after settings change – 留空
* a# K/ _& {! f# vDisable cookies for static files – 留空& \9 [1 @( u0 k) u; E# f( R/ A/ k$ ?
HTML & XMLSet Last-Modified header – 勾選啟用
' T! o; H' K" |4 H" c+ TSet expires header – 勾選啟用
: i3 M; I. i1 ~& s% C1 M5 oExpires header lifetime – 輸入 3200 seconds
  g: p# v1 A$ A( @/ C' e, NSet cache control header – 勾選啟用
& X5 B! K3 L6 d0 g+ ECache Control policy – 選擇 「cache with max-age (「public,  max-age=EXPIRES_SECONDS」)- d% e/ I- D% ^: S
Set entity tag (eTag) – 勾選啟用
! R1 }- T. M/ R! l% }7 ^( G* TSet W3 Total Cache header – 勾選啟用. `, d! u  Z. U9 j6 X1 n4 a5 b
Enable HTTP (gzip) compression – 勾選啟用
! L" E+ b1 O- B. q& sMedia & Other FilesSet Last-Modified header – 勾選啟用  o! M( U% v1 J6 c8 x1 e: r
Set expires header – 勾選啟用' E# |/ V% ^3 i; a$ \* H) }2 U" v
Expires header lifetime – 輸入 31536000 seconds
9 g7 k# Z$ O- W3 g; ~* \$ P. USet cache control header – 勾選啟用& ]! I4 G' r; S5 g4 b1 A/ S
Cache Control policy – 選擇 「cache with max-age (「public,  max-age=EXPIRES_SECONDS」)
- U- D, d% `/ f. M6 PSet entity tag (eTag) – 勾選啟用
1 E$ L' r. |9 P: GSet W3 Total Cache header – 勾選啟用
# M5 X2 M9 x- T7 k7 R+ \6 OEnable HTTP (gzip) compression – 勾選啟用9 V' i2 Z4 @. C; {( v! \
Prevent caching of objects after settings change – 不勾選4 Z; `4 ^" x0 z& ^# X
Disable cookies for static files – 不勾選5 |9 Q- [- ~# t' t& i7 [" B8 _
其餘選項如果用不到全都不用設置。
% r9 @! b3 e9 F# h, ~" N- e9 h7 I( H6 K6 h4 C; E

% V) S' s  o, l* y; M* f0 q
回復 给力 爆菊

使用道具 舉報

發表於 2014-12-11 20:09:53 | 顯示全部樓層
虛擬主機商,不喜歡這個插件,開大了占資源。  L8 x( x0 \- c
回復 给力 爆菊

使用道具 舉報

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

本版積分規則

點基跨境 數位編輯創業論壇

GMT+8, 2025-2-20 11:58

By DZ X3.5

小黑屋

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