Optimize WordPress in another 4 stepswordpress
I just moved out from Globat to a new place, Jumpline. It is a good time to clean the house, and throw out all trashes.
Enable WP-Cache + GZIP
Although the official WP-Cache suggests to disable GZIP support, there are some hacks(1, 2) to enable it. That is quite neat.
After this optimization, the total size of front page is 247.6K, 85.1K
prototype.js takes 71.2K. We should
take some actions for it.
For normal users, the big bottleneck is the size of prototype.js, and it is most unlikely change unless major version update. So let’s gzip it first and check out the performance boost: Using Dojo ShrinkSafe, the prototype.js is cut to 49K, not bad.
Thanks to the flexibility of VDS powered by Jumpline, I could easily add
mod_deflate to Apache, and enable mod_deflate globally to all CSS and
doc for details.
This helps me to save tens of kilobytes, now the gzipped-shrunk protoype.js is 14.6K only, the overall improvement is gzipped 30.2K versus original 142.0K, that is quite impressive.
Use client-side cache
mod_expires just did the right work, load the module and enable it wherever the content would not change:
ExpiresActive On ExpiresDefault A2592000
Use these directive to disable ETag globally in
Header unset ETag FileETag None
I get B(87) with cache, A(95) without cache in YSlow performance score. The next step optimization may introduce CDN service, for example, Amazon S3.