This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » General » Bulk delete all archived versions of...

Bulk delete all archived versions of content objects

Bulk delete all archived versions of content objects

Sunday 01 February 2015 2:05:40 pm - 3 replies


is there a way to bulk delete all archived versions of all content objects from the database (and file storage, in case of images/files)? I don't want to generally disable versioning, I just would like a onetime  script that removes all old versions before copying a site to the live enviroment.

Thanks in advance,

Modified on Sunday 01 February 2015 2:06:22 pm by Reinhard Hutter

Sunday 01 February 2015 4:59:24 pm

flatten.php sounds like the answer:

Monday 16 February 2015 6:12:28 pm

Hi there! How about removing the archived version of the content objects of only a specific class (e.g article)?

Tried by passing a class identifier...

 bin/php/flatten.php -s eng article

..but, of course, it didn't work ;P

As possible value: contentobject, contentclass, workflow, role or all, but I need for only one class.

Is that possible?

Tuesday 17 February 2015 3:51:14 am

Hello Lo F,

You could re-implement the flatten php cli script but otherwise ... no.

I re-implemented the image alias generation / removal functionality to be much more flexible (just like your asking for actually) with bcimagealias extension so I know what you want can probably be done but you will have to do the work. 

Here is a key to your getting started:

I hope this helps!


Modified on Tuesday 17 February 2015 3:54:15 am by // Heath


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from