Modifying config.phpWhen you first install Pm Wiki, the local/config.php file does not exist. Copy the sample-config.php file (in the same directory as pmwiki.php) to local/config.php and use it as a starting point. You could create local/config.php from scratch, but sample-config.php is already populated with many of the options you might want to adjust.
Here is a simple config.php file:
<?php if (!defined('PmWiki')) exit(); $WikiTitle = "My New Wiki"; $PageLogoUrl = "http://www.example.com/mylogo.gif"; $DefaultPasswords['admin'] = crypt('onesecret'); $EnableUpload = 1; $DefaultPasswords['upload'] = crypt('secrettwo'); putenv("TZ=EST5EDT"); $TimeFmt = '%B %d, %Y, at %I:%M %p EST';
<?php. The PHP end tag
?>is optional, and can be left off to improve compatibility with some operating systems. Be sure there aren't any blank lines or spaces before the
<?phpor after any closing
?>, or else you may get strange PHP error messages at the beginning of your wiki pages.
The config.php file above sets the value of four PHP variables used by Pm Wiki:
$WikiTitlevariable gives the name of your site as it will appear in a user's browser title bar.
$PageLogoUrlvariable specifies the URL of the icon image that will appear in the upper-left corner of each wiki page.
- The $DefaultPasswords['admin'] sets an administrative password.
$EnableUploadto "1" enables Uploads ("Attached files"). $DefaultPasswords['upload'] sets an upload password.
- The TZ environment variable defines a particular time zone.
$TimeFmtvariable defines the appearance of time strings and (along with TZ) localizes the wiki to a specific time zone.
Setting an administrative password
The pages in the Site group (except the Site.Side Bar) are locked by default. In order to edit pages in this group you need to create a site-wide admin password in local/config.php. To set the site-wide admin password to "
mysecret", change the line to the following:
$DefaultPasswords['admin'] = crypt('mysecret');
crypt()function, but set the password to a value with meaning for you. See PasswordsAdmin for details about making the password more secure.
Don't modify pmwiki.php
When changing the configuration of your site, always change the local/config.php file or add files to the cookbook/ directory. Do not change pmwiki.php or the files in the scripts/ directory. Pm Wiki has been designed so that all customizations can be made without changing the distribution files -- one of its design goals is to provide seamless upgrades. Pm Wiki never writes to files in the local/ or cookbook/ directories, so placing your customizations here makes it easier to track the changes and upgrade PmWiki without losing the changes.
You shouldn't rename pmwiki.php either. Many admins add an index.php file in the pmwiki directory that contains the following single line:
After setting up local/config.php file, you may wish to make other local customizations. See the PmWiki Cookbook for a large number of customizations that have been contributed. And don't fear Cookbook recipes - they're well prepared, so that most of them require only to download a single file, add a one-line include command to
config.php, and voilà! - they're working!
If you (or others sharing your server) want to maintain more than one wiki on the same server, see WikiFarms.
Don't forget to join a PmWiki mailing list, where you can email other wiki administrators for help on customizing Pm Wiki and participate in discussions about Pm Wiki improvements. Once you have your site operational, be sure to add it to PmWiki:PmWikiUsers so others will know about it!