User Tools

Site Tools


dokuwiki

This is an old revision of the document!


Upgrading DokuWiki

Note: if you installed DokuWiki through your Linux Distribution's package manager (eg. using a Debian or Fedora package) or similar tools you should also use this tool to upgrade your DokuWiki. Descriptions on this page are meant for standard, manual installations as described on the install page only.

DokuWiki is very simple to upgrade. Its file layout is organized in a way that avoids overwriting any user content, which means an upgrade generally is just unpacking a new version on top of an old one. You should first try the simple instructions given here, if you encounter problems or the instructions are not detailed enough for you, read the details in the section below.

  • Step 1: Make a backup of your DokuWiki, this is not necessarily needed but recommended.
  • Step 2: Read the changelog to see if there are any special things to consider
  • Step 4: Unpack the distribution tarball and upload/copy the files over your previous installation. Make sure to overwrite all files when prompted.
  • Step 7: Wait for a day for update notifications to go away, or speed the process by following the steps in Update Check.

Note: We explicitly recommend overwriting your old installation. If you adhered to the advice of defining config options in *.local files only (the Configuration Manager does this automatically) your previous config settings will not be overwritten. The same is true for all your pages and media files. Using the overwrite approach will save you a lot of trouble with keeping page revisions correctly working as these are depending on file modification time-stamps.

Removing Unused Files

When a new DokuWiki version is released, some of the files that were needed previously may become obsolete. Keeping these files is harmless usually but they might pose a security risk or break installations later, so we recommend to delete them.

A list of all files that were removed in recent releases can be found in data/deleted.files. You should check if they still exist in your install. If they do, delete them.

You can also see the current list at https://github.com/splitbrain/dokuwiki/raw/stable/data/deleted.files

Using RemoveOld Plugin

To remove old files from DokuWiki's Admin menu you can also use the RemoveOld plugin.

Using a Script

People with shell access to their server can use a script to automatically delete all old files.

Linux Shell

This simple line should work on any Linux system:

# grep -Ev '^($|#)' data/deleted.files | xargs -n 1 rm -vf

*nix Shell

Some systems may not support the “rm -d” option for directory removal. In that case, you have to use recursive removal (just be sure to double-check that the file list does not include any paths that will delete too much):

# grep -Ev '^($|#)' data/deleted.files | xargs -n 1 rm -fr

Other scripts and implementations can be found in https://www.dokuwiki.org/install:unused_files

Troubleshooting

The following pages should give you hints on common post-upgrade problems:

  • caching – purge the cache if things look strange or error messages appear
  • updatecheck – if update notifications persist
  • toolbar – Quickbuttons and JavaScript problems
  • searchindex – if search box gives you no result

If you get errors about missing/non-writable directories, you probably didn't read the changelog carefully enough. When upgrading to Angua you need to create two new directories and make them writable:

  • data/media_attic
  • data/media_meta

Upgrade plugin

You can upgrade your Dokuwiki installation using Upgrade Plugin. This plugins require internet connection on the server you have hosted DokuWiki.

This plugin adds a new option to your admin interface called “Wiki Upgrade”. Follow the wizard and upgrade your wiki to the most current stable release of DokuWiki in just a few steps.

Note: this plugin needs write access to all your DokuWiki files, not only files inside data. If you installed DokuWiki through the DokuWiki Downloader, permissions should be fine already. Don't worry though. The plugin will check for needed permissions before doing the real upgrade process.

Note: If you install this plugin manually, make sure it is installed in lib/plugins/upgrade/ - if the folder is called different it will not work!

Resources

dokuwiki.1438091649.txt.gz · Last modified: 2020/04/10 17:38 (external edit)