SuperCacher Tutorial
How to Configure MediaWiki to Use Memcached Tutorial

How to Configure MediaWiki to Use Memcached Tutorial

This tutorial explains how to configure your MediaWiki application to use Memcached. MediaWiki natively supports Memcached. This means that you just need to enable this option.

In order to do this you have to edit the MediaWiki PHP configuration file – LocalSettings.php. This file is stored inside the web root folder. Open the file and find the following two lines of code which is usually around the end of the file:

# End of automatically generated settings.
# Add more configuration options below.

Right below them add the following lines:

$wgMainCacheType= CACHE_MEMCACHED;
$wgParserCacheType= CACHE_MEMCACHED;
$wgMessageCacheType= CACHE_MEMCACHED;

Note that you should replace the memcached_port with the correct port number for your hosting account. For details on how to find out the correct port you can check this tutorial.

Once you are ready with the changes to the file – save it to apply the changes. That’s it – your MediaWiki application is now configured to use Memcached.

Share This Article