Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.


Provide an action to remove the page revision history from a page. Also allows expiring only portions of the history older than a given number of days.




This script adds ?action=expirediff, which removes all of the page revision history information from a wiki page. It requires the user to have edit permissions to the page, and handles locking. It also creates a backup copy of the page with the page revisions intact (same as if someone had requested to delete a page).

In addition, one can add the keepdays=nn parameter, which says to keep any page history within the past nn days. For example, ?action=expirediff&keepdays=7 will remove any page history older than seven days. By default keepdays is zero, which expires the entire page history.

To install this script, simply copy it into your local/ subdirectory, and then add the line


to your local/config.php file.

See Also


pmwiki-2.3.25 -- Last modified by {{Pm}}

from IP: ip should be disabled by default for security reasons