Global navigation

   Documentation Center
   eZ Studio & eZ Platform
     User Manual
     Technical Manual
   eZ Publish 4.x / legacy

eZ Publish (5.x)

eZ Publish 5.x | For eZ Platform & eZ Studio topics see Technical manual and User manual, for eZ Publish 4.x and Legacy topics see eZ Publish legacy

Skip to end of metadata
Go to start of metadata

This page describes commands involved in clearing cache from the command line, these commands runs on a web server level.

Cluster note

On Cluster (Setup with several web servers) these commands needs to be executed on each and every web server!
The exception is Content Cache, which in a cluster is shared between each server using Memcached/Varnish/Redis/.. to allow cache to be cleared on content updates.

The Symfony cache:clear command

Out of the box Symfony provides a command to perform cache clearing. It will delete all file based caches, which mainly consists of Twig template, Symfony container, and Symfony route cache. However as it deletes everything in folder ezpublish/cache/<environment>/* this also implies Symfony Proxy being deleted if you use that for Symfony HTTPCache (the default single sever choice) as opposed to Varnish, and eZ Persistent Cache unless you use Memcached. 

For information of use, see the help text of the command:

Integration with Legacy


The Symfony cache:clear command is extended via Legacy (Bundle/Bridge) to also clear legacy cache.

Prior to version 5.3.5 and 5.4.2 the command cleared all default cache items in legacy, however as of these releases (see EZP-24048) this is now like the Symfony command itself deleting only code related caches, and not content related caches. Specifically the following legacy cache "tags" are now cleared:

  • template
  • ini
  • i18n

For further info on other cache clearing options in legacy see below.

Clearing Content Cache via legacy ezcontentcache command


For Cluster setups or other setups where Varnish and/or Memchached is used, the legacy cache clearing command can be used to delete content cache both in legacy, and in Platform stack thanks to ViewCache integration in Legacy Bundle/Bridge.

For using it make sure you use ezpublish:legacy:script, like this:

For example of use, execute help command above, and/or see legacy documentation on clearing ViewCache.


  • No labels


  1. Unknown User (ernestob)

    The last command is wrong

    $ php ezpublish/console ezpublish:legacy:script bin/php/ezcontentcache.php --legacy-help 
    Running script 'bin/php/ezcontentcache.php' in eZ Publish legacy context
    bin/php/ezcontentcache.php: invalid option `--legacy-help'
    Try `bin/php/ezcontentcache.php -h' for more information.

    Switching the order in the given parameters works

    $ php ezpublish/console ezpublish:legacy:script --legacy-help bin/php/ezcontentcache.php