Troubleshooting

PrestaShop 1.6, the cache directory uses too much space

Reviewed on 2 min read cache disk usage PrestaShop

Archived document. These paths belong to PrestaShop 1.6, an unsupported branch that should not be kept as a public shop. PrestaShop 1.7 and later use var/cache; see Excessive space usage in var/cache.

In PrestaShop 1.6, cache/cachefs, cache/smarty/compile and cache/smarty/cache hold different kinds of generated cache. A large cache directory does not tell you which one is growing or why.

Temporary recovery

  1. Measure those three paths separately and note which one grows between two checks.
  2. First use Advanced Parameters > Performance > Clear cache. Also review the configured caching system before automating clean-ups.
  3. If the back office does not work, create and verify an external backup, put the shop in maintenance mode and delete only the generated content of the confirmed path. Keep the directories, their permissions, owner and protective index.php files.
  4. Check the storefront, back office, images, orders and logs before reopening.

Do not move entire directories to a quarantine inside public_html: it can expose generated files and does not free space if it stays on the same hosting. Do not schedule a periodic clean-up either until you have identified the subdirectory that is growing and fixed or documented the cause.

Plan the migration to a maintained version of PrestaShop. A recurring clean-up only mitigates the disk usage of the old installation.

Keep the shop's value when migrating

As well as products and orders, prepare an inventory of URLs, images and redirects so that the upgrade keeps the pages that receive visits and links. Test payment, shipping and email modules with dummy data before changing the public site.

This guide helps you recognise the paths of the old installation. Do not carry its clean-up procedure over to another version just because it also has a folder called cache; first identify which files each component generates.

You may also find useful

Something wrong or out of date? Tell us and we will review it.