Академический Документы
Профессиональный Документы
Культура Документы
The extended version of the W3 Total Cache guide is available as a free eBook:
Download the W3 Total Cache Installation and Configuration Guide from Scribd.
Introduction
Installing and configuring the W3 Total Cache -plugin for WordPress is part of a
step-by-step process to optimize WordPress for speed that will make it easier t
o retain readers and keep the site speed on a level that Google appreciates as w
ell.
The initial steps to speed up WordPress are laid out as the WordPress Speed Chal
lenge here at my blog.
Why W3 Total Cache?
With this free guide, you can easily make your WordPress blogs pages load faster
than before and save money on hosting bills as you can stay on shared hosting a
nd still make your blog withstand huge amounts of traffic without compromising t
he performance.
Installing W3 Total Cache is just like installing any other plugin for WordPress
(super simple via the Dashboard). The default options will make W3 Total Cache
handle page caching, which it does similarly, and even a bit better, than the WP
Super Cache.
But with proper configuration, W3 Total Cache does much more, like combining and
minifying (compressing & making smaller) JavaScript and CSS-files, and also cac
he Database queries and make using Content Delivery Network easy (read: automati
c). Because of all this, W3 Total Cache is the best caching plugin for WordPress
.
This guide is meant for WordPress blogs on shared hosting, who can't use more ad
vanced caching solutions like Opcode caching and/or memcache, which are availabl
e on dedicated servers and virtual private servers. With this guide, you can han
dle loads of traffic with a blog on shared hosting, and you can stay on shared h
osting until you can afford to pay for better (if you need it then).
For blogs that do need more powerful hosting solutions, W3 Total Cache is even b
etter. With the advanced options like Database Caching and automated use of Cont
ent Delivery Network, W3 Total Cache is the ultimate caching solution (the "Tota
l" in the plugin name is there for a reason) and this is why huge blogs like Mas
hable use it.
How to Install and Configure W3 Total Cache for WordPress
The first step is to uninstall any other caching plugin you might be using, like
WP Super Cache. We don't need (or even can't have) two caching plugins running,
so you need to uninstall WP Super Cache before you move on.
Installing and configuring W3 Total Cache is a simple step-by-step process... an
d actually since you don't necessarily need to take one of the steps and one you
can skip altogether, it's really 3-7 steps, depending on how you count it :)
How to install W3 Total Cache
Here's the installation in short (as installing any WordPress -plugin):
(Uninstall WP Super Cache, or any other caching plugin you might have installed)
Install W3 Total Cache -plugin: Go to 'Plugins', Click 'Add New', Search for 'W3
Total Cache', click 'Install now' for W3TC, confirm the installation and activa
te the plugin.
If you run into problems with badly coded CSS, try disabling the Comment- and Li
ne break removal. Well coded CSS will still work, bad ones might get into proble
ms.
CSS file management
Theme: The active theme should be chosen, but you can set configurations to all
installed themes here (even for non-active ones, in case you ever activate them)
.
Open another browser window or tab, and open your blog.
Open the page source (right-click, show page source).
Open Find (e.g. CTRL+F or from menu: Edit > Find)
Search for ".css" (without quotes)
Copy the full URL of the first .css-file you find, e.g. http://example.com/wp-co
ntent/themes/yourtheme/style.css (do not copy this URL, you must get it from YOU
R BLOGS page source)
Go back to the window/tab with W3 Total Cache settings and the Minify Setting -p
age, click 'Add a style sheet' under Cascading Style Sheets...
Paste the .css -file URL in, unless the css-file is specific to certain page/tem
plate, choose 'All Templates'. Just in case, click 'Veriry URI' to see that the
URL is correct
Go back to the page source, hit next on the find to locate the next css-file. Co
py the URL to the W3 Total Cache, Verify.
Repeat until you've added all css-files from the page source to W3TC.
Notes: If there is "version number" like "?ver=2.4.1" in the CSS-files URL, remo
ve it.
For example: /styles.css?ver=2.4.1 would go into W3TC as /styles.css - This way,
W3TC will pick up the CSS, even if the plugin/theme updates and the CSS-version
changes.
After you 'Save changes', W3TC might remove part of the URL, this is normal.
Minify Settings - Advanced
Update external files every: 216000 seconds
Garbage collection interval: 216000 seconds
For high traffic sites, lower the Garbage collection to 86400, or just leave it
there by default.
Save Changes.
Minify Settings - JavaScript
TO AVOID PROBLEMS - DO NOT ADD AdSense, Chitika or such advertising code to W3TC
!!!
The process is similar to adding the CSS-files, but the problem is that many plu
gin- and theme-authors are not very good JavaScript coders, so they code can't h
andle minification.
Enabled: Enable (checked)
Disabled: Combine only after <head>
Disabled: Combine only after <body>
Disabled: Combine only before </body>
Enabled: Comment removal
Enabled: Line break removal
Go to your blogs page source, find ".js" files. Add them one by one to W3TC. Aga
in, remove the "?ver=2.4.1" and similar version numbers if you see'em. For perfo
rmance, it's better to Embed JavaScript to the bottom of the page = Embed before
</body> and use the "Non-blocking" -option
Non-blocking can be used if the functionality of that script is not needed when
loading the page, but only after the page is loaded. (In general, interface scri
pts can be non-blocking, and scripts that modify the content usually need to be
"blocking")
If a script doesn't work correctly when embedded to the footer (before </body>),
embed it to the same location you found it, e.g. Embed script located originall
y in the <head>, in <head> = Embed in <head>.
If a script is only used/needed on certain pages, use the Template selector to c
hoose the correct template from your theme, e.g. Page for page.php, Category for
category.php, etc.
Disable 'Comment removal' and 'Line break removal', if you're having problems. A
nd if everything else fails, remove JS-file from W3TC (and seriously consider ge
tting rid of that poorly coded script!!)
Save changes.
Test your site functionality before enabling the HTML minify! If you're on Previ
ew-mode, test your site after 'Deploy' and change configuration if needed.
Change the settings (e.g. Comment-/Line break removal, remove scripts from W3TC,
etc.) if there's problems.
Did you have a lot of CSS- and JavaScript -files to go through? Maybe you're run
ning a few unneeded plugins, widgets and external scripts? Do you really need th
em all? Remember - best performance optimization trick is to remove stuff.
Minify Settings - General
Enable: Rewrite URL structure (checked)
Enable: Automatically upload mofified files (checked)
Minify error notification: Enable this to get error notification if something go
es wrong.
Don't be too scared about the 30+ 45+ pages, it's a simple step-by-step guide, b
ut there are many options with the plugin and I wanted to include clear screensh
ots of the settings to make things easy for you.
Download the PDF version of the W3 Total Cache Guide for free from Scribd: W3 To
tal Cache Installation and Configuration Guide
Updates and Versions
2010-07-12: 1.0 Post published.
2010-08-15: 1.02 Minor updates and corrections.
2010-10-30: 1.1 Total post re-work and update to the PDF guide.
Summary
Installing and configuring W3 Total Cache is a simple 7 5 step process, which yo
u can take right now to speed up your WordPress blog:
(Uninstall WP Super Cache, or any other caching plugin than W3TC, like WP Cache,
WP Minify or such)
(Place the essential rules to your WordPress htaccess)
Install the W3 Total Cache -plugin
(Optional: Check the General Settings, defaults OK, can be skipped)
(Optional: Adjust the Page Cache Settings)
Adjust the Minify Settings
Adjust the Browser Cache Settigs
(No need to touch the Database Cache or Object Cache -settings, the easiest step
!)
Advanced: Configure the CDN settings if you're using one (or skip!)
Download the W3 Total Cache Installation and Configuration Guide from Scribd for
detailed step-by-step instructions.
If you have questions or problems getting W3 Total Cache to work, comment on thi
s post, or if you want me to help you - contact me and tell me what you need.
p.s. I've been told I should be selling my own products, and ask money for eBook
s like this one, instead of putting it out there for free... I don't know about
that, but if all goes as planned, there'll be plenty of opportunities for you to
buy stuff from me at some point, but for now, you'll just have to get it all fo
r free. Sorry.
p.p.s. If you like what I'm doing here, subscribe to this blog via RSS or email
and connect with me on my Facebook -page.
Bookmark and share this post:
Here's more cool posts similar to this one:
How to uninstall WP Super Cache
WordPress htaccess: The Definite Guide
Top 4 WordPress Optimization Steps for Speed
Delivered by FeedBurner
Search this blog
Custom Search
Recent Posts
A blog between something and everything
The Fuzzy Logic of the WordPress (.com) Terms of Service
Why Some People Never Make Money Online
Disqus LOOPHOLE for SPAM Comments in WordPress
WordPress htaccess: The Definite Guide
Install and Configure W3 Total Cache in 7 Easy Steps
How to uninstall WP Super Cache
How to Backup and Optimize the WordPress Database
How to automatically backup and optimize WordPress database
Top 4 WordPress Optimization Steps for Speed
Zem-what? Antti-huh?
Read the about -page
Follow Antti via Twitter (1477 people do too)
Find Antti s Facebook -page
Things to do
Subscribe: RSS / email
Read the good stuff (articles)
Browse the blog (archives)
Write an awesome post (guestposting)
Mmm, free cookies... (resources)
Get out (links)
Browse the site
Best of
Archives
Useful Stuff
Resources
Links
Find me elsewhere
Twitter
Google Buzz
Facebook
FriendFeed
YouTube
Digg
StumbleUpon
HomeAboutContactComment PolicyPrivacyDisclosure
All posts and comments © their original owners. Everything else is © Antti Kokkonen
2009 - 2011. Antti s posts can be reused and republished non-commercially as the
y are licensed under a BY-NC-SA Creative Commons License.