Caches & Indexes

Please note that this article is only for users of a self-hosted store. This is not relevant for users of a Shopware 6 Cloud environment.

In the module Caches & Indexes you are able to empty and warm up the cache. It also gives you an overview of some system configurations.

Configuration overview

In the overview you will get the information whether your shop is used in productive mode. This is indicated by the entry "Production" in the Environment (1).
You can also see here whether the HTTP cache is active (2) and which cache adapter (3) is used.

You can adjust the environment mode and HTTP cache in the .env file in the Shopware main directory.
For more information on how to customize the environment settings, click here.


activated. (=0) deactivates the cache.

Manage Caches & Indexes

In the lower part of the module you have different functions for the cache and the indexes.

  • Clear caches (4)
    This can be used to empty the caches without having to reheat them directly afterwards.
    This is also available in the console.

    php bin/console cache:clear
  • Clear and warm up caches (5)
    First a new cache is created. The old cache is removed after the new cache has been created.

  • Indexes (6)
    Updates the indexes such as the category and product indexes and the SEO URLs.
    In the console, this can be done using the command

    php bin/console dal:refresh:index

    Use the dropdown menu (7) to select all indices that should not be updated when updating indices.

Empty cache automatically

In Shopware 6 Standard the cache is not cleared automatically. In the long run, this can lead to the Shopware installation becoming larger and larger and requiring more and more space on the server.

To clear the cache of the shop manually you can use the Shopware CLI. How to use the Shopware CLI you can also find here.
To clear your cache you can use the following command in the Shopware CLI:


php bin/console cache:clear

On a live system, we recommend that after clearing a cache, you also warm it up again. You can warm up the cache with the following command:


php bin/console http:cache:warm:up

So that these commands do not have to be executed manually at regular intervals, we recommend executing them via cronjob once a day. This should be executed when the traffic on the shop is at its lowest. This can then always be done at night, for example. How you can set up a regular cronjob on a Linux server, for example, can be found here.

If the cache can not be deleted via the Shopware CLI command, you can try to delete the cache folders manually with the following command:


rm -rf SHOPWARE-ROOT-FOLDER/var/cache/*

Was this article helpful?