Clearing the Smarty cache in PrestaShop
If you make changes to a PrestaShop theme, you may have to clear the Smarty cache to see the modifications. This article shows you how.
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.
-
Click Save, and then refresh the pages you want to view. You should see any new changes.
Tip
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:
-
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:
-
img/tmp
-
cache/smarty/cache
-
cache/smarty/compile
- Refresh the pages you want to view. You should see any new changes.
Related Articles
Updated 3 days ago