Ultimate Wordpress Site Speed – Install WP-Cache2 AND APC At The Same Time
Everton | Nov 05, 2006 | Comments 8
I’ve just tweaked my server and finally managed to get WP-Cache2 AND APC (Alternative PHP Cache) to work together at the same time on my WordPress blog. The difference this has made to my page loading speeds is absolutely amazing, and it’s only going to get better as the cache increases in size. For those of you who are regular readers you will notice straight away how much faster my pages are, despite the number of plugins I now have installed. The only thing slowing my pages down now, is the time it takes to pull in the external ads etc.
Most Wordpress users are familar with WP-Cache2, but fewer are familiar with APC. WP-Cache2 stores the HTML of a page for a user-defined period, which can cause problems if new comments or posts are made within this period i.e. if the page changes.
APC doesn’t suffer from this problem, as it speeds up loading times by caching compiled WordPress PHP files so that the loading time the next time a page is loaded, is much faster regardless of whether the page has changed.
Getting both caches to work together used to be impossible, but if you follow the steps below then you too can have fast loading pages that benefit from both types of caching, reducing your server straing and potentially saving you cash in the long run.
1. Install (Alternative PHP Cache) PC on your server
Installing APC is a doddle, if you know your way around your server. If you’re not comfortable doing this yourself, Matthew will do it for around £30. If you already have WP-Cache2 running I’d disable it until Stage 3.
Download: APC
2. Tweak APC configuration
This is the clever bit that Mark Jaquith came up with, which is actually quite simple in the end. To get APC to work with WP-Cache2 make the following changes:
In php.ini in the [apc] section, set ‘apc.filters = wp-cache-config’ to exclude wp-cache-config.php and wp-cache-config-sample.php from being cached by APC
3. Install WP-Cache2
If you haven’t already done this, then download the plugin here and upload it to your server. Then activate it and configure it on the Options page.
Hope you found this useful and that this guide worked for you as well. Don’t forget to let me know how you get on and whether these tweaks helped to keep your site alive the next time you get ‘Dugg’!
Read more about APC, Wordpress and Caches: Asymptomatic
Related Posts
- How To Enable Gzip With WP-Cache2
- Wordpress Plugins NOT To Install
- Guide To Optimizing WordPress Servers
- Optimise Your CSS File
- WordPress Optimisation: Control When Plugins Are Loaded
- I Need Wordpress MySQL Help, And I’m Willing To Pay
- How To Fix WP-Cache And Spam Karma 2 (SK2) Issues
Filed Under: Tools & Tips
Bookmark & Share
About the Author: Everton is based in London and has worked in the internet and mobile space for over ten years now, and before that worked in corporate strategy and consulting. He has a degree in Economics from Cambridge University, and currently runs the Portal and online operations for one of the largest ISPs in the UK.
He also writes for Windows 8 News, Windows 8 News and One Tip A Day.
Comments (8)
Trackbacks/Pingbacks
- 我爱wordpress » 四个没必è¦Â安装的wordpressæÂ’ä»¶
- How To Fix WP-Cache And Spam Karma 2 (SK2) Issues » Connected Internet
- How To Fix WP-Cache And Spam Karma 2 (SK2) Issues | Connected Internet
- Optimise Your CSS File | Connected Internet
- The Stumble Effect & How to Digg/Stumble Proof Your Site Version 2.0 | Anthony Jude Lawrence Dot Com
- Brève Wordpress: 40 liens, thèmes, plugins et astuces en tout genre !
- 34 tutoriels sur WordPress (astuces, hacks...) | Jean-Baptiste - Blog perso, Actualités, High-Tech, WordPress, Webdesign





Next time you get “dugg”
Yeah, it is noticeably faster isn’t it. Actually on this server it wasn’t entirely straightforward to install APC, since I had to compile from source… on Debian, Ubuntu, and other apt-based distros it’s much easier. Glad to be able to help :-)
Awesome. I just migrated a site and have been beating my head against a wall trying to figure out why WP-Cache craps out when I enable it on a new server running APC. Rock!
Did it work Paul? Also look at this fix if you use WP-Cache with sk2
APC is pretty cool.Bu ti am not sure how to use it.Should i ask my hosting or anybody can do it.
if you ask your host nicely they will probably install it for you
Ya know, a more detailed tutorial will get you a big digg on this :)
I had this problem here:
Well, I have solved it and just want to show it to you: (you may need to alter some paths!)
cd /tmp/pear/cache/APC-3.0.14/
./configure --with-apxs # (please read the INSTALL file why I use this here)
make all install
Now you need to add some entries as described in the INSTALL file to your php.ini(s).
Greetings,
Q