{"id":3641,"date":"2018-02-28T09:52:39","date_gmt":"2018-02-28T09:52:39","guid":{"rendered":"https:\/\/cloudkul.com\/blog\/?p=3641"},"modified":"2018-03-06T15:09:48","modified_gmt":"2018-03-06T15:09:48","slug":"magento-1-x-speed-optimization-lesti-fpc-redis-linux","status":"publish","type":"post","link":"https:\/\/cloudkul.com\/blog\/magento-1-x-speed-optimization-lesti-fpc-redis-linux\/","title":{"rendered":"Magento 1.x Speed Optimization with Lesti-FPC on Linux"},"content":{"rendered":"<p>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).<\/p>\n<p>External Full page cache(FPC) can be used along with magento to speed up the website load time. <a href=\"https:\/\/github.com\/GordonLesti\/Lesti_Fpc\">Lesti FPC<\/a> 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.<\/p>\n<p>We will use <em>ubuntu 16.04<\/em> server here for this article. For <em>redhat<\/em> and <em>centos<\/em> servers, use &#8220;<em>yum<\/em>&#8221; to install the required packages.\u00a0 You will also need <em>sudo<\/em> access or root access of the server to do the configurations. Follow the below steps to configure you store for a faster performance.<\/p>\n<p><strong>Install Lesti FPC.<\/strong><\/p>\n<p>Download the <a href=\"https:\/\/github.com\/GordonLesti\/Lesti_Fpc\/releases\/latest\">latest<\/a> Lesti FPC source code. I will be using the version 1.4.9. Please check for the latest source code <a href=\"https:\/\/github.com\/GordonLesti\/Lesti_Fpc\/releases\/latest\">here<\/a>.<\/p>\n<pre class=\"lang:default decode:true\">sudo apt update &amp;&amp; apt-get -y install wget tar\r\ncd \/tmp\r\nwget https:\/\/github.com\/GordonLesti\/Lesti_Fpc\/archive\/1.4.9.tar.gz<\/pre>\n<p>Now untar the Lesti FPC tar file and copy the source code to the Magento document root directory.<\/p>\n<pre class=\"lang:default decode:true\">tar -xzvf 1.4.9.tar.gz\r\ncd Lesti_Fpc*\r\nrsync -ravh app\/  \/&lt;path_to_magento_root_dir&gt;\/app\/<\/pre>\n<p>Give the files appropriate file ownership. If you are running Magento with any other user or group other than &#8220;www-data&#8221;, please change it accordingly in the command.<\/p>\n<pre class=\"lang:default decode:true\">sudo chown -R www-data:www-data \/&lt;path_to _magento_root_directory&gt;\/<\/pre>\n<p>Clear all the cache and sessions:<\/p>\n<div class=\"crayon-pre\">\n<pre class=\"lang:default decode:true\">rm -rf \/magento-root-dirrectory\/var\/session\/*\r\nrm -rf \/magento-root-dirrectory\/var\/cache\/*<\/pre>\n<\/div>\n<p>To verify the installation by going to: <em>System -&gt; Configuration -&gt; System -&gt; Lesti FPC. \u00a0 <\/em>If you\u00a0 are able to see the configuration options, it is installed.<\/p>\n<p>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.<\/p>\n<p>In case you want to configure Redis-server for Magento, follow this <a href=\"https:\/\/cloudkul.com\/blog\/configure-magento-1-9-x-with-redis-as-backend-cache\/\">blog<\/a>. You can later return to this blog to configure Lesti-Fpc for redis.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Configure Lesti FPC to use Redis.<\/strong><\/p>\n<p>If redis is enabled on the server, you need to edit a file in app\/etc\/<span class=\"il\">fpc<\/span>.xml . In case it is not present, create one by copying the <span class=\"il\">fpc<\/span>.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\u2019re using the default &#8220;<i>files&#8221;<\/i> as the cache type. But in case you are using\u00a0 redis or memcache, you have to update this file with the appropriate cache parameters so the <span class=\"il\">FPC<\/span> can utilize it.<\/p>\n<p>Make a backup copy of the file and open the file.<\/p>\n<pre class=\"lang:default decode:true\">cd \/&lt;magento-root-dirrectory&gt;\/app\/etc\/\r\ncp fpc.xml fpc.xml.backup\r\nnano fpc.xml<\/pre>\n<p>Replace the contents of the file with below code.<\/p>\n<pre class=\"lang:default decode:true \">&lt;?xml version=\"1.0\"?&gt;\r\n&lt;config&gt;\r\n    &lt;global&gt;\r\n        &lt;fpc&gt;\r\n            &lt;lifetime&gt;86400&lt;\/lifetime&gt;\r\n            &lt;backend&gt;Cm_Cache_Backend_Redis&lt;\/backend&gt;\r\n            &lt;backend_options&gt;\r\n                &lt;server&gt;127.0.0.1&lt;\/server&gt;\r\n                &lt;port&gt;6379&lt;\/port&gt;\r\n                &lt;persistent&gt;&lt;\/persistent&gt;\r\n                &lt;database&gt;2&lt;\/database&gt;\r\n                &lt;password&gt;&lt;\/password&gt;\r\n                &lt;force_standalone&gt;1&lt;\/force_standalone&gt;\r\n                &lt;connect_retries&gt;1&lt;\/connect_retries&gt;\r\n                &lt;lifetimelimit&gt;86400&lt;\/lifetimelimit&gt;\r\n                &lt;read_timeout&gt;10&lt;\/read_timeout&gt;\r\n                &lt;compress_data&gt;1&lt;\/compress_data&gt;\r\n                &lt;compress_tags&gt;1&lt;\/compress_tags&gt;\r\n                &lt;compression_lib&gt;gzip&lt;\/compression_lib&gt;\r\n             &lt;\/backend_options&gt;\r\n        &lt;\/fpc&gt;\r\n    &lt;\/global&gt;\r\n&lt;\/config&gt;<\/pre>\n<p>Clear all the cache and sessions:<\/p>\n<div class=\"crayon-pre\">\n<pre class=\"lang:default decode:true\">rm -rf \/&lt;magento-root-dirrectory&gt;\/var\/session\/*\r\nrm -rf \/&lt;magento-root-dirrectory&gt;\/var\/cache\/*<\/pre>\n<p>Or, clear cache from Magento Admin Panel:<\/p>\n<p>System &gt; Cache Management,<\/p>\n<p>and, click on \u2018Flush Magento Cache\u2019.<\/p>\n<p>Restart redis-server.<\/p>\n<div class=\"crayon-pre\">\n<div id=\"crayon-5a9568f80c8de530183573-1\" class=\"crayon-line\">\n<pre class=\"lang:default decode:true\">sudo service redis-server restart<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"crayon-pre\">\n<div id=\"crayon-5a9568f80c8e5152971216-1\" class=\"crayon-line\">\n<p>You can check the cache info by,<\/p>\n<pre class=\"lang:default decode:true \">sudo redis-cli info<\/pre>\n<\/div>\n<p>Now you have now successfully installed Lesti FPC with redis on your server. This should result in a faster load time of\u00a0 your Magento store.<\/p>\n<p>Enjoy!!!<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<p style=\"text-align: center\"><strong><em>In case of any help or query, please\u00a0<a href=\"http:\/\/cloudkul.com\/contact\/\" target=\"_blank\" rel=\"noopener noreferrer\">contact us<\/a>.<\/em><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Although Magento 2 has been released, many of the e-commerce stores are still running on <a class=\"text-primary\" title=\"read more\" href=\"https:\/\/cloudkul.com\/blog\/magento-1-x-speed-optimization-lesti-fpc-redis-linux\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":19,"featured_media":3665,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[87,86,20,21,1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Magento 1.x Speed Optimization with Lesti-FPC on Linux - Cloudkul<\/title>\n<meta name=\"description\" content=\"Although Magento2 has been released, many e-commerce stores are still running on Magento-1. Lesti FPC is a Full page cache to boost your Magento site.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudkul.com\/blog\/magento-1-x-speed-optimization-lesti-fpc-redis-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Magento 1.x Speed Optimization with Lesti-FPC on Linux - Cloudkul\" \/>\n<meta property=\"og:description\" content=\"Although Magento2 has been released, many e-commerce stores are still running on Magento-1. Lesti FPC is a Full page cache to boost your Magento site.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudkul.com\/blog\/magento-1-x-speed-optimization-lesti-fpc-redis-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudkul\" \/>\n<meta property=\"article:published_time\" content=\"2018-02-28T09:52:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-06T15:09:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2018\/02\/l3qmmvrV.png\" \/>\n\t<meta property=\"og:image:width\" content=\"848\" \/>\n\t<meta property=\"og:image:height\" content=\"422\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Kamal Verma\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudkul.com\/blog\/magento-1-x-speed-optimization-lesti-fpc-redis-linux\/\",\"url\":\"https:\/\/cloudkul.com\/blog\/magento-1-x-speed-optimization-lesti-fpc-redis-linux\/\",\"name\":\"Magento 1.x Speed Optimization with Lesti-FPC on Linux - Cloudkul\",\"isPartOf\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\"},\"datePublished\":\"2018-02-28T09:52:39+00:00\",\"dateModified\":\"2018-03-06T15:09:48+00:00\",\"author\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/06c6ea4ff7ba3c7c066fa1ee606bf051\"},\"description\":\"Although Magento2 has been released, many e-commerce stores are still running on Magento-1. Lesti FPC is a Full page cache to boost your Magento site.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/magento-1-x-speed-optimization-lesti-fpc-redis-linux\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudkul.com\/blog\/magento-1-x-speed-optimization-lesti-fpc-redis-linux\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudkul.com\/blog\/magento-1-x-speed-optimization-lesti-fpc-redis-linux\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Magento 1.x Speed Optimization with Lesti-FPC on Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\",\"url\":\"https:\/\/cloudkul.com\/blog\/\",\"name\":\"Cloudkul\",\"description\":\"Host your eCommerce Store on AWS with Optimized Performance\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudkul.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/06c6ea4ff7ba3c7c066fa1ee606bf051\",\"name\":\"Kamal Verma\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/63cc4ebeffa54b7ceb9b2d552926f2f6?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/63cc4ebeffa54b7ceb9b2d552926f2f6?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"caption\":\"Kamal Verma\"},\"url\":\"https:\/\/cloudkul.com\/blog\/author\/kamaldev-cloudkul308\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Magento 1.x Speed Optimization with Lesti-FPC on Linux - Cloudkul","description":"Although Magento2 has been released, many e-commerce stores are still running on Magento-1. Lesti FPC is a Full page cache to boost your Magento site.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudkul.com\/blog\/magento-1-x-speed-optimization-lesti-fpc-redis-linux\/","og_locale":"en_US","og_type":"article","og_title":"Magento 1.x Speed Optimization with Lesti-FPC on Linux - Cloudkul","og_description":"Although Magento2 has been released, many e-commerce stores are still running on Magento-1. Lesti FPC is a Full page cache to boost your Magento site.","og_url":"https:\/\/cloudkul.com\/blog\/magento-1-x-speed-optimization-lesti-fpc-redis-linux\/","og_site_name":"Cloudkul","article_published_time":"2018-02-28T09:52:39+00:00","article_modified_time":"2018-03-06T15:09:48+00:00","og_image":[{"width":848,"height":422,"url":"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2018\/02\/l3qmmvrV.png","type":"image\/png"}],"author":"Kamal Verma","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/cloudkul.com\/blog\/magento-1-x-speed-optimization-lesti-fpc-redis-linux\/","url":"https:\/\/cloudkul.com\/blog\/magento-1-x-speed-optimization-lesti-fpc-redis-linux\/","name":"Magento 1.x Speed Optimization with Lesti-FPC on Linux - Cloudkul","isPartOf":{"@id":"https:\/\/cloudkul.com\/blog\/#website"},"datePublished":"2018-02-28T09:52:39+00:00","dateModified":"2018-03-06T15:09:48+00:00","author":{"@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/06c6ea4ff7ba3c7c066fa1ee606bf051"},"description":"Although Magento2 has been released, many e-commerce stores are still running on Magento-1. Lesti FPC is a Full page cache to boost your Magento site.","breadcrumb":{"@id":"https:\/\/cloudkul.com\/blog\/magento-1-x-speed-optimization-lesti-fpc-redis-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudkul.com\/blog\/magento-1-x-speed-optimization-lesti-fpc-redis-linux\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cloudkul.com\/blog\/magento-1-x-speed-optimization-lesti-fpc-redis-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Magento 1.x Speed Optimization with Lesti-FPC on Linux"}]},{"@type":"WebSite","@id":"https:\/\/cloudkul.com\/blog\/#website","url":"https:\/\/cloudkul.com\/blog\/","name":"Cloudkul","description":"Host your eCommerce Store on AWS with Optimized Performance","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudkul.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/06c6ea4ff7ba3c7c066fa1ee606bf051","name":"Kamal Verma","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/63cc4ebeffa54b7ceb9b2d552926f2f6?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/63cc4ebeffa54b7ceb9b2d552926f2f6?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","caption":"Kamal Verma"},"url":"https:\/\/cloudkul.com\/blog\/author\/kamaldev-cloudkul308\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/3641"}],"collection":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/comments?post=3641"}],"version-history":[{"count":21,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/3641\/revisions"}],"predecessor-version":[{"id":3668,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/3641\/revisions\/3668"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/media\/3665"}],"wp:attachment":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/media?parent=3641"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/categories?post=3641"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/tags?post=3641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}