(:Summary:First steps following a fresh installation:) (:Audience: administrators (basic) :) Once you have PmWiki running on your site (see [[Installation]]), you can customize it for your particular needs. Most PmWiki configuration is performed in files called ''local/config.php'' and ''pub/css/local.css''. Some configuration is done on special pages in the [[{$SiteGroup}/]] and [[SiteAdmin/]] groups, such as the [[{$SiteGroup}.SideBar]] menu. !! The local configuration file (''local/config.php'') When you first install PmWiki, the ''local/config.php'' file does not exist. Copy the ''sample-config.php'' file (in the ''docs/'' directory) 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: -> [@ @@ 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 @@@@, 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 PHP variables used by PmWiki: * The $WikiTitle variable gives the name of your site as it will appear in a user's browser title bar. * The @@$ScriptUrl@@ and @@$PubDirUrl@@ variables tell your wiki where it is located. Often pmwiki can guess, but if you have difficulty with links not working or skins not being found then try uncommenting these lines. * The $PageLogoUrl variable 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. * Setting $EnableUpload to "1" enables Uploads ("Attached files"). @@$DefaultPasswords['upload']@@ sets an upload password. * The TZ environment variable defines a particular time zone (see [[Cookbook:ChangeTimeFormat]]). If your site runs on PHP 5.1 or newer, it is recommended to use the function date_default_timezone_set, see below. * The date_default_timezone_set tells PHP what the default time zone is. For other ways to set the time zone, and a list of identifiers, see [[http://php.net/manual/en/function.date-default-timezone-set.php | the online PHP manual]]. * The $TimeFmt variable defines the appearance of time strings and (along with TZ) localizes the wiki to a specific time zone (see [[Cookbook:ChangeTimeFormat]]). By setting these (and other) variables in ''local/config.php'', you can change the look and feel of PmWiki from its default, sometimes substantially so. See [[PmWiki.Variables]] for a list of variables that PmWiki uses, and see PmWiki:PmWikiUsers for examples of sites that use PmWiki in customized ways. !!! Other common setup tasks The following [[variables]] are often requested when preparing a new wiki * Author required when editing a page @@$EnablePostAuthorRequired = 1;@@ * Set the $DefaultGroup These common [[(Cookbook:)Cookbook]] recipes are also often installed immediately * [[(Cookbook:)Clean Urls]] - Remove the @@?n=Group.Page@@ arguments from the end of URLs If you prepare an international wiki, potentially with characters in different alphabets (Cyrillic, Greek, Chinese) or many diacritical symbols (Czech + French), please look at [[PmWiki.UTF-8]] and Cookbook:UTF-8. !! Security Review and set up any [[security]] required. !!!Setting an administrative password The pages in the [[{$SiteGroup}/Site]] group (except the {$SiteGroup}.SideBar) 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'] = pmcrypt('mysecret');@] You must use the [@pmcrypt()@] function, but set the password to a value with meaning for you. See [[PasswordsAdmin]] for details about making the password more secure. !![[#dontmodify]]Don't modify or rename ''pmwiki.php'' PmWiki 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. PmWiki never writes to files in the ''local/'' or ''cookbook/'' directories, so placing your customizations here makes it easier to track the changes and [[upgrades | upgrade PmWiki]] without losing the changes. When changing the configuration of your site, always change the ''local/config.php'' file or add files to the ''cookbook/'' or ''pub'' directories. Do not change ''pmwiki.php'' or the files in the ''scripts/'' directory because the files are supposed to be overwritten upon upgrading. You shouldn't rename ''pmwiki.php'' either. If you rename the file it will not be overwritten during an upgrade of the software and there will be a version mismatch. Many administrators add an ''index.php'' "wrapper script" in the pmwiki directory that contains the following single line: ->[@