Summary: How to store backup files of deleted pages in a separate directory
Version: 2011-10-26
Prerequisites: Last tested on PmWiki version: pmwiki-2.2.26
Maintainer: floozy
Users: +2 (View / Edit)
Discussion: PageAttic-Talk


The wiki.d/ directory can get crowded if many pages are deleted, especially in conjunction with the ExpireDiff recipe. How to store the backup files of deleted pages in a separate directory?


  • Put a copy of the pageattic.phpΔ script into your cookbook/ directory.
  • Create a new wiki.attic/ subdirectory in your pmwiki folder, and provide it with write permissions (same procedure as for the wiki.d/ directory).
  • Add the following lines to your local/config.php file:
 $WikiDir = new AtticPageStore($WikiDir->dirfmt);


The location of the attic directory can be controlled by setting the $AtticDir variable in your local/config.php file:

    $AtticDir = 'wiki.trash';

The directory is relative to the location containing the main pmwiki.php script, and should be specified without any trailing slash.


  • floozy, 2006-01-29, Initial version
  • anomen, 2011-10-26, minor fixes


See discussion at PageAttic-Talk

User notes +2: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.