25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

Need help?

Our experts have had an average response time of 11.43 minutes in March 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

How to clear cache in Prestashop manually & from backoffice

by | Oct 22, 2018

“None of my store changes are visible! What’s wrong? Is it Prestashop cache?”

We see support requests like this everyday as part of our Outsourced Tech Support for web hosting providers.

Prestashop store owners would make a change to the code or change the theme, but the site would still show the old content or layout.

What’s going wrong?

Today we’ll take a quick look at the common causes for old cache issue in Prestashop and how our Support Engineers fix them.

 

Where is stale cache of Prestashop found?

We’ve seen primarily three areas where Prestashop stale cache is found.

 

1. Browser

One way to increase site speed is to ask browsers to cache big files like JS, CSS and images for a very long time.

This is done using a server setting called “Expires“. With this, a site owner can ask browsers to store files for a few days or even years.

We’ve seen sites configured to ask browsers to store cache for 6 months.

So, in such sites no amount of browser refresh will show the updated site layout.

 

2. Website folders

This is what we all commonly see and hear about.

Prestashop compiles template files into single easily accessible files, and stores in the Smarty cache folders.

Sometimes, the cache clearing operation from Prestashop backoffice fails, and the old files remain in the cache.

 

3. Web server or web proxies

Some web servers employ caching systems like Varnish and Nginx to improve response times.

Similarly, some site owners use corporate web proxies that cache site content.

In these two cases, no amount of cache clearing on the website will fix the stale cache issue.

 

How to clear cache from Prestashop backoffice

The easiest way to clear cache is using the Prestashop backoffice.

From Prestashop 1.4 onwards, the backoffice has a feature to delete cache files stored by Smarty.

 

Flushing cache in Prestashop 1.4

Login to back-office and go to Preferences –> Performance –> Force compile and choose “Yes“.

This will generate new files and replace the old ones.

Once you’ve seen the new page, set the “Force compile” back to “No“.

 

Flushing cache in Prestashop 1.5

PS 1.5 follows a similar process, just that the settings are in a different place.

Login to admin area and go to  Advanced Parameters –> Performance –> Force compile and choose Yes.

Once you see the new page, change this setting back to “No“.

 

Clearing cache in Prestashop 1.6 and Prestashop 1.7

Login to admin panel, and go to Advanced Parameters –> Performance –> Template compilation” and choose “Force compilation.

Then in Cache choose “NO“.

You can also clear it by clicking on the “Clear Cache” button on right-top corner.

Prestashop clear cache

 

Manually clearing Prestashop cache

Now, we’ve seen cases where this cache clearing from the admin area doesn’t quite work.

In such cases, we delete the cache files from back end.

Here’s how to do it.

 

Deleting cache in Prestashop 1.3 and 1.4

Prestashop 1.3 and 1.4 had similar website files structures. So, the cache files are located in these locations.

Go to these folders and delete all files in them.

  • /tools/smarty/cache
    • OR /tools/smarty_v2/cache
  • /tools/smarty/compile
    • OR  /tools/smarty_v2/compile

 

Deleting cache in Prestashop 1.5, 1.6

Every Prestashop version after 1.4 has the same folder structure.

Go to these folders and delete all files in them..

  • cache/smarty/compile
  • cache/smarty/cache
  • img/tmp

In Prestashop 1.7

Similarly, in version Prestashop 1.7, we clear all folders and files in /var/cache/ directory. Prestashop will regenerate it automatically.

That usually does the trick when we fix this issue for our customers.

 

Still not working? Maybe it’s the server or proxy cache

Despite clearing all the site cache, if you are still seeing old site version, the cache would be in any of these locations:

  • Browser – To check this possibility, try accessing from another browser or by turning on “incognito mode”.
  • Server – The server could be caching the old site version. In such cases, we clear the server cache, and reload the site. If you have root access to the server, you can do it yourself.
  • Proxy – If you are behind a corporate firewall and proxy, you may want to check with your local network administrator.

 

Conclusion

Prestashop showing old site version is a common error we face in our Server Support Services for web hosts. Here we’ve listed down the top 3 causes for Prestashop to show stale cache, and how to fix them.

 

 

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

SEE SERVER ADMIN PLANS

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

6 Comments

  1. John

    In Prestashop 1.7, I need to switch off Twig caching so that I can carry out template modifications without having to clear the entire cache set after each edit.

    There is a Smarty control section in the back office, but nothing for Twig.

    Any ideas?

    Reply
    • Sijin George

      Hello John,
      Disabling Twig caching needs manual modification. Our Prestashop experts can help you. We’ll be happy to talk to you on chat (click on the icon at right-bottom).

      Reply
  2. Josh

    For PS 1.7 it’s not correct. The caches are in /var/cache/. It would be nice if you can correct your article.

    Thanks.

    Reply
    • Sijin George

      Hello Josh,
      Thank you for the tip. Updated the article content.

      Reply
  3. Ricky

    Mine is v 1.6 and i tried above
    none of them is working in my case

    Reply
    • Arya MA

      Hi Ricky,

      Do you still get issues with clearing cache? If you still find problems, we’ll be happy to talk to you on chat (click on the icon at right-bottom).

      Reply

Submit a Comment

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

Categories

Tags

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF