Magento 1.x Speed Optimization with Lesti-FPC on Linux

Although Magento 2 has been released, many of the e-commerce stores are still running on Magento-1. In this blog, we will will discuss about Optimizing our Magento 1.x store. We all are aware about the need of optimizing our store for a faster speed. There are many ways in which we can optimize our magento based store. Here we will discuss how we can speed up our Magento 1.x website using a full page cache(Lesti FPC).

External Full page cache(FPC) can be used along with magento to speed up the website load time. Lesti FPC is a magento Full page cache. It caches the html pages in its cache. When a request is made to the Magento server, Magento executes the required codes and renders the pages. Lesti FPC caches this pages in its cache to serve the future requests from its cache to render the pages faster and avoid Magento to repeat the process again.

We will use ubuntu 16.04 server here for this article. For redhat and centos servers, use “yum” to install the required packages.  You will also need sudo access or root access of the server to do the configurations. Follow the below steps to configure you store for a faster performance.

Install Lesti FPC.

Download the latest Lesti FPC source code. I will be using the version 1.4.9. Please check for the latest source code here.

Now untar the Lesti FPC tar file and copy the source code to the Magento document root directory.

Give the files appropriate file ownership. If you are running Magento with any other user or group other than “www-data”, please change it accordingly in the command.

Clear all the cache and sessions:

To verify the installation by going to: System -> Configuration -> System -> Lesti FPC.   If you  are able to see the configuration options, it is installed.

If you have configured to redis-server for magento, you require an addition step to enable Lesti FPC to use redis. Else you have already configured Lesti FPC successfully.

In case you want to configure Redis-server for Magento, follow this blog. You can later return to this blog to configure Lesti-Fpc for redis.


Configure Lesti FPC to use Redis.

If redis is enabled on the server, you need to edit a file in app/etc/fpc.xml . In case it is not present, create one by copying the fpc.xml.sample file present in same path. This file lets you set appropriate cache parameters along with the lifetime of the full page cache. You do not need to make any changes to this file if you’re using the default “files” as the cache type. But in case you are using  redis or memcache, you have to update this file with the appropriate cache parameters so the FPC can utilize it.

Make a backup copy of the file and open the file.

Replace the contents of the file with below code.

Clear all the cache and sessions:

Or, clear cache from Magento Admin Panel:

System > Cache Management,

and, click on ‘Flush Magento Cache’.

Restart redis-server.

You can check the cache info by,

Now you have now successfully installed Lesti FPC with redis on your server. This should result in a faster load time of  your Magento store.



In case of any help or query, please contact us.

. . .


Add Your Comment

Be the first to comment.