Tips for Optimization
PrestaShop comes complete with tools to optimize site performance for improved user experience and search engine rankings. The below tips are provided to enable top performance features in the back office and ensure online success.
In production mode, Enable Smarty cache for faster page loads.
Smarty is a web template system for PHP. Smarty allows you to combine simple PHP-like commands with plain HTML, making it easier for designers and non-tech savvy individuals to create a theme. There are two settings available for smarty optimization, force compile and cache. They come installed ready for a production/live site. When developing or changing TPL files (themes or modules), force compile should be enabled in order for the changes to take effect. This will update the cached files with the latest changes. Always compiling smarty files will slow down the page load time, for faster loading time and better results, always disable force compile when changes are completed.
Enable CCC settings to improve performance without touching the code of your theme.
Smart Cache for CSS takes all CSS files and combines them into one file. Enabling this feature will reduce the number of requests to the server and load one single CSS file each time a customer visits the site. Enable “use CCC for CSS” for great optimization results.
Minify HTML removes any new lines or extra white spaces in all the compiled TPL files (design templates). For faster load time, enable “Minify HTML after ‘smarty compile’ execution”.
High risk HTML compression is a feature that condenses the HTML file for faster speed. When the HTML compresses, W3C validation is canceled and the compatibility on all browsers may suffer. To keep W3C validation on without compressing the HTML files, enable “Keep W3C validation” in the back office. This feature is dependent on the each user’s preference. PrestaShop allows you to have the option to choose.
PrestaShop provides a faster way to encrypt cookies.
Ciphering is a means of encrypting the cookie file PrestaShop generates on your site. The default option “Use Rijndael with mcrypt lib” will speed up the cookie management. Make sure the PHP on your server is compiled with the mycrpt extension.
Enable the caching system
Memcached is a server site cache that uses the server memory to speed up PHP database queries. Similar to the mcrypt, you need to have Memcached complied and enabled in PHP on your server. When the Memcached cannot be used or enabled with the hosting provider, File System is the alternative option. File System cannot be used with an external server therefore it is always best to use Memcached for better site performance.