Mass delete old page versions

Permalink
Hi,

I have a site that has a lot of pages, and each page sometimes has a lot of old versions (as it was being developed) and I would like to prune out all old page versions to see if it makes any difference to page load times which are a bit slow at the moment.

Is there a way to delete old page versions without having to put each and every page in to edit mode, etc...?

 
juboco replied on at Permalink Reply
juboco
...Bump...

Same question. Anyone know the answer?
Mnkras replied on at Permalink Reply
Mnkras
it would not affect page loading speed at all
jordanlev replied on at Permalink Reply
jordanlev
I agree with Mnkras that this *probably* won't affect page load speeds (unless you're talking tens or hundreds of thousands of pages). BUT just in case, here's a thread with some code for creating a job that deletes all pages of a certain type that were added before a certain date:
http://www.concrete5.org/community/forums/usage/delete-pages-after-...

You will need to modify that code slightly, for example you probably want to take out the filter for only applying to 1 section of the site. And you might want to put it somewhere other than a job -- or at least make sure you delete the job when you're done so it doesn't accidentally get triggered again in the future.

Hope that helps.

-Jordan
Zudane replied on at Permalink Reply
I am also curious about this... I have played with the code linked to (also my thread) but I cannot get it to do old versions.

All pages on my site are approved, I would assume to filter by isApproved - although when set to true I get all pages, when set to false I get no pages.

I'm thinking a normal page list may not be the right way to do this because we don't want to delete the page, only the versions of it.



By the way, I am looking for this because editing default page types and using "Setup on Child Pages" uses each page based on its initial name, not its current name - so copied pages carry the name of the page it copied from.