matthewkp/ez-clean-up-versions

This tools clean ups all versions from all content in eZ Platform

1.0.1 2016-12-09 23:48 UTC

README

This script will remove old versions of all contents for eZ Platform.

Works on eZ Platform version > 1.6 as it uses the new PermissionResolver service introduced in ezpublish-kernel v6.6.

Install Package

composer require matthewkp/ez-clean-up-versions

Register Bundle

// app/AppKernel.php

class AppKernel extends Kernel
{
    ...
    public function registerBundles()
    {
        ...
        $bundles = array(
            ...
            new Matthewkp\EzCleanUpVersionsBundle\MatthewkpEzCleanUpVersionsBundle(),
            ...
        );
        ...
    }
}

Add in crontab

// /etc/cron.d/<your_cron_file>
0 0 * * * <user> cd <your_site_path> && php app/console matthewkp:ez-clean-up-versions --env=<ENV> > 2>&1

Configure

Edit Resources/config/default_settings.yml as you wish