Today, we will continue our series of blog posts on PrestaShop settings by diving into a critical section of the admin panel — "Advanced Parameters" -> "Performance." Properly configuring these settings can significantly improve your online store's performance. In this article, we will explore each block and its settings to make it easier for you to understand what to adjust and why.
Block 1: Smarty Settings
Smarty is a template engine used to generate HTML pages in PrestaShop. Let’s take a closer look at the key settings:
-
Template Compilation:
- Never recompile template files — this mode is recommended for live sites where templates don’t change. Your site will load faster as PrestaShop won’t recompile templates on each request.
- Recompile templates if files have been updated — useful during development when you frequently modify templates. The system only recompiles the templates when necessary.
- Force compilation — used when you need to ensure that templates are updated with every request, even if no changes were made. This mode slows down the site but is helpful for debugging.
-
Cache — it’s recommended to enable caching for optimal store performance. Disable caching only during development or debugging.
-
Multi-store optimization — if you have a multi-store setup, enabling this option optimizes how caching works across stores. It prevents storing Smarty cache on a network, such as NFS (Network File System). NFS is a distributed file system that allows storing data on remote servers. If you’re not using NFS, it’s better to disable this option to boost performance.
-
Clear cache:
- Never clear cache — this option is ideal for stable live stores where cache refreshing isn’t frequently needed.
- Clear cache every time something has been modified — useful during development when changes are made frequently, ensuring the cache is updated immediately.
Block 2: Debug Mode
This block is intended for developers and admins who want deeper insights into the site’s performance and to troubleshoot issues.
-
Disable all overrides — PrestaShop allows overriding classes and controllers, which is useful for custom modifications. However, sometimes it's helpful to disable all overrides to check how the site works without them.
-
Debug mode — enables debug mode, which turns on extended error reporting, the Symfony debug bar, and other developer tools. It’s useful for identifying bugs and analyzing the site’s behavior.
-
Debug profiler — enables performance profiling. Each page will display information about execution time and resource usage, helping to identify performance bottlenecks.
Block 3: Modules
This block has only one button — Disable non built-in modules. It’s useful when you suspect that third-party modules are impacting your site’s performance. Enabling this option temporarily disables all non-core modules so you can assess how they affect the store’s performance.
Block 4: Optional Features
This block allows you to disable some PrestaShop features to improve performance.
-
Combinations — selecting "No" disables product combinations (such as different sizes or colors). If combinations are already in use for some products, you cannot disable this setting.
-
Features — if product features are not necessary for your store, you can disable them to speed up the site.
-
Customer groups — you can disable customer groups if they are not used, which will improve performance, especially for large stores with many users.
Block 5: CCC (Combine, Compress, and Cache)
This block is crucial for speeding up page loading times. CCC (Combining, Compression, and Caching) allows you to reduce page load times without touching your theme’s code.
-
Smart cache for CSS — combines and caches your CSS files, reducing the number of server requests.
-
Smart cache for JavaScript — similar functionality for JavaScript. Enabling this greatly improves your store’s performance, especially on pages with heavy scripting.
-
Apache optimization — adds directives to the .htaccess file to improve caching and compression. This reduces server load and speeds up page loading. However, ensure that your theme is compatible with PrestaShop 1.7+; otherwise, CCC may cause issues.
Block 6: Media Servers
This block is available only when CCC is enabled. You can specify alternate domains or subdomains to serve static content (such as images, CSS, and JavaScript) without sending cookies. This helps reduce load on the main domain and speeds up the site.
Block 7: Caching
Choosing the right caching system can significantly improve your store’s performance. PrestaShop offers several caching systems:
-
CacheMemcache and CacheMemcached — popular distributed caching systems that speed up data access by storing it in memory.
-
APC — to use this method, you need to install the APC PECL extension. This helps improve site performance by caching in memory.
-
Xcache — another caching method that requires installing the Xcache extension.
Conclusion
Properly configuring performance settings in PrestaShop not only boosts your site’s speed but also improves user satisfaction. A faster-loading store is better for SEO and conversions. Experiment with the settings to find the best configuration for your project!