Question answered by this recipe
PmWiki saves its pages in flat files -- Is there any way to store those files in compressed (gzip) format?
The pagestoregz.phpΔ script defines an alternate storage mechanism for storing pages as compressed files in the wiki.d/ directory. To use this script, simply place it in your cookbook directory and add the following lines to local/config.php:
There's no need to convert or modify your existing pages; pagestoregz.php can read existing (uncompressed) pages without any difficulty. As pages are edited and saved, they will be then be saved as compressed files in wiki.d/. Please make sure the above cookbook script is loaded before other scripts or localization files, otherwise changed localizations will not display.
If you want to read compressed files and save them uncompressed, just add the following line to local/config.php
$EnablePageStoreGZ = 0;
If you want to compress or uncompress all of your files at once add the following line to local/config.php:
Depending in the state of $EnablePageStoreGZ all your files are compressed or uncompressed.
By default compressed files are reread and checked for size difference. If the difference is too high it is assumed that the saved file was corrupted or something else went wrong. You'll then get a message that saving was not possible. As this consumes some time you can switch off this behaviour by setting the following value. But be careful! Once a file is corrupted you are not able to restore it (except from a backup).
$EnablePageStoreVerify = 0; // Disables verification of saved compressed file
See discussion at CompressedPageStore-Talk