On optimizing Prestashop (I)

In this series of posts we will perform an optimization of speed on our shop Prestashop (WPO from 0 to 100). The loading speed of our store is very important for our conversions, optimize a Prestashop store is a task that you must begin and never end.
Actualizado: 07/10/2015 269
On optimizing Prestashop (I)

In this series of posts I will try to explain how to optimize the load speed of our Prestashop from a more advanced point of view than is now customary.


Why is the loading speed of your Prestashop store so important?


1. search engine positioning:


1.1 if a user performs a search, get a result and arriving at our store loading the page the user is too late it will return to the search engine to be able to select another option, this behavior will be identified by the search engine being penalized our shop.


1.2 If pay advertising ad quality will go down to obtain a percentage of very high rebound for the same reason mentioned in the previous point.


1.3 when lighter is a page more easily and clean will be indexing by a search engine.


2 user experience (UX):


Current users do not expect more than 5 seconds the load of each page to navigate, taking into account that we are talking about an ecommerce where at least is you have to visit 5 to 10 pages before converting any visit into a sale we can not exceed in any case this maximum load time, ideally to be less than 2 seconds per page (sorry this isn't easy to achieve with Prestashop) We will have to work on it).




The following websites we serve as an example of the importance of optimization of speed web (Web Performance Optimization WPO)


Facebook.com: a rise of 0.5 seconds in its charging time decreases total traffic on its network by 3%. A rise of 1 second a 7% fall.


Amazon.com: a tenth of second proboca a fall of 1% revenue meaning for this giant million of dollars.


Of course these falls are not comparable to where they will have in your Prestashop store, your business isn't facebook or Amazon, your load time will increase the rate of abandonment of your site much more.


Let us in theory and practice-Let's:

To start this first chapter I will explain the basic optimization of Prestashop and an introduction to the Advanced mode that I will try in my second post.


The part of basic optimization of our Prestashop we have divided into several sections within the tab advanced parameters--> performance of our Back Office. Let's start explaining the choice of Smarty:



The main language of Prestashop is the PHP that is processed with a module view (MVC) programming language, one of the advantages of Prestashop is that on the one hand we program the functionality on the other show it to the user under Smarty It is a quite optimized PHP templates engine.


The option of Force build It should only be used when we are making changes in our our template TPL files, keep in mind that the charging time will be multiplied at least three dice which are compiled the files again with each recharge our PrestaShop.


The option Recompile the templates when files are modified This is the option that is used in the Prestashop shops that currently exist, is a feasible option to be in production and remove us problems when we load modules and make sporadic changes in files of our shop (given that Prestashop if you will pick up the changes), but keep in mind that it is always faster tell Prestashop to directly recharge the web that tell you to reload if you check that you nothing has changed in their TPL files.


If our shop is in production always option should be marked:


"Never recompile the templates files"


in this way Prestashop will not verify if any change has been made in the files with extension TPL and charged that Smarty has already compiled in previous loads since it really does Smarty is this same, une PHP code on the features with the code that serves to show shop customer.


Smarty compiled files are stored in the following path in Prestashop:




and they have the following appearance:


as you can see the TPL files and their variables have been converted to PHP by the Manager of Smarty. This particular file is the compilation of archive cms.tpl of the template that is used whenever we want to view the contents of any CMS that we've created in Prestashop such as the famous "legal notice" or "about us"


In the following paragraph of the section from Smarty optimization we have the following option:



If you select File system We will use the type of files mentioned in the previous point, this file system is the most widely used in shops Prestashop and gives very good results especially when hard drives SSD is available on our server.


The type of cache Prestashop MySQL option is much less widespread, perhaps due to ignorance or by the saturated often Mysql servers when using Prestashop. This option is making record in the table ps_smarty_cache each of the compiled files of Smarty, in this way instead of the request as a file directly make a query to the database. Eye we had 59 queries the database to 510 to e.g. load the home page


If we activate the option to Cache MySQL Smarty files located in the cachesmartycompile directory will continue creating and loading with what this option is not feasible a priori if not optimize queries and avoid that they load the smarty files.


We continue with the option:


No doubt this option must be marked in Clean the cache whenever it has something changed. Otherwise our server will be gradually filled with files that will be never used have been modified (I've seen hosting with 10GB of these useless files)


Now we go with the next block which is very important:



Surely all the options listed must be enabled although it should be clear what each option does:


This is the right optimization but let's delve into what each option, we start with the first:


PrestaShop uses hundreds of CSS file to show the design of the store, more specifically in a standard Prestashop and loading the home page load fee of 32 different files and this are many requests to the server only to load our store design. Activating this option Prestashop unites these 32 files in only 1 file that is located in the following directory:




in this way we take requests to the server and file size since Prestashop brings together all the code in a line to optimize it (attention, if there is a bug in your code CSS page is displayed wrong selecting this option)


In the next post we will continue entering more advanced optimization of Prestashop.

Buscar en el blog...
Últimos artículos
Más vistos
Síguenos en redes
0 comentarios

Escribe un comentario

¿Qué te ha parecido?