Sie sind auf Seite 1von 4

(http://baruchyoussin.

com/en/)
GetPageSpeed100byusingW3Total
CacheandAutoptimize,Part1
PostedonMay5,2015(http://baruchyoussin.com/en/configurew3totalcachepluginsettingsforpagespeed100
gradepart1.html),updatedonApril17,2016(http://baruchyoussin.com/en/configurew3totalcacheplugin
settingsforpagespeed100gradepart1.html)byBaruchYoussin(http://baruchyoussin.com/en/author/byoussin)
Otherparts:
Next:GetPageSpeed100byusingW3TotalCacheandAutoptimize,Part2:GeneralSettings(configure
w3totalcachepluginsettingsforpagespeed100gradepart2general.html)
GetPageSpeed100byusingW3TotalCacheandAutoptimize,Part3:PageCache(configurew3total
cachepluginsettingsforpagespeed100gradepart3pagecache.html)
GetPageSpeed100byusingW3TotalCacheandAutoptimize,Part4:BrowserCache(configurew3total
cachepluginsettingsforpagespeed100gradepart4browsercache.html)
GetPageSpeed100byusingW3TotalCacheandAutoptimize,Part5:Autoptimize,Images,Tips(configure
w3totalcachepluginsettingsforpagespeed100gradepart5autoptimizeimagestips.html)

WhyPageSpeed?
WhenGoogledecideswhichpagestoshowyouinresponsetoyoursearch,oneofthecriteriaisthespeedofyour
site(http://googlewebmastercentral.blogspot.co.il/2010/04/usingsitespeedinwebsearchranking.html).
ItisjustoneofthecriteriathatGoogleuses,andnotthemostimportantone.Nevertheless,itiseasiertoimprove
thanothercriteria.
GooglechangesitsrulesonceinawhilemyrecommendationsarevalidforMarchApril2015.
YoucancheckwhatGooglethinksaboutthespeedofyoursitefromPageSpeedInsights
(https://developers.google.com/speed/pagespeed/insights/)youenterthewebaddressofyourpageandrunthe
toolonit.
Atthetimeofthiswriting(FebruaryApril2015)PageSpeedInsightsgivethispage100almostalways,withthe
exceptionofseldomcaseswhentheresponsetimeofmyserverexceeded0.2secondsrequiredbyPageSpeed
Insightsfor100grade.
PageSpeedgradeisnotidenticalwiththespeedyourpageloads:yourpagemayloadveryquicklybutstillhave
mediocrePageSpeedgradeif,forexample,itrequiresmanyroundtripstotheservertopickupadditionalfiles
whichmaytakelongertimeforuserswhoarefurtheraway.
OneoftherequirementsofPageSpeedisthattheabovethefoldpartofthepagebeloadedquicklyabovethe
foldmeansthepartofthepagethatisdisplayedinitiallybythebrowser,similarlytothetoppartofafolded
newspaper.

Importanceofcaching
ForaWordPresssite,acachingpluginisthefirsttooltoachievehighPageSpeedgrade.
Cachingpluginhelpsintwoways:
1.CachedpageisservedmuchfasterthanapagethatneedstobecreatedbyWordPressengine.
2.Cachingpluginoftenrearrangestheflowofdatafromtheservertothebrowsersothattheabovethefold
partofthepageisloadedfasterandwithlessroundtrips.

WordPresscachingplugin:W3TotalCache
W3TotalCache(https://wordpress.org/plugins/w3totalcache/)isoneofthemostpopularcachingpluginsthat
strivestobeacompleteframework,anditindeedgetsveryclosetothat.
Irecommendusingittogetherwithanotherplugin,Autoptimize(https://wordpress.org/plugins/autoptimize/),that
performsoneofthetasks,Minifying,betterthanW3TotalCache.
W3TotalCachehasplentyofgreatfunctionalitiesbutisshortondocumentationandsupport.Forthesereasonsits
setupisnoteasy.
Igiveheremyrecommendationsandexplanationshowtoconfigurebothplugins.Theserecommendationsand
screenshotsrefertoW3TotalCacheversion0.9.4.1and(updatedApril17,2016)Autoptimizeversion2.0.1.
TherearemanyguideshowtoconfugureW3TotalCachepluginhowever,Ihaddifficultieswithmostoftheadvice
Ihavefoundonthenet,andmysetupdiffersfromallIhaveread.ApparentlythereasonsarethatGooglePageSpeed
requirementschange,theW3TotalCachepluginchangeswithtime,andthesettingsthatworkedfineearlier,arenolongergood.

SinceIhavefiguredouthowtoconfigurethisplugin,myPageSpeedgradesarealmostalways100,mypagesare
servedlightningfast(usuallyunder0.2secforhtmltoproducetheabovethefoldpartandsatisfyPageSpeed,and
about0.5secforthefullpage),andmyserverloadwentwaydownasreportedbymyserverprovider.

InstallingW3TotalCache
Backupyoursite
Cachingpluginsoftenpoorlyinteractwithotherplugins,andthisisespeciallytrueforW3TotalCache.Itsreviews
(https://wordpress.org/support/view/pluginreviews/w3totalcache)haveplentyofcomplaintsaboutwebsitesbeing
brokenwhenW3TotalCachewasinstalled,andIthinkthatmostlythisiscausedbypoorinteractionwithother
plugins.Withoutfullyunderstandingthecodeoneusuallycannotknowwhathappenedorwhichoneofthe
conflictingpluginsistoblameifatall.
Forthisreason,backupyoursitebeforeyoustart.Itisevenbettertotrythisplugin(asanyotherplugin)firstona
nonlivecopyofyoursitetoseeifitbreaksanything.(Ikeepacopyofmysiteonmyhomecomputeraslocalhost
andtryallsignificantchangestherebeforeIpropagatethemtomylivesite.)
Onecaseofsuchpoorinteractionislistedbelow.
IthinkthatMinifyfacilityofW3TotalCachehasmorepoorinteractionsthanPageCacheandBrowserCache,and
mysuggestiontoreplaceMinifywithAutoptimizemayhelpremovemanytroubles.

Filepermissions

Theinstallationdirections(https://wordpress.org/plugins/w3totalcache/installation/)startwiththefollowing:

Deactivateanduninstallanyothercachingpluginyoumaybeusing.Payspecial
attentionifyouhavecustomizedtherewriterulesforfancypermalinks,havepreviously
installedacachingpluginorhaveanybrowsercachingrulesasW3TCwillautomate
managementofallbestpractices.
Thisisquiteunderstandable.However,thenextpartisunusualforaWordPressplugin:

Alsomakesurewpcontent/andwpcontent/uploads/(temporarily)have777
permissionsbeforeproceeding,e.g.intheterminal:
#chmod777/var/www/vhosts/domain.com/httpdocs/wpcontent/
usingyourwebhostingcontrolpaneloryourFTP/SSHaccount.
AfterfindingandinstallingW3TotalCacheplugininausualway,restorethepermissions:

Setthepermissionsofwpcontentandwpcontent/uploadsbackto755,e.g.inthe
terminal:
#chmod755/var/www/vhosts/domain.com/httpdocs/wpcontent/
Idonotunderstandthereasonbehindthesesneakydirectionsbutrecommendfollowingthem.(Infact,Ididnotnotice
thesedirectionswhenIfirstinstalledW3TotalCache,anditmalfunctioned.Iuninstalledtheplugincompletelyandinstalleditagain
followingallthedirectionsincludingtheseones,anditworkedfine.However,Iamnotcertainthatthesedirectorypermissionswereto
blame.)

ConflictwithWordPressHTTPS(SSL)plugin
WordPressHTTPS(SSL)plugin(https://wordpress.org/plugins/wordpresshttps/)canbeusedtosetupsecure
(SSL)accesstotheadminareasofyoursiteevenifyourunitonsharedhostingwithouthavingadedicatedIPand
yourownSSLcertificate.ThetrickistousetheserversIPandcertificate,andaccessyouradminareanotthrough
yoursiteaddressbutratherthroughyourserveraddress.Thedetaileddirectionscanbefoundhere.
(https://wordpress.org/support/topic/secureadminaccessonsharedhosting)
Unfortunately,thesedirectionsdonotworkwithW3TotalCachepluginwhichgetsconfusedbythedifferentpaths.
Navigation:
Next:GetPageSpeed100byusingW3TotalCacheandAutoptimize,Part2:GeneralSettings(configure
w3totalcachepluginsettingsforpagespeed100gradepart2general.html)
GetPageSpeed100byusingW3TotalCacheandAutoptimize,Part3:PageCache(configurew3total
cachepluginsettingsforpagespeed100gradepart3pagecache.html)
GetPageSpeed100byusingW3TotalCacheandAutoptimize,Part4:BrowserCache(configurew3total
cachepluginsettingsforpagespeed100gradepart4browsercache.html)
GetPageSpeed100byusingW3TotalCacheandAutoptimize,Part5:Autoptimize,Images,Tips(configure
w3totalcachepluginsettingsforpagespeed100gradepart5autoptimizeimagestips.html)

Bookmarkthepermalink(http://baruchyoussin.com/en/configurew3totalcachepluginsettingsforpagespeed
100gradepart1.html).

BaruchYoussinhome(/)

Search

Likethispost?
Putalinktoitonyoursite/blog/FB,togetherwithanexplanation.
Suchlinks(calledcontextlinks,linksfromrelevantcontext)willhelppeoplefindthispostdirectlyinaddition,suchlinkswillalsohelp
finditthroughsearchessincesearchenginescountcontextlinkstodecidewhichpagestoshowfirst.

1WhyPageSpeed?
2Importanceofcaching
3Wordpresscachingplugin:W3TotalCache
4InstallingW3TotalCache
4.1Backupyoursite
4.2Filepermissions
4.3ConflictwithWordPressHTTPS(SSL)plugin

BaruchYoussin2015PrivacyPolicy(/en/privacypolicy)Disclosure(/en/disclosure)Contactme
(/en/contactform)Sitemap(/en/sitemap)

Das könnte Ihnen auch gefallen