How to delete Smarty cache in Prestashop?

This problem is so common that I decided to write a post about it. Developers or Prestashop administrators change their shop translations or templates and they don’t see any changes. This is because Prestashop caches pages – it helps to speed up your webpage. Your browser also caches pages so do not forget to clear it too. More information how to clear browsers cache you can find here.
You can clear Prestashop 1.4 cache in back-office or manually by deleting cache files. There is no possibility to clear cache in back-office for Prestashop 1.3 sou you will have to do it manually.

Clear cache in Prestashop 1.4 back-office:

  1. Go to Preferences->Performance
    Preferences->performance

    Preferences->performance

  2. Set “Force compile” to “Yes“and save changes.
    Force compile

    Force compile

  3. Go to your front-office and reload the webpage you are testing.
  4. Do not forget to set “Force compile” option back to “No” after you make changes to your shop.

Clear cache manually:

Prestashop 1.3:
tools/smarty/compile – delete all files
tools/smarty/cache – delete all files

Prestashop 1.4:
tools/smarty/ compile – delete all files
tools/smarty/ cache – delete all files

If your system uses “Smarty 2” for compatibility reasons:
tools/ smarty_v2/ compile – delete all files
tools/ smarty_v2/ cache – delete all files

Here is the instructions with images. The process is quite similar for Prestashop 1.3 and 1.4 so I will describe the process step by step for Prestashop 1.4:

  1. Go  to “tools” directory. You should find it in your Prestashop’s root directory.

    tools directory

    tools directory

  2. Go to “smarty” directory or “smarty_v2” if your system uses “Smarty” version 2 for compatibility reasons:

    smarty directory

    smarty directory

  3. Go to compile and cache directories and delete all inner files:

    cache and compile directories

    cache and compile directories

That’s it! You should see the changes you made after cache is cleared.  If this does not help maybe you are editing the wrong files or your files are in wrong server or the problem is somewhere else :) .

15 Responses to How to delete Smarty cache in Prestashop?

  1. Stephane says:

    Hello,

    Indeed, since I have 1.4 it causes many problems.
    A big “thank you” for those clear explanations, this page goes in my favorites.

    Stephane.

  2. Yossef says:

    Hi, i am french.
    Yours tutos are bester that french’s prestashop tuto ?! lol
    Thanks.

    • Donatas Lomsargis says:

      Hi,
      I’m glad you like our tutorial. More are coming soon :) If you have some ideas for tutorials you can email them to me “donatas @ invertus . lt” we will try to write them ASAP :)

  3. Alfredo says:

    Thank you!

  4. Jasmine says:

    This is a great tutorial, simple but illustrates the steps clearly. Indeed, PrestaShop seems to have some problem with smarty cache sometimes, and it’s wise to delete it through the steps outlined in your tutorial.

  5. Casility says:

    Thanks.
    I fixed problem with database and I didn’t saw result.
    Ihad only clear cache. So simply but I searched this couple hours.
    Thank once again.

  6. Swords says:

    Thanks, just updated Prestashop to 1.4. and was pretty confused. Great the developers added the cache system control into backoffice.

  7. Aquim says:

    How do I properly refresh the CCC’ed CSS and JS files?

    My template files have already been refreshed (using your tutorial’s method, thank you), but the CCC version of the CSS file and JS file is old.

    Put simply, if I turn CCC off, I see my latest CSS and JS code working. If I turn CCC on, then I see the visual and functional result of my old CSS and JS code.

    This happenned once before and I tried to delete just the old CCC files beign loaded from themes/mytheme/cache. That was a really bad move, but I’ve blocked the details from my memory.

    Any advice or directions?

    • Donatas Lomsargis says:

      Hi,
      you can delete CCC’ed CSS and JS files in your theme catalog.
      Go to themes/your_theme/cache/ and delete the contents of this folder except index.php – leave this file.
      It should resolve your problem.

  8. This’s my the first use the Prestashop, thank you!

  9. Daniel says:

    Hi there,

    is there a way to limit the amount of files written to the cache? I have 500MB webspace, and now im out of space because the cache uses up more than 360MB of that…?!

  10. ambrosio says:

    hi, i have 1.3.6 version of prestashop. followed your instruction on manually deleting cache for versions 1.3+. Now I got HTTP 500 Internal Server Error. Is there a way to fix this? Thank you!

    • Donatas Lomsargis says:

      Well, when you clear prestashop cache then it’s regenerated so I believe there is some problem (bug) with some of your shop files. First of all you should check your web server logs – you’ll get more specific info in there.

  11. medved says:

    Hi Donatas,

    i have problem with smarty. Even “Force compile” option is checked to yes, prestashop is still cache-ing all .tpl files. Do you have any idea wath to do with ?

    I`m using ps 1.4.3 and smarty 3.

    Thank you for advice.

  12. James Yan g says:

    Thank you, my friend, you’ve got my big big big big big big big big and so on thank from me!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>