User Tools

Site Tools


dokuwiki:upgrade_dokuwiki

This is an old revision of the document!


DokuWiki - Upgrade DokuWiki

Make a backup of your DokuWiki

tar zcpfv dokuwiki-backup.tar.gz /path/to/dokuwiki

This will create the dokuwiki-backup.tar.gz backup.


Check for changes

Read the changelog to see if there are any special things to consider


Download the new version

Download the newest release from the download site.

cd ~
wget http://.../dokuwiki-xxxx-xx-xx.tgz

Unpack the distribution tarball

tar zxvf dokuwiki-xxxx-xx-xx.tgz

Upload/copy the files over your previous installation

Make sure to overwrite all files when prompted.

'cp' -af dokuwiki-xxxx-xx-xx/* /path/to/dokuwiki/

The quotes on cp assure that it will run as is, even if an alias is set.


Check copied files ownership and permissions

<?php
 
if(function_exists('posix_geteuid')){
    // use posix to get current uid and gid
    $uid   = posix_geteuid();
    $usr   = posix_getpwuid($uid);
    $user  = $usr['name'];
    $gid   = posix_getegid();
    $grp   = posix_getgrgid($gid);
    $group = $grp['name'];
}else{
    // try to create a file and read it's ids
    $tmp = tempnam ('/tmp', 'check');
    $uid = fileowner($tmp);
    $gid = filegroup($tmp);
 
    // try to run ls on it
    $out = `ls -l $tmp`;
    $lst = explode(' ',$out);
    $user  = $lst[2];
    $group = $lst[3];
    unlink($tmp);
}
 
echo "Your PHP process seems to run with the UID $uid ($user) and the GID $gid ($group)\n"; ?>

Delete all unused files

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

Upgrade your template and plugins

Upgrade your template and plugins if necessary.


References

dokuwiki/upgrade_dokuwiki.1583691980.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki