You are reading

WordPress + Memcached = Awesome

Posted: July 19, 2009 | By: TJ | In Technology | No comments yet

If you’re already running memcached and using WordPress, you can provide an object cache directive to help speed things up. All you need to do is place this object-cache.php script in the /wp-content directory (not the plugins folder). Then add the following to the wp-config.php:

/** Memcached Support */
global $memcached_servers;
$memcached_servers = array('default' => array('127.0.0.1:11211'));

If memcached is running on another port besides 11211, make sure to change the port value in the memcached_servers line. You can verify that caching is taking place by tailing the memcached log:

$ tail -f /var/log/memcached.log

You should see some pretty verbose output in the log. For the more documentation, check out the SVN branch.

Comments for this entry

Ron

hi, thanks for this great info! i’m using all in one seo ver. 1.7- which lines should i comment out on this version?

thanks for your help!

Leave your comment



Copyright © 2010. All rights reserved.

This blog is powered by WordPress and proudly hosted by (mt) Media Temple.