(:title PmWiki Installation :) (:Summary: Obtaining and installing PmWiki:) (:Audience: administrators (basic) :) This page explains how to download and install PmWiki 2.1 and 2.2. Here's a list of related pages: * [[Requirements]] - {Requirements$:Summary} * [[Upgrades]] - {Upgrades$:Summary} * [[Wiki Farms]] - {WikiFarms$:Summary} * [[Change Log]] - {ChangeLog$:Summary} '''Improvements''' to these instructions are always appreciated. Just report any problems you encounter to the pmwiki-users [[mailing list(s)]] or use the [[PITS:PITS |PmWiki Issue Tracking System]]. !! Installing PmWiki If you upgrade, please read the page [[Upgrades]] and [[Release notes]]. !!! 1. Download Download the latest ''stable'' version of PmWiki as a * zip archive ([[(http://pmwiki.org/pub/pmwiki/)pmwiki-latest.zip]]), or a * gzipped tarball ([[(http://pmwiki.org/pub/pmwiki/)pmwiki-latest.tgz]]) from [[http://pmwiki.org/pub/pmwiki/]], or Download the latest ''beta'' version from the [[PmWiki:Subversion]] page. !!! [[#unpack]] 2. Unpack Unpack the archive ([@tar zxvf pmwiki-latest.tgz@] or [@unzip pmwiki-latest.zip@]). This will create a ''pmwiki-x.y.z'' directory containing the PmWiki software. For example, the current "latest" should unpack to a directory named ''{$Version}''. The files in this directory include: >>pre<< README.txt An introductory document pmwiki.php The main PmWiki script local/ Configuration scripts (local configuration files) cookbook/ Recipes (add-ons) from the [[(Cookbook:)Cookbook]] docs/ Brief documentation, sample configuration scripts pub/ Publicly accessible files pub/css/ Extra CSS stylesheet files '^[[PmWiki/Skins#further|#]]^' pub/guiedit/ pub/skins/ Layout templates for [[http://www.pmwiki.org/wiki/Skins/Skins|custom]] look and feel scripts/ Scripts that are part of PmWiki wikilib.d/ Bundled default PmWiki pages >><< The ''pmwiki-x.y.z'' directory needs to be placed into a location accessible by your webserver (e.g., in a ''public_html'' directory of some sort). You can place files and directories using a number of methods -- FTP, or a Unix [@mv@] or [@cp@] command generally does the job. ->%note% Note: It is recommended to change the "''pmwiki-x.y.z''" directory name to be simply "''pmwiki''" or just "''wiki''". !!! [[#directories]] 3. Create directories [[#dirsetup]]In most cases PmWiki will do this for you. Open a web browser to the ''pmwiki.php'' script on the server (i.e., not the one on your local computer or accessed using a [=file://...=] URL). PmWiki will then analyze your system configuration and provide instructions (if needed) for creating the ''wiki.d/'' directory which will be used to hold the pages created for your site. Otherwise, there are two ways to achieve this. (Use %newwin%[[http://filezilla-project.org/download.php|Filezilla]] or [[http://winscp.net/eng/download.php|WinSCP]] to change FTP file/folder permissions.) ->3a. You can create the ''wiki.d/'' directory manually, and then give it full write permissions (i.e., "[@chmod 777 wiki.d@]"). Use this method when "safe mode" is activated in the server's PHP installation. ->3b. On some systems you can let PmWiki create ''wiki.d/'' by temporarily changing the permissions on the directory containing the ''pmwiki.php'' file to 2777. In Unix this is commonly done by changing to the directory containing ''pmwiki.php'' and executing the command ->@@chmod 2777 .@@ ->(note the dot at the end). The [@chmod@] command also works in many FTP programs. Creating ''wiki.d/'' in this manner will (1) make the directory writable so the web server can create the data directory it needs for the wiki files, (2) preserve group ownership of the directory so the installer account can manipulate the files created in this directory, and (3) make it more difficult for other accounts on the same server to access the files in ''wiki.d/''. After establishing directory permissions, try opening a browser to the ''pmwiki.php'' script again. If all is well, the ''wiki.d'' directory will have been created and you'll see the default home page. %red%'''Important:''' If you used method 3b, you should reset permissions by executing "[@chmod 755 .@]" in the directory containing pmwiki.php.%% See also [[FilePermissions]]. [[#dirsetupend]] !!! 4. Initialize Check out [[Initial Setup Tasks]] for other tasks you may want to perform to begin customizing your PmWiki installation. You might also want to peruse the [[Release Notes]] for further information. !!! 5. Set language If you want to use PmWiki in a different language download the [[Internationalizations|international]] language pack as zip archive ([[(http://pmwiki.org/pub/pmwiki/i18n/)i18n-all.zip]]) from [[http://pmwiki.org/pub/pmwiki/i18n/]]. Then extract it and copy the files into the ''wikilib.d/'' directory as described above. Besides the ''-all'' file you can also download your country localization file only. Languages available are: (:pagelist fmt=#listlanguage name=PmWiki* list=normal order=$:Language $:Language=- :) (:if false:) [[#listlanguage]] (:template first:) -> (:template each:) [[{=$Group}/{=$Name} | {=$:Language} ]] [[#listlanguageend]] (:ifend:) There are two directories in the decompressed i18n archive, ''scripts'' and ''wikilib.d''. Copy the files respectively contained in these directories to the ''scripts'' and ''wikilib.d'' of your PmWiki directory. For example, for French localization, PmWikiFr.* and PmWiki.* must be contained in the '''same''' directory. Then, enable localization by adding an instruction to local/config.php to load the language translation page of your choice. For instance, [@XLPage('fr','PmWikiFr.XLPage');@] loads the French language page PmWikiFr.XLPage. Read more about this on [[Internationalizations]]. !! [[#notes]] Notes * [[#indexphp]] The PmWiki distribution deliberately doesn't include an ''index.php'' file. You can easily add your own "wrapper script" in the same directory as ''pmwiki.php''. Create a new file called ''index.php'' with the following single line of text (missing a closing "[@ ?>@]" tag deliberately): -->[@>faq<< [[#faq]] Q: Should I rename pmwiki.php to index.php? A: Renaming pmwiki.php is not recommended. Instead, create an ''index.php'' file that contains this single line ->[@[@