Available for projects & agency overflow · Quick reply, from the person who does the work

How to clear the PrestaShop cache properly

PrestaShop keeps a pre-compiled version of its pages in memory so it doesn't recalculate everything on every visit. A change that doesn't show up, or an error that persists after a fix, almost always comes down to this cache, which needs clearing in the right place.

Describe my issue Send a message

Clearing the cache by version

  1. From the back office (all versions)

    Advanced Parameters > Performance offers a button to clear the Smarty cache. This is the safest method, since it stays within the process PrestaShop expects.

  2. Via FTP on PrestaShop 1.7, 8 and 9

    Delete the contents of the var/cache/prod and var/cache/dev folders, keeping the folders themselves empty rather than deleting them entirely: PrestaShop recreates them automatically on the next request.

  3. Via FTP on PrestaShop 1.6

    Empty the contents of cache/smarty/compile and cache/smarty/cache, which hold the compiled templates and the render cache respectively.

  4. Check the display

    Reload the page in question in a private browsing window, to rule out any browser cache that could skew the check.

  5. Also clear the server cache if present

    If a memory cache (Redis, Memcached) or a page cache (Varnish, a shared-hosting plugin cache) is in place, it needs clearing separately: PrestaShop's cache and the server cache are two distinct layers.

Two different caches, two different effects

The compile cache turns template files (.tpl) into executable PHP once, then reuses that result as long as the source template doesn't change. Clearing it forces PrestaShop to recompile, which is necessary after a theme change that isn't showing up.

The render cache, meanwhile, stores page fragments that have already been generated (often blocks like the menu or footer) to avoid rebuilding them on every visit. Clearing it is necessary after a configuration, category or product change that doesn't appear on the front end despite being confirmed in the database.

On PrestaShop 1.7 and later, a third layer exists on the Symfony side: the back-office configuration (menus, forms) is also cached in var/cache. A new tab or module that doesn't appear in the admin menu is often fixed by clearing that specific cache.

Common mistakes

  • Deleting the var/cache folder itself rather than its contents, which can cause an error if write permissions don't allow the server to recreate it.
  • Confusing clearing the cache with clearing the browser cache: a change that was applied correctly can look absent simply because the browser is showing a locally saved version.
  • Clearing the cache during a peak-traffic period on a large catalogue: rebuilding the cache uses more server resources while pages are being recompiled.
  • Forgetting the CDN cache if the store uses one: modified CSS or JS files can stay stale for visitors long after the PrestaShop cache has been cleared.

Frequently asked questions

Can clearing the cache cause data loss?
No, the cache only holds recomputable versions of content already in the database. Clearing it has no effect on any order, product or customer.
Why is the site slower right after clearing the cache?
That's normal: the first visits after a clear rebuild the cache page by page, which takes slightly longer. Normal speed returns as soon as the most-visited pages have been recompiled.
Does the cache need clearing after every product change?
No, PrestaShop automatically invalidates the relevant cache for changes made from the back office. Manual clearing is only useful after directly editing files or when unusual behaviour persists.
The back-office clear button is greyed out or throws an error — what now?
This usually points to a write-permission issue on var/cache or cache/smarty: the web server needs to be able to write to these folders for PrestaShop to clear and rebuild them itself.

Describe your need in one minute

A few targeted questions so I can reply with an estimate rather than another questionnaire.

pages
cache
catalogue
hebergement (facultatif)
mesure (facultatif)
Please provide an email or a phone number so I can get back to you.

Please provide an email or a phone number so I can get back to you.