Johannes Thönes

Software-Developer, ThoughtWorker, Permanent Journeyman, Ruby Enthusiast, Java and Devils Advocate.

A Ruby Script for Upgrading Multiple DokuWiki Installations

After DokuWiki has been released multiple times in the last few days because of security problems, I though it was a good time, to write a little script for automatically updating multiple instances. You can find the ruby script at

The ruby script basically automates the upgrade instructions from the DokuWiki main page. So the following actions are performed when executing the script:

  1. Making a backup into /tmp/dokuwiki_backup_#{timestamp} of every installation.

  2. Downloading the dokuwiki release (passed in as a parameter).

  3. Extracting the files and copying everything to the installations (execept for the content of the /data directory).

  4. Creating missing folders in the /data directory, making the owner www-data:www-data and chmodding them to 664.

  5. Deleting files from a list of file from older revisions.

Within the script you need to specifiy this snipped for setting your DokuWiki installations:

# Definition of existing installation

Then you can call for a new release as follows:


If you want to improve the script, feel free to fork me on Gist.