How to handle Prestashop template changes without loosing performance like with Force compile?

Developers or system administrators update their templates constantly. Sometimes you need to install additional module, delete or add some elements in your Prestashop templates. You can turn on Force compile option in Preferencies->Performance area and templates are regenerated on every browser request. This option really slows down your shop. There is a possibility to avoid regeneration of every template. Tell Smarty template engine to regenerate only changed templates not all of them. This is how you can accomplish this:

Go to config directory:

Prestashop config directory
Prestashop config directory

Open with text editor like notepad:

Change line:

$smarty->compile_check = false;


$smarty->compile_check = true;

Now Smarty will check if the current template has changed and will regenerate it if changes were made. You can red more about it here. Restore the line to initial state after you have finished editing your templates:

$smarty->compile_check = false;

This solution will reduce overall website performance much lesser than Force compile.

Hope you’ll find this post useful. If you have some comments or suggestions we appreciate to hear them from you.


2 thoughts on “How to handle Prestashop template changes without loosing performance like with Force compile?

  1. i did it but nothing change, also delete the cache folder but if i delete compile folder i lost my page it will show nothing. I restore it back

    What should i do to change tpl file and its also update on my website

      well you should delete only the contents of compile and cache folders. You also can turn on force compile in back office. More info can be found in this post.
      If you want I can check your system but I will need FTP access if you can trust me. My email is

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>