How to optimize PrestaShop performance settings
This article describes how to optimize PrestaShop's performance settings for your site.
PrestaShop includes several performance-related settings that you can use to help improve your store's speed and responsiveness. The procedures below show how to configure these settings so they are optimized for high performance.
The settings described in this article are for PrestaShop 1.6. Earlier PrestaShop versions may not include some of these settings.
If you configure the settings as described below and your site's performance is still not at the level you want, there are additional options:
Smarty template settings
PrestaShop themes use the Smarty template engine to render pages for your site. To optimize Smarty template settings, follow these steps:
- Log in to PrestaShop as the administrator.
- On the menu bar, click , and then click .
- In the SMARTY section, under Template compilation, select Recompile templates if the files have been updated.
The Never recompile template files option is actually the fastest option. However, if you select this option, you must remember to clear the cache whenever you make edits to the theme. Otherwise, your changes will not appear on the site.
- Under Cache, click YES.
- Under Caching type, select File System.
- Under Clear cache, select Clear cache everytime something has been modified.
- Click Save.
Debugging settings
PrestaShop includes debugging settings that you should only enable if you experience a problem with your site. During normal operation, all debugging should be disabled. To verify debugging features are disabled for your site, follow these steps:
- Log in to PrestaShop as the administrator.
- On the menu bar, click , and then click .
- In the DEBUG MODE section, the Disable non PrestaShop modules option should be set to NO.
- The Disable all overrides option should also be set to NO.
- Click Save.
Optional features
You can disable some optional PrestaShop features to help improve performance. To do this, follow these steps:
- Log in to PrestaShop as the administrator.
- On the menu bar, click , and then click .
- In the OPTIONAL FEATURES section, select the features you want to disable:
- To disable product combinations, under Combinations click NO.
- To disable product features, under Features click NO.
- To disable customer groups, under Customer Groups click NO.
Depending on your store configuration, you may not be able to set some or all of these options.
- Click Save.
CCC settings
You can improve PrestaShop web page loading times by enabling its CCC (“combine, compress, and cache”) feature. As its name implies, CCC compresses and caches web page source code, including HTML, JavaScript, and CSS.
In A2 Hosting's own testing, enabling CCC and Smarty template caching resulted in the homepage on a default PrestaShop site loading twice as fast.
To enable CCC, follow these steps:
- Log in to PrestaShop as the administrator.
- On the menu bar, click , and then click .
- In the CCC (COMBINE, COMPRESS AND CACHE) section, under Smart cache for CSS, click YES.
- Under Smart cache for JavaScript, click YES.
- Under Minify HTML, click YES.
- Under Compress inline JavaScript in HTML, click YES.
- Under Move JavaScript to the end, click YES.
- Under Apache optimization, click YES.
When you enable this option, PrestaShop adds several configuration directives to the
.htaccess file in the PrestaShop directory. For example, it enables
content caching, disables
entity tags, and enables
compression.
- Click Save.
After setting these options, you should test your theme to ensure pages load correctly. If you experience problems, try disabling the JavaScript CCC options, which may cause problems with some themes.
Encryption settings
PrestaShop supports two encryption algorithms: Rijndael (also known as AES) and a custom Blowfish implementation. The Rijndael algorithm, provided by the PHP mcrypt library, is faster. To optimize the encryption settings, follow these steps:
- Log in to PrestaShop as the administrator.
- On the menu bar, click , and then click .
- In the CIPHERING section, under Algorithm, select Use Rijndael with mcrypt lib.
By default, A2 Hosting servers include the mcrypt PHP library, so you can use Rijndael without any problem on your site.
- Click Save.
Caching settings
PrestaShop supports several caching methods to help improve page load times. To configuring caching for PrestaShop, follow these steps:
- Log in to PrestaShop as the administrator.
- On the menu bar, click , and then click .
- In the CACHING section, under Use cache, click YES.
- Under Caching system, select the caching method you want to use:
- To use the file system, select File System.
Memcached can also increase the performance of your site, but it is only available on some types of hosting accounts. If your account does not support Memcached, file system caching is still better than no caching at all.
- To use Memcached, select Memcached, and then configure the server information.
APC has been replaced by OPcache in PHP 5.5 and later versions, and A2 Hosting does not support XCache. You should only use the File System or Memcached caching options with PrestaShop.
- Click Save.
For more information about PrestaShop's performance settings, please visit http://doc.prestashop.com/display/PS16/Performance+Parameters.