How do I install PmWiki?

CETS also offers MediaWiki. If you are unsure which to choose, please visit the "How do I set up a wiki?" article.

  1. Make sure CGI is enabled on Fling or Alliance for the account where you want to install PmWiki. Visit the CGI Request Form if you do not yet have CGI enabled.
  2. Once you have CGI enabled, connect to the account on Eniac via the command line.
  3. Run the following command to install PmWiki:
    install-pmwiki
    Note: If you have a wiki directory in your html directory already, you will need to either move it aside or delete it completely before installing PmWiki.
  4. The script will prompt you for your admin password.
  5. Accessing your wiki over the Internet for the first time by executing the index.php file will automatically create a wiki.d directory in your wiki directory. The wiki will store content in there as the wiki gets edited over time.

    If you have CGI activated on Fling, visit:
    http://fling.seas.upenn.edu/~username/wiki/index.php

    If you have CGI activated on Alliance, visit:
    http://alliance.seas.upenn.edu/~username/wiki/index.php

    (Where username is the SEAS account name where you are installing PmWiki.)

How to Change the Wiki Admin and Edit Passwords

Edit the following lines in your wiki/local/config.php file:

<?php
$DefaultPasswords['admin'] = crypt('newadmin-password');
$DefaultPasswords['edit'] = crypt('newedit-password');
?>

Additional Custom Configuration Options for your Wiki

To customize your wiki you will need to do the following:

Change the title of your wiki

Add the following to your config.php file:

## Title of this wiki
$WikiTitle = 'New Wiki Site Title';

You can use this config file to change many other things about your wiki including the logo image, create different user controls and permissions, themes, etc. For more information on custom configuration options, please see the pmwiki.org documentation. When doing custom configurations, please check to make sure your permissions are set correctly.

Creating more than one instance of PmWiki

You can create as many instances as you want of PmWiki by creating subdirectories within your wiki directory. For example, copy the contents of your wiki directory into the ~/html/wiki/wiki1/ subdirectory. Then do the same thing again for ~/html/wiki/wiki2/. Repeat as many times as desired.

How to Include HTML markup in wiki pages

By default PMWiki does not support HTML markup in wiki pages. Follow the instructions on this page to enable HTML. There are a few items not fully explained in the article that you will need to know:

  1. You will need to create a directory called "local" in your wiki directory (you may have already done this if you followed the instructions above). Make sure it is only read/write/executable by the owner (chmod 700).
  2. Within the "local" directory, create a directory called "cookbook" with the same permissions as "local". Put your "enablehtml.php" file (as described in the article) in this directory.
  3. Create a "config.php" file within your local directory (you may have already done this if you followed the instructions above). Make sure this file is not world readable.
  4. Add these lines to your "config.php" file:
    <?php
    include_once("cookbook/enablehtml.php");

    EnableHtml('img|br|hr|h1|h2|h3|h4|h5|p|a');
    EnableHtml('b|i|u|sup|sub');
    EnableHtml('ul|ol|li');
    EnableHtml('table|tr|td');
    ?>

    This enables most basic html tags. You may want to add or remove tags from the lists above depending on what you want your users to be able to do.

Warning: Be aware what types of tags you allow. Certain tags, like <script> and <meta>, can give users dangerous amounts of control over your pages.

© Computing and Educational Technology Services | Report a Problem
cets@seas.upenn.edu | 215.898.4707