WikkiTikkiTavi keeps around old versions of each page. If you click on "View document history" at the bottom of each page (or click on "history" in RecentChanges) you'll see these old versions. Keeping old versions around for a while is a good idea, since it allows you to recover from spam and vandalism, and it also allows you to compare the latest version to see what people have written lately.

But keeping everything around permanently is generally a bad idea. Even if you have plenty of room in your database, it violates the principle of meatball:ForgiveAndForget?. Wikis live in the permanent meatball:WikiNow?, and a bureaucratic record of every single edit is not necessary (unless, perhaps you use your wiki in a development environment and need permanent ISO quality records).

Therefore, WikkiTikkiTavi normally expires these old versions when they get beyond a certain age. This is configured by the $ExpireLen configuration variable in lib/defaults.php. By default, the expiration period is set to 14 days. This means that, once an old version has been kept for 14 days, it will be deleted.

If all of a page's old versions have expired, and the page itself is empty, then the page is deleted from the database altogether. (See HowToDeletePages for more details.)

$ExpireLen may be set to 0. In this case, old versions will never be expired, and empty pages will never be deleted. Again, this is not recommended unless considerations such as business process demand it.


When? How? see lib/pagestore.php function maintain() which is called via lib/main.php

Can I set ExpirationPeriod page by page? i.e An admin can force some pages to be keep forever, and the rest pages are keep in a normal time period which is set in the config.php

Nope! That option is a global option. --EvenHolen
It is interesting and useful if Tavi can do so. --AaronLaw

Why Tavi not keeps the last 2 pages in History for recovery if the second last page is out of ExpirationPeriod? Is it a bug? --AaronLaw

Although 'Tavi is not programmed to save at least two old versions, this is a very good idea! If this feature were implemented, it would simplify the maint() procedure so that it only had to be run whenever a page is saved, and would only try to maintain old versions of that page. --Qualidafial