How to clear the Smarty cache in PrestaShop
PrestaShop themes use the Smarty PHP template engine. If you make modifications to a theme, you may have to clear the Smarty cache to see the changes.
This article describes two methods for clearing the Smarty cache in PrestaShop.
Method #1: Using the PrestaShop administration interface
You can use the PrestaShop administration interface to clear the Smarty cache. To do this, follow these steps:
- Log in to PrestaShop as the administrator.
- On the left-side menu bar, click ADVANCED PARAMETERS, and then click Performance.
- In the SMARTY section, under Template compilation, click Force compilation.
- Under Cache, click NO.
, and then refresh the pages you want to view. You should see any new changes.
After you are done, make sure you re-enable Smarty caching to take advantage of its performance benefits. For more information, please see this article
Method #2: Using the command line or cPanel
You can clear the Smarty cache manually using the command line or cPanel's File Manager. This method is useful if the PrestaShop administration interface is inaccessible for some reason. To do this, follow these steps:
- Log in to your account using SSH or cPanel.
- Navigate to the public_html directory.
- In the directory where you installed PrestaShop, delete all of the content in the following directories except for the index.php file:
- Refresh the pages you want to view. You should see any new changes.