Delete previous versions of ALL pages/content
Permalink 2 users found helpful
Hi All
I'm developing a C5 site, and would now like to make it "live" (transfer to an external host etc)
Is there away to remove the change histories that I've accumulated during development, so that once live only "real" changes will be saved/recorded
I'm developing a C5 site, and would now like to make it "live" (transfer to an external host etc)
Is there away to remove the change histories that I've accumulated during development, so that once live only "real" changes will be saved/recorded
not easily at this time
Okay...if it's not easy can you or someone else at least give us the name of the tables involved in storing old revision content so that we might figure out how to do our own deletion?
It's ridiculous that an entire history of page and block revisions while developing a site will go right on up to the live site along with the content we want on the site.
What a bloated mess.
Carlos
It's ridiculous that an entire history of page and block revisions while developing a site will go right on up to the live site along with the content we want on the site.
What a bloated mess.
Carlos
Ya I have the same problem, but I'm still in development! I can't even start fresh with a theme anymore. The whole project is basically ruined. Going to WP tomorrow probably this is so fail.
The solution is more one of organisation of the project before you start. I have been working with 3 or 4 installations for each project:
Development - play with ideas, make my mistakes, leave lots of unused versions.
Offline Stage and/or Online Stage - Install successful ideas, write content. No playing about because this will be moved or copied to the final site.
Final Site - what it says, no playing, no risks, just finished content copied or moved from the stage(s) when I am ready to go live.
At various points I copy the stage(s) back to the development, but I never copy development forward. When I am ready to go live, the online stage gets cleaned up and copied or moved forward to the live site.
Development - play with ideas, make my mistakes, leave lots of unused versions.
Offline Stage and/or Online Stage - Install successful ideas, write content. No playing about because this will be moved or copied to the final site.
Final Site - what it says, no playing, no risks, just finished content copied or moved from the stage(s) when I am ready to go live.
At various points I copy the stage(s) back to the development, but I never copy development forward. When I am ready to go live, the online stage gets cleaned up and copied or moved forward to the live site.
Thank you JohntheFish, that kind of answers my question but I'm really
asking how to delete all kinds of versions to start fresh... they don't make
it easy but I think I figured it out about 2:30 this morning.
Thanks for the feedback,
TB
asking how to delete all kinds of versions to start fresh... they don't make
it easy but I think I figured it out about 2:30 this morning.
Thanks for the feedback,
TB
For a fresh start the easy option is to reinstall.
Once you have a clean install with your basic configuration, make a database backup. You can then simply replace the database with the backup to always get back to that point without having to do a clean install.
Same goes for backups at various stages of development.
PS, just re-read your post, maybe what you meant by start fresh was to remove version history for each page, not start fresh with C5. You can only do that on a page by page basis, but at least you can select all old versions of a page and delete them in one go.
Once you have a clean install with your basic configuration, make a database backup. You can then simply replace the database with the backup to always get back to that point without having to do a clean install.
Same goes for backups at various stages of development.
PS, just re-read your post, maybe what you meant by start fresh was to remove version history for each page, not start fresh with C5. You can only do that on a page by page basis, but at least you can select all old versions of a page and delete them in one go.
Hmmm...very interesting.
Now that I have a whee bit more experience using C5 and mucking around with it under the hood so to speak...me thinks this might make for a good plugin.
May I suggest (in answer to my own question posted above in a previous message here) that a way to delete past revisions might lie through the following...
1. With a fresh install of C5, add a page. Call it junk or whatever you want.
2. Do a MySQL dump of the database and store it in a file.
3. Publish and then edit the page to create some revision.
4. Do a MySQL dump of the database and store it in a different file.
Now use Meld (a software program) available under Linux to compare the two data dumps.
The differences will point out which database tables are affected by a revision history being stored in the database.
Go in manually and delete all such revisions created and stored for the given page id created above.
Then run C5 for a bit, kick it's tires, make sure nothing breaks or otherwise runs weird and voila! Goodbye useless revision history (useless if one doesn't want it of course).
A PHP script could be written to loop through each page in your site and delete all revision history.
That's what I will personally do as time permits. If I perfect the above process...I'll make a plugin (or external PHP script that runs on the database to clean it up) out of it.
Carlos
Now that I have a whee bit more experience using C5 and mucking around with it under the hood so to speak...me thinks this might make for a good plugin.
May I suggest (in answer to my own question posted above in a previous message here) that a way to delete past revisions might lie through the following...
1. With a fresh install of C5, add a page. Call it junk or whatever you want.
2. Do a MySQL dump of the database and store it in a file.
3. Publish and then edit the page to create some revision.
4. Do a MySQL dump of the database and store it in a different file.
Now use Meld (a software program) available under Linux to compare the two data dumps.
The differences will point out which database tables are affected by a revision history being stored in the database.
Go in manually and delete all such revisions created and stored for the given page id created above.
Then run C5 for a bit, kick it's tires, make sure nothing breaks or otherwise runs weird and voila! Goodbye useless revision history (useless if one doesn't want it of course).
A PHP script could be written to loop through each page in your site and delete all revision history.
That's what I will personally do as time permits. If I perfect the above process...I'll make a plugin (or external PHP script that runs on the database to clean it up) out of it.
Carlos
Hi Carlos,
I think you might be on to something here - at least until C5 comes up with a real solution
I think you might be on to something here - at least until C5 comes up with a real solution
This is very interesting, but the way I do it (which I have yet to have complaints) is go through all pages/files and only keep the latest version. Then go to the CollectionVersions in the database and change the cvID to 1 and change the cvcomments to "Initial Version", check cvIsApproved, and verify cvAuthorUID, cvApproverUID is 1.
I started a threadhttp://www.concrete5.org/community/forums/customizing_c5/organising...
to catch just such tips as yours, but it seems to have got lost too far down to be noticed over the weekend.
to catch just such tips as yours, but it seems to have got lost too far down to be noticed over the weekend.
still not easily at this time ?
my site not live yet, but already have 5300+ block version, do not know how to clean this all
my site not live yet, but already have 5300+ block version, do not know how to clean this all
In 5.6.1.2 I was able to clear out all old versions by running a slightly modified version of the 'Remove Old Page Versions' job.
Cool, but too bad you did not share your solution...
Wow, thank you so much, John! An add-on like that has been on my personal wish-list for a long time! That tool works perfectly, thanks for your work, thanks for providing it for free!
Cheers,
Michael
Cheers,
Michael
In case anyone is interested in doing it manually, have a look here:
http://www.concrete5.org/community/forums/usage/clear-out-version-h...
http://www.concrete5.org/community/forums/usage/clear-out-version-h...
@okapi - the solution was actually in a thread you posted on ages ago ;)
You're right, i'm sorry, i didn't remember.
Actually i was looking for an add-on, because i was afraid of messing up the database...
For a handy solution, i'm happy with John's add-on now.
Actually i was looking for an add-on, because i was afraid of messing up the database...
For a handy solution, i'm happy with John's add-on now.
:)
Please reinstall concrete5 ....this is best option..
Once you have install with normal configuration, make a database backup(It's very important). You can then simply replace the database with the backup to always get back to that point without having to do a fresh install.
But versions are must be same because older versions has less tables than latest version
Once you have install with normal configuration, make a database backup(It's very important). You can then simply replace the database with the backup to always get back to that point without having to do a fresh install.
But versions are must be same because older versions has less tables than latest version
I think if you just want to delete old versions of pages then John's fine add-on or the manual method probably is less disruptive
"Extreme clean" by JohntheFish totally fits my needs (delete ALL page versions) and is very easy to use. So for me, it's the best option.
A bit late, but try this:http://www.concrete5.org/marketplace/addons/list-of-all-page-versio... Brought this to marketplace about 1 month ago.
cheers
Thomas (aka dausi)
cheers
Thomas (aka dausi)