[Mediawiki-l] Adding memcached to an existing installation

Rob Church robchur at gmail.com
Mon Jan 1 09:53:31 UTC 2007

On 01/01/07, Chris Smeder <smeder.c at gmail.com> wrote:
> I had the same question, Brion said:
> "You shouldn't do anything; the primary benefit of turck mmcache and
> other PHP opcode caches is caching the compiled PHP scripts, which
> requires no configuration in MediaWiki."

memcached is *not* the same as Turck MMCache, eAccelerator or APC.

To instruct an existing MediaWiki installation to use memcached, edit

* Set $wgMainCacheType = CACHE_MEMCACHED;
* Set up $wgMemCachedServers; the array format is specified in
includes/DefaultSettings.php (seems to be a straight array of IP
addresses with ports, e.g. array( '',
'' ) )

There are some other configuration variables relating to memcached;
see DefaultSettings.php for more. I *think* $wgUseMemCached is no
longer used (in favour of $wgMainCacheType et al.)...there's also

The other two caches; $wgMessageCacheType and $wgParserCacheType are
by default set to CACHE_ANYTHING...if memcached is available (and
MediaWiki can connect to your memcached daemons), then it will be used
in preference to the other fallbacks.

Rob Church

More information about the MediaWiki-l mailing list