<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>[blog.rayfoo] &#187; memcached</title>
	<atom:link href="http://blog.rayfoo.info/tag/memcached/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.rayfoo.info</link>
	<description>Infosec, DFIR, tech geekery, thoughts and whatnot</description>
	<lastBuildDate>Wed, 25 Jan 2012 00:36:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Getting WordPress to work with memcached</title>
		<link>http://blog.rayfoo.info/2009/08/getting-wordpress-to-work-with-memcached</link>
		<comments>http://blog.rayfoo.info/2009/08/getting-wordpress-to-work-with-memcached#comments</comments>
		<pubDate>Sat, 22 Aug 2009 17:15:50 +0000</pubDate>
		<dc:creator>ray</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.rayfoo.info/?p=9</guid>
		<description><![CDATA[Wordpress can work with memcached as a cache, here's how to do it.]]></description>
			<content:encoded><![CDATA[<p>WordPress can work with memcached as a cache, and there are <a href="http://www.google.com/search?q=wordpress+memcached" target="_blank">plenty</a> of places to find instructions on how to do that.</p>
<p>I referred to <a href="http://ryan.wordpress.com/2005/12/23/memcached-backend/" target="_blank">Ryan</a>'s and <a href="http://mohanjith.net/blog/2008/10/using-memcached-with-wordpress-object-cache.html" target="_blank">Mohanjith</a>'s blog posts that detail this, and after some tweaks to get it up working with the most recent version of WordPress on PHP5, I've decided to write some instructions that are a little more recent <img src='http://blog.rayfoo.info/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><span id="more-9"></span></p>
<h1>1. Install WordPress and memcached. (duh)</h1>
<p>Google for instructions on how to do that for your relevant distros, but I won't be covering that here.  I assume that your memcached server is listening on 127.0.0.1:11211.</p>
<h1>2. Copy object-cache.php into wp-content folder.</h1>
<p>I've mirrored Mohanjith's modified version <a href="http://blog.rayfoo.info/wp-content/uploads/2009/08/object-cache.txt">here</a>.  Do remember to rename it to object-cache.php, and make it readable by the PHP user account.</p>
<h1>3. Edit your wp-config.php file.</h1>
<p>Add these lines in:</p>
<p><code>global $memcached_servers;<br />
$memcached_servers = array('default' =&gt; array('127.0.0.1:11211'));<br />
global $blog_id;<br />
$blog_id = 'some_unique_identifier';</code></p>
<p>If you have different WordPress blogs using the same memcached cache, $blog_id MUST be unique across different blogs.  Else you can just leave it as it is <img src='http://blog.rayfoo.info/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h1>4. Enjoy the speedup.</h1>
<p>There you're done!  You can verify that WordPress is using the memcached cache by issuing the "stats" command to memcached, which I probably will write how to in another post.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rayfoo.info/2009/08/getting-wordpress-to-work-with-memcached/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

