How do I clear PrestaShop cache properly?

Question published 2862 views

To clear PrestaShop cache properly, start in the back office: Advanced Parameters > Performance, then click Clear cache. That is enough for most template, translation and configuration changes.

Advanced Parameters > Performance with the Clear cache button
Performance page, the Clear cache button and cache controls.

When a change still does not appear, clear the deeper layers in the right order: PrestaShop files first, then OPcache, then any CDN, Varnish or full-page cache in front of the shop.

# Run from the PrestaShop root. This deletes cache contents, not the cache directories themselves.
find var/cache/prod -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +
find var/cache/dev -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +

# Older PS 1.6-style installs may also use these Smarty paths:
find cache/smarty/compile -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +
find cache/smarty/cache -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +

# Reset web OPcache by reloading the PHP service:
sudo systemctl reload php8.2-fpm

# Apache/mod_php alternative:
sudo systemctl reload apache2

Do not rely on a CLI-only opcache_reset() command unless you know CLI and web PHP share the same OPcache pool. On normal PHP-FPM hosting, reloading PHP-FPM is the reliable reset. After a server-level clear, make sure the web-server user can write the cache directories again; wrong ownership after a root-level cleanup is a common cause of new 500 errors.

The common mistake is clearing only the back-office cache and assuming OPcache or a reverse proxy followed. They do not. If you want cache warming and CDN purge automation instead of doing this by hand, Performance Revolution includes cache warming and CDN purge logic, and Redis Cache Manager & Monitor helps manage a Redis cache backend.

Was this answer helpful?

Related products

Performance Revolution
€299.00
★ ★ ★ ★ ★

Still have questions?

Can't find what you're looking for? Send us your question and we'll get back to you.

Loading...
Back to top