If you have busy site which gets thousands of visitors a day you might be having a hard time managing your server load. If you are using apache it makes it harder. The best decision is moving to nginx or lighttpd. If Im the one who manage the server Ill choose Nginx because its little bit ahead of lighttpd.
- If you are newbie for nginx read my guide for installing nginx with all the necessary packages- http://www.ruchirablog.com/nginxmysqlphpfpm-auto-installer-centos-5-debian/
Nginx beats apache in all aspects. Some people using Nginx as reverse proxy to apache its good solution but all the dynamic php content is handled by apache. This 2010 and most of the sites are dynamic !
- Now lets get to the topic
This is guide for using memcached with wordpress but this guide doesn’t cover how to install memcached ill explain that later! or please search google about installing memcached for your desired linux OS version.
So I’m assuming that you have installed Memcached with PHP memcached module,
- There are 2 popular wordpress plugins for use with memcached!
- WP Memcached Manager http://wordpress.org/extend/plugins/wp-memcached-manager/ ( For viewing memcached data without log in to SSH)
- W3 Total Cache http://wordpress.org/extend/plugins/w3-total-cache/ ( Must need for integration)
“WP Memcached Manager” is not necessary but it can be used to view some useful information about work of your memcached deamon. here is a screenshot of wp memcached manager installed on my blog-
You can install both of those plugins normally just use automatic plugin installer which is built in to wordpress!
And check your memcached deamon is running with wp memcached manager! Its very easy to configure wp memcached manager you just need to enter the ip and the port of your memcached deamon.
So if its running you need to disable any other caching plugins like WP-SuperCache and HyperCache which you used previously.
- Note- WP-Supercache is the best plugin out there for wordpress caching but unfortunately WP-Super cache only provide few options to work with memcached and it will not work correctly for most of the blog which use memcached
Then you need to configure W3-TotalCache to communicate with memcached deamon so w4 total cache will start storing your cached objects in memcached instance instead of disk.
Go to W3 total cache config page and run a compatibility check to ensure all the things are ok.
- W3 Total Cache will detect if you have installed memcached and then you only need to configure the option “Memcached” from check boxes.
So memcached will be used from now to cache your website. You can load your web site and view source to see its work!
Performance comparison Later!
Last 5 posts by Ruchira
- How to setup SSH key based access on Google Compute Engine - May 23rd, 2013
- Google Compute Engine benchmarks - May 23rd, 2013
- OpenVPN Auto installer - May 23rd, 2013
- Change your DSL modems default logins now or get hacked - May 22nd, 2013
- Just another Paypal phishing attempt - May 21st, 2013