[pmwiki-users] Config/upgrade question

Patrick R. Michaud pmichaud at pobox.com
Fri Aug 25 20:23:15 CDT 2006


On Sat, Aug 26, 2006 at 12:49:59AM +0100, David Goadby wrote:
> Like a lot of PmWiki users I just use it in it's as-delivered form and
> rarely get too deeply involved. For me it does what it says on the tin.

Darn.  I want it to do more than what it says on the tin.  :-) :-)

> However, I do like to keep up to date with the upgrades and here is my
> problem - unless I am missing something: I change a few of the settings in
> pmwiki.php (default group, default name etc) and also a few items in
> \local\config.php. How do I preserve my settings in such a way as the
> upgrade can be done without having to re-edit the config files afterwards?

Well, you shouldn't have to modify anything in pmwiki.php itself --
most anything can be changed by an appropriate setting in a local
configuration file.  And if it's not, let us know so we can make it
that way.

In particular, one can change the default group and default name
in local/config.php without having to modify pmwiki.php.  Simply
put the $DefaultGroup and $DefaultName settings into the 
local/config.php file, and they'll override whatever default
value is in pmwiki.php.  The same is true for other most other
variables in the PmWiki scripts, as well as most recipes.

The upgrade process itself has been carefully designed to make it
possible to upgrade PmWiki without losing local changes.  
In fact, one of the biggest reasons I created PmWiki was because
other wiki engines all seemed to require modifications to the 
distribution files, and I would end up losing my changes on 
every upgrade.

Thus, the PmWiki distribution never modifies any files in the local/,
cookbook/, or pub/css/ directories.  (It also leaves wiki.d/ and
uploads/ intact.)  So, as long as any configuration changes you 
make are limited to files in those directories, it's quite
safe (except under Mac OS/X) to simply copy a new version of PmWiki
on top of your existing version.  And if something doesn't work out,
one can generally revert to the previous version via the same process.
That's how it's designed to work, and many on the list can tell you
that it works well.  It's certainly how I maintain my various wikis.

Still, it's always a good idea to have a complete backup before
doing any form of upgrade.  :-)

So, if you let us know what sorts of changes you've been making
to the distribution, we can tell you how to do it in a local/config.php
or other configuration file such that you won't lose your changes
the next time you upgrade.  

Hope this helps,

Pm




More information about the pmwiki-users mailing list