Ultimate Wordpress Site Speed - Install WP-Cache2 AND APC At The Same Time
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
Bookmark & Share
Related Posts
- How To Fix WP-Cache And Spam Karma 2 (SK2) Issues
- Wordpress Plugins NOT To Install
- Guide To Optimizing WordPress Servers
- WordPress Optimisation: Control When Plugins Are Loaded
- I Need Wordpress MySQL Help, And I’m Willing To Pay
- Reduce Bandwidth Costs - Use Coralize to Cache Your Pages
- Speedup WordPress Page Loading Times With PHPSpeedy



Pingback by The Stumble Effect & How to Digg/Stumble Proof Your Site Version 2.0 | Anthony Jude Lawrence Dot Com on 12 October 2007:
[...] 5. Install APC - Quoting Connectedinternet…. [...]
Comment by Quix0r on 28 April 2007:
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
Comment by Ahmed Bilal on 25 April 2007:
Ya know, a more detailed tutorial will get you a big digg on this