It's better when it's simple

User Tools

Site Tools


This is an old revision of the document!

Command Line Tools

DokuWiki comes with a few PHP scripts meant to be executed from the (UNIX) commandline of the DokuWiki server. All those scripts are located in the <yourWiki>/bin/ directory.

Note: In order to be able to use these scripts you need the PHP CLI interpreter installed on the system.

There are two ways to run the scripts. You can either make them executable:

$> chmod +x <script>.php
$> ./<script>.php

or run them as follows (recommended):

$> /path/to/php <script>.php


Note: There have been problems reported with some plugins that rely on ACLs and authentication or the DokuWiki event system.

Usage: dwpage.php [opts] <action>
  Utility to help command line DokuWiki page editing, allow
  pages to be checked out for editing then committed after changes
  Normal operation would be;
      checkout: see $ dwpage.php --help=checkout
      commit: see $ dwpage.php --help=commit
      lock: see $ dwpage.php --help=lock
      -h, --help=<action>: get help
          e.g. $ ./dwpage.php -hcommit
          e.g. $ ./dwpage.php --help=commit


Allows you to update the search index.

Usage: indexer.php <options>
  Updates the searchindex by indexing all new or changed pages
  when the -c option is given the index is cleared first.
      -h, --help     show this help and exit
      -c, --clear    clear the index before updating
      -q, --quiet    don't produce any output

This needs to be run as the appropriate user and possibly the right directory to work. e.g. www-data in ~www-data Under debian lenny


Usage: wantedpages.php [wiki:namespace]
  Outputs a list of wanted pages (pages which have
  internal links but do not yet exist).
  If the optional [wiki:namespace] is not provided,
  defaults to the root wiki namespace
      -h, --help get help


Allows you to remove unwanted language files from an installation.

Usage: striplangs.php [-h [-x]] [-e] [-k lang1[,lang2]..[,langN]]
  Removes all languages from the installation, except the ones
  after the -k option. English language is never removed!
      -h, --help     get this help
      -x, --examples get also usage examples
      -k, --keep     comma separated list of languages, -e is always implied
      -e, --english  keeps english, dummy to use without -k
cli.1348355704.txt.gz · Last modified: 2012-09-23 01:15 by

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki