How to update DokuWiki from the command line

When dealing with a lot of DokuWiki clients/sites, it’s easier to update the installations via the command line. DokuWiki doesn’t use MySQL databases, so the update consists only in downloading the new version and extracting the files. make a backup before starting the update.

To update DokuWiki from the command line:

1. Log into your server via SSH

2. Download the latest DokuWiki installation. The URL is https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz. If you want to customize the install go to https://download.dokuwiki.org/ and generate the download link. The link will look like https://download.dokuwiki.org/out/dokuwiki-b6722f2a5dc53ff8b034cb88737aabc2.tgz

3. Download the archive

wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz

4. Extract the files. The files will be extracted to the /dokuwiki-xxxx-xx-xx/ directory

tar zxvf dokuwiki-stable.tgz

5. Copy the extracted files to the DokuWiki path (xxxx-xx-xx is the date of the latest stable release):

cp -R dokuwiki-xxxx-xx-xx/* /PATH_TO_DOKUWIKI/

Example (if the command will ask to overwrite a file, the answer will be automatic ‘yes’):

yes | cp -R dokuwiki-2020-07-29/* /home/plothost/domains/demo.plothost.com/public_html/

We offer DokuWiki web hosting plans at affordable prices. All plans come with free DokuWiki support. DokuWiki consulting services included – we will assist you to install any plugins/templates, update and customize the installation.
DokuWiki hosting @ https://www.plothost.com/dokuwiki-hosting/

Leave a Reply