Knowledgebase: Scripts & Programs
How to configure Joomla to use Memcached
Posted by Bill Williams, Last modified by Bill Williams on 25 February 2016 04:01 AM

In this tutorial we will explain how to configure your Joomla! CMS application to use Memcached.

Joomla! natively supports Memcached.

This means that you just need to enable this option. In order to do this you have to edit the Joomla! PHP configuration file - configuration.php.

This file is stored inside the web root folder. For example, if your website is accessible at:

http://yourdomainname.com/joomla this means that the configuration.php file is in your public_html/joomla folder.

You can use the cPanel File Manager to edit the file.


For Joomla 2.5, you have to open the file configuration.php and find the following variables:

public $caching = '0';
public $cache_handler = 'file';

Edit them and change the code to:

public $caching = '2';
public $cache_handler = 'memcache';
public $memcache_server_host = 'localhost';
public $memcache_server_port = '11211';

After that save the file.

 

For Joomla 1.5, you have to open the file configuration.php and find the following variables:

var $caching = '0'; 
var $cache_handler = 'file';

Edit them and change the code to:

var $caching = '2';
var $cache_handler = 'memcache';
var $memcache_settings = array('compression' => 0, 'persistent' => 0, 'servers' => array(array('host' => '127.0.0.1', 'port' => 11211)));

After that save the file.



That's it - your Joomla! CMS is now correctly configured and it uses Memcached to cache API calls, database calls and objects.

(1 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).