Clearing the Smarty cache in PrestaShop
PrestaShop themes use the Smarty PHP template engine. If you make modifications to a theme, you may need to clear the Smarty cache to see the changes. On ruachost.com, you can clear the cache either through the administration interface or manually via the command line/cPanel.
Why Clear the Smarty Cache?
Section titled “Why Clear the Smarty Cache?”- Ensures theme modifications are visible immediately.
- Prevents outdated templates from being served.
- Improves troubleshooting when changes don’t appear.
Methods to Clear the Smarty Cache
Section titled “Methods to Clear the Smarty Cache”Method 1: Using the PrestaShop Administration Interface
Section titled “Method 1: Using the PrestaShop Administration Interface”-
Log in to PrestaShop as the administrator.
-
On the left‑side menu bar, click Advanced Parameters → Performance.
-
In the Smarty section:
- Under Template compilation, select Force compilation.
- Under Cache, select No.
-
Click Save.
-
Refresh the pages you want to view — your changes should now appear.
Tip: After verifying changes, re‑enable Smarty caching to take advantage of performance benefits.
Method 2: Using the Command Line or cPanel
Section titled “Method 2: Using the Command Line or cPanel”If the PrestaShop admin interface is inaccessible, you can clear the cache manually:
-
Log in to your account using SSH or cPanel File Manager.
-
Navigate to the
public_htmldirectory. -
In the directory where PrestaShop is installed, delete all content in the following folders except the
index.phpfile:img/tmpcache/smarty/cachecache/smarty/compile
-
Refresh your site pages — changes should now be visible.
Important Notes
Section titled “Important Notes”- Do not delete the
index.phpfile in these directories. - Always back up your site before making manual changes.
- Re‑enable caching after updates to maintain performance.