In my previous blog post, I explained the process of installing SSL on Joomla website, this time I’ll show you how to enable memcached for Joomla.
Memcached is one of the most effective websites caching technologies available to us. It provides an immense performance boost to any website by speeding up its dynamic load time. However, the only problem is that it can’t be enabled effortlessly on a CMS like Joomla, due to a few programming obstacles.
But it is now possible to install it with just a few clicks and code alterations on Cloudways, a managed cloud hosting platform.
Let’s learn how that’s possible.
Enable Memcache on the Server
I’m assuming you have already signed up for Cloudways and launched a Joomla site on it.
If not, please do so by reading our blog on Installing a Joomla Template on Cloudways.
Before enabling memcached on your Joomla app, first, enable it on your server.
This can easily be done with a single-click.
Simply navigate to your server dashboard and click the ‘Manage Services’ tab on the left toolbar.
Here, you will see the various services that are either running or disabled on your server. Click enabled beside memcached to enable the service on your server.
Enable Memcached on Joomla Website
To enable memcached on Joomla, we will take a brief dive into the configuration.php file to modify a few settings.
You can find this file in your Joomla site’s root folder. Using your favorite FTP software, edit this file and find the following lines:
public $caching = '0';
public $cache_handler = 'file';
Change these lines to the following:
public $caching = '2';
public $cache_handler = 'memcache';
Then, immediately after the two lines you edited, add these two lines:
public $memcache_server_host = ‘localhost’;
public $memcache_server_port = ‘12345’;
In the second line you will need to enter the correct port for your server in place of ‘12345.’
After you are done making all the changes, save the configuration file.
Configure Memcached in Joomla Settings
Now, we will configure memcached on our Joomla-based website.
Login to your Joomla site’s admin panel and navigate to System -> Global Configuration.
Click on the server tab at the top and scroll down to Cache Settings. From the drop-down menu select Persistent(Memcached).
Then, configure the settings as is shown in the screenshot below.
Note: Make sure to enter the correct Memcached server host and port for your server.
Save the settings.
You’ve successfully enabled memcached on your Joomla website.
I hope this tutorial was helpful.
If you have any questions, please ask them in the comments below.
Start Growing with Cloudways Today.
Our Clients Love us because we never compromise on these