Installation and configuration

This revision is from 2008/12/22 20:52. You can Restore it.

The only software requirement for LionWiki is PHP installation. Recommended is PHP5, but LionWiki (without plugins) works also on PHP4 (tested on PHP 4.3.4).


Download LionWiki from Home page, you have to options — either core LionWiki (just one file) or full featured LionWiki with plugins.


Copy all the files in the archive to some directory on your FTP account. On this account, change permissions of directories "history" and "pages" (and create them if they doesn't exist yet) so that everybody can write into it ("0777"). And that's it. Just try if it's working in your web browser.


Configuration options are located in file _config.php. If you don't have _config.php file, edit index.php, configuration options are same there.

  • $WIKI_TITLE is name of your Wiki site
  • $PASSWORD is password needed to write to pages (optionally to see pages). If left blank, no password is required to write (or read) pages.
  • $USE_AUTOLANG is set true, LionWiki tries to detect default language from visitor's browser
  • $LANG is language code of language you want to use. Not all languages are supported, take a look into lang/ directory and see if your is supported. In case of some problem, english is used.
  • $TEMPLATE is path to template

These were options you should change. Following are mostly for tweaking purposes:

  • $PASSWORD_MD5 is secure way to store password with MD5 one way encryption. If not set $PASSWORD is used.
  • $PROTECTED_READ - if you want to protect pages not only from editing but also from seeing by unwanted visitors, you can set this variable to true. It's particularly useful when writing your private notebook or journal.
  • $HISTORY_COMPRESSION - can contain three possible values - "plain" (no compression), "gzip" and "bzip2". Default is gzip because it's in every PHP installation and has reasonable compression ratio. Best results can be achieved with "bzip2" but it's not provided in every PHP installation. You can switch values anytime, LionWiki has no problem working with mixed history (one revision compressed, second not compressed etc.).
  • $NO_HTML - optional XSS protection, prohibits use of {html} tag. Default is off, it's useful only when site is protected by password.
  • $USE_META - if set false, LionWiki doesn't use Edit summary and IP info, i.e. no meta.dat files are saved and if they exist, they're not used
  • $USE_HISTORY - if you want to disable history tracking (it's enabled by default), you do it by setting this variable to false
  • $START_PAGE is page used as a starting point.
  • $HELP_PAGE is page containing informations on syntax of LionWiki
  • $COOKIE_LIFE_WRITE - contains time in seconds during which is user "logged on" and doesn't have to enter password. Default value is 1 year.
  • $COOKIE_LIFE_READ - same as with $COOKIE_LIFE_WRITE, but this applies when $PROTECTED_READ is true. Default value is 4 hours.

And that's all. Further configuration options can be found in Plugins.


There are some plugins in default installation, you can see list of them and their description here. They are located (by default) in directory "plugins". The only way to activate/deactivate them is to copy them there/delete them, that means that all the plugins located in this directory are active.

Some plugins need to write to some files — these are located in plugins/data, this directory should be kept writable (chmod 777).

Stripping your installation(Edit)

To run LionWiki you need only index.php (core LionWiki file) and directory "pages" (with properly set permissions). All the other files and directories can be deleted. index.php contains minimal template which isn't very pretty, but is functional, so you can delete template file(s) if you want. If you delete directory "history", you won't be able to see past revisions of pages, obviously. The same goes with plugins directory. If you want to get rid of _config.php file, just delete it and set the default values in index.php (they are comfortably placed at the beginning of the file). Engli