Prestashop provides a number of options to speed up Prestashop website and to optimize its performance. This optimization process gives you the ability to increase the speed of loading and enhance the performance of your Prestashop installation. This article describes the caching and performance options available with the new interface of Prestashop.
Configuring the Smarty template engine
Prestashop uses a PHP template engine called Smarty. Below are the steps for the configuration of this template engine.
- Navigate to performance page and to the Smarty section in the page.
- Click the “Recompile templates if the files have been updated” from the Template Cache
- Set Cache toggle to “Yes”.
The 3Cs (Combine, Compress, Cache)
Prestashop combine, compress and cache lets you increase your site’s performance without using any coding expertise. These 3 terms describe a process conducted to optimize a single file to speed up the site loading. The main concept behind this is making a file smaller to increase its performance. The CCC optimization options can be obtained by clicking Performance or in the Advanced Parameters menu.
The options provided are given below.
- CSS Smart cache for css
CSS or Cascading Style Sheets are present to add styles and formatting to your web pages. But the large number of CSS files present can decrease the performance. This cache feature combines all files into a single CSS file to reduce the requests sent to the server for each visit of the website.
- Minify HTML
This process involves the removal of unnecessary code from the HTML. These unwanted portions of code include whitespace, commented code and other characters the removal of which will increase the loading speed for Prestashop optimization.
- Apache Optimization
Involves the addition of htaccess code which helps to improve caching in the Apache server.
The usage of media servers gives you the ability for offloading static content to another server. It is called a CDN or a Content Delivery Network. It is required by Prestashop for these options to be used with the CCC options given in the description above. It also states that to use cookie-less content, entering to another domain/subdomain is essential. This is a precaution taken for the website security.
Given below are the steps to follow when using multiple servers
- Enter the domain/subdomain name of server in the field provided.
- Save the entry by clicking on save from the bottom right corner.
Prestashop’s performance can be improved extensively by using different caching options. Caching can also be enabled or disabled according to your requirement. But these Prestashop cache options require the enabling of server extension. The least efficient caching option is the file system cache which uses the hard drive.
- APC cache – Alternative PHP cache works with a single server and is not present for accounts that use shared server hosting. And can only be installed on servers for which you have complete access. If InMotion hosting is used, it can be installed on VPS or on dedicated server accounts of which you have root access.
- Memecache – Works best with multiple server websites. But your server’s PHP configuration must enable Memecache for it to be selected. Like APC cache, Memecache can only be installed on servers for which you have complete access. If InMotion hosting is used, it can be installed on VPS or on dedicated server accounts of which you have root access.
- Xcache – Lighttpd server is required for this and it can’t be used with the InMotion hosting servers. This is because of their usage of websites hosted by Apache server.
Clicking on the radio button found next to the cache type you prefer to use and then clicking on the button named Add Server will enable the selected cache. Each and every option for caching found in Prestashop is linked to a website which gives all the necessary details about each type.
Ciphering is associated with cookies. In fact it refers to the encrypting algorithm used in cookie generation. The selected encrypting algorithm can be changed by clicking on the radio button in front of your preferred algorithm and clicking on Save in the bottom right.
Out of the given algorithms it is best to select Rijndael with mcrypt lib if you are more concerned about the performance since it works faster than custom BlowFish class. But for this, your web server should be mcrypt enabled.
Images are an ideal feature of your website. Therefore websites usually contain a large number of images. Prestashop provides many methods for managing these images.
To set the image size for images displayed with products, navigate to Images in Preferences and add preferred size.
To set the image quality there is another option when you navigate to images in Preferences.
Both the size and the quality of the images highly affects the loading time of your website. When images are of higher quality and larger in size, the loading time will be slower. If you want to speed up Prestashop website, it is best advised to use medium quality images.
Image management has become advanced with the newer versions of Prestashop. Image organization is an option provided in Prestashop 1.6 allowing the use of responsive design. This option enables the users to view the website and products without a difference regardless of the screen size of the device.
Another useful feature provided is the Regenerate Thumbnails option in Images. Even if you add different sized images, these can be brought to the same size using this option. To access the regenerate thumbnail option, navigate to the Images section. But if your website uses a large number of products, Regenerate Thumbnails setting will be generating that number of images when clicked and it might slow down your Prestashop site. Therefore it is essential to make sure to not use it when your site is busy.
These features are some optional features when disabled will speed up Prestashop website.
- Navigate to “Optional Features” section in the Performance page.
- Set the Combinations toggle button to “No” if your site doesn’t contain products having combinations.
- Product Feature option can also be disabled from the same section which is enabled by default.
- Disabling Customer Group feature will make all customers individually subjected to pricing etc. and not group wise.