PMWiki 101

<- SpecialTopics


Install Apache & PHP on Linux

1. yum install httpd
   systemctl start httpd.service
   systemctl enable httpd.service
   Test http://localhost
2. yum install php
   systemctl restart httpd.service
   systemctl enable php.service
3. Create Test File
   vi /var/www/html/pi.php 
   <?php phpinfo(); ?>
4. Test


Set privs as shown below as needed:

chown -R apache:apache /var/www/html
chmod -R 757 /var/www/html

PMWiki Getting Started

Download software from here.

On Linux

mkdir /var/www/html/MyWikiDir


  - Create Logo Image.
  - unzip to D:\sw\PMWiki\pmwiki-latest\pmwiki-n.n.nn
  - Use FileZilla to copy ...\pmwiki-n.n.nn\* to Linux systems  /var/www/html/MyWikiDir
  - Copy Logo Image to /var/www/html/MyWikiDir/pub/skins/pmwiki

On Linux

cd /var/www/html/MyWikiDir/docs
cp sample-config.php /var/www/html/MyWikiDir/local/config.php


Common Initial Changes

Edit /var/www/html/MyWikiDir/local/config.php

 $WikiTitle = 'MyTitle';
 $PageLogoUrl = "$PubDirUrl/skins/pmwiki/MyLogo.png";

 Physical dir for image file:

 # Set Links Default to Open in New Tab (add this to end of file)
 $UrlLinkFmt = "<a class='urllink' href='\$LinkUrl' rel='nofollow' target='_blank'>\$LinkText</a>";

 # Enable CSS line-height
 $WikiStyleCSS[] = 'line-height';

To disable link behavior for specific links use %target=_self% in front of the link.

Create root web page forwarding file (index.html).

<meta http-equiv="refresh" content="0;url=http://MySiteURL/MyWikiDir/pmwiki.php">


Rename pmwiki.php to index.php

Password Protect Site

Place at top of file: /var/www/html/MyWikiDir/local/config.php

# Custom Changes: Start ###############
$DefaultPasswords['read'] = pmcrypt('MySitePW');
# Custom Changes: End   ###############


$DefaultPasswords['admin'] = pmcrypt('MySitePW');
$DefaultPasswords['upload'] = pmcrypt('MySitePW');

Commonly Installed Cookbooks


Enable Uploads

  1. Create an uploads dir under wherever pmwiki.php found. Note lower case.
  2. Make required changes to config.php
# Uploads Cfg
$DefaultPasswords['upload'] = pmcrypt('MySitePW');
$EnableUpload = 1;
$UploadPermAdd = 0;
$UploadPrefixFmt = ''; #Cfg for site-wide uploads
$UploadMaxSize = 1000000; # Upload Max File Size: 1mb=1000000, 25mb=25000000 etc.

# To find path use PHP Variable (pi.php): _SERVER["APPL_PHYSICAL_PATH"]
# Ex: D:\home\\wwwroot\
# Then from that:
#$UploadDir = "D:\home\\wwwroot\app\mp3\uploads";
#$UploadUrlFmt = "";

Note: Ensure your PHP installation allows uploads. The php.ini file needs file_uploads = On.

Example: Attach:chuck.jpg

Show All Uploaded Files: (:attachlist:)

Clean Table Look

237636507/06/17This is a test.
234413003/24/17This is another test.

Form Controls: ASCII




Form Controls: HTML


Standard Callouts


 >>note      fullwidth border='1px solid DarkGray' font-size=small<<
 >>important fullwidth border='1px solid DarkGray' font-size=small<<
 >>warning   fullwidth border='1px solid DarkGray' font-size=small<<

 <warning|important|tip> border='1px solid gray'

Custom Changes: <Hn> Values

Custom HTML <Hn> changes from the base install.

  • Get a color swatch for site.
  • Edit /var/www/html/oradocs/pub/skins/pmwiki/pmwiki.css as shown:
#h1, h2, h3, h6 { font-weight:normal; }

h1 { font-size:2em;    font-weight:bold; color:#0d0221;}
h2 { font-size:1.5em;  font-weight:bold; color:#0f084b;}
h3 { font-size:1.15em; font-weight:bold; color:#26408B;}
h4 { font-size:.85em;  font-weight:bold; color:#a6cfd5;}
Set the color: values to match your swatch.
  • Edit /var/www/html/oradocs/pub/skins/pmwiki/pmwiki.tmpl
Change this line:
<h1 class='pagetitle'>{$Title}</h1></div>

to this:
This ensures page title uses your <Hn> swatch value.

Enabling Javascript

   <script language="JavaScript">
       alert("Thanks to PM for that markup.");

Smaller Text Block

>>frame background-color=#eeeeee border='1px' font-size=smaller padding=0px width=500<<

Ei labore minimum quaestio quo. Ut vel docendi tibique, vix in quem meis
menandri, no eam labore invenire patrioque. Eu eum consul suscipiantur, 
mel ea soluta libris. Tollit laudem vim no. Aliquid intellegam voluptatibus
ad cum, lorem populo iracundia ut mei. Salutandi facilisis necessitatibus
in quo, aeque gloriatur eum an, laboramus voluptaria eu sea.