wordpress css/js combining - Printable Version
+- WebPagetest Forums (http://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Optimization Discussions (/forumdisplay.php?fid=5)
+--- Thread: wordpress css/js combining (/showthread.php?tid=211)
wordpress css/js combining - ravetildon - 04-22-2010 05:27 PM
Does anyone happen to know how to combine css and js files in wordpress? I have quite a few plugins installed and it's turning my site into a js and css file mess.
Think I have like 30 js files!
1. Is there a plugin that's pretty good?
2. Anyone happen to know how to manually code it. I'm not sure how to combine the files because the plugins somehow hook into the js/css files themselves...
I heard about this plugin:
But lots of people say it breaks their site...
RE: wordpress css/js combining - pmeenan - 04-22-2010 10:32 PM
Try W3 Total cache: http://www.w3-edge.com/wordpress-plugins/w3-total-cache/
Had someone here try it earlier with pretty good success: http://www.webpagetest.org/forums/showthread.php?tid=187
Should take care of caching and combining. haven't heard of any issues with it breaking pages but probably worth reading through the comments.
RE: wordpress css/js combining - ravetildon - 04-23-2010 03:50 AM
Coo, do you know if/how the caching works differently in w3 vs wp super cache? Will one caching work better? I currently use wp super cache and I know it performs well with high traffic...
Also was reading that w3 supports accelerators like memcache & APC. How well od those work helping to speed up wordpress typically and why would you choose on eoption over the other on a wordpress site?
Is caching on disk or in memory better and how do you decide which is best? I was reading something about if your on shared hosting your disks may not be fast enough. How do you test for this?
RE: wordpress css/js combining - pmeenan - 04-23-2010 10:48 AM
Unless you're talking about an EXTREMELY popular site with a multi-server dedicated deployment (or one with a lot of per-user custom data) the differences aren't going to be measurable. Once you get rid of the dozens of database calls by caching the pages (at least unauthenticated pages) the difference between a disk or memory cache will be on the order of milliseconds at best.
The different accelerators optimize different parts of the code. APC makes the actual php code run faster, allowing you to handle higher traffic volumes on equivalent hardware. Memcache is usually used to cache database queries but you can technically put anything you want into it and use it as an in-memory cache.
For testing disk response you could run a bunch of tests requesting a static file directly from the server and see how it responds and compare it to something that returns a 200 directly. You could also instrument your code and run some i/o benchmarks. I'd be surprised if that was a common bottleneck though unless it's a low quality hosting provider - most keep an eye on that kind of thing. Usually the problem is poorly written applications (like, for example, wordpress out-of-the-box).