How to Install DokuWiki on macOS

DokuWiki is a free and open-source Wiki software that is suitable for small as well as large organizations. It is built using PHP scripting language and doesn't require a database system to operate. This tutorial will guide you on how to install DokuWiki on macOS.

Prerequisites

Before starting with the installation process, make sure you have:

Step 1: Download DokuWiki

The first step is to visit the DokuWiki official website and download the latest stable release. Extract the downloaded file to your desired location.

Step 2: Configure Apache or Nginx server

Apache web server

  1. Open Terminal and enter the following command:

    sudo nano /etc/apache2/httpd.conf
    
  2. Add the following lines to the configuration file:

    Alias /dokuwiki /Applications/MAMP/htdocs/dokuwiki
    <Directory /Applications/MAMP/htdocs/dokuwiki>
       Options Indexes FollowSymLinks MultiViews
       AllowOverride All
       Order Allow,Deny
       Allow from all
    </Directory>
    

    Replace /Applications/MAMP/htdocs/dokuwiki with the path to the folder where you extracted the downloaded DokuWiki files.

  3. Save the file and restart Apache using the following command:

    sudo apachectl restart
    

Nginx web server

  1. Open Terminal and enter the following command:

    sudo nano /etc/nginx/nginx.conf
    
  2. Add the following lines to the http block:

    server {
       listen       80;
       server_name  localhost;
    
       location /dokuwiki {
          root   /Applications/MAMP/htdocs;
          index  index.php index.html index.htm;
          try_files $uri $uri/ @dokuwiki;
       }
    
       location @dokuwiki {
          rewrite ^/dokuwiki(.*) /dokuwiki/doku.php?id=$1 last;
       }
    
       location ~ \.php$ {
          try_files $uri /dokuwiki/doku.php =404;
          fastcgi_pass   127.0.0.1:9000;
          fastcgi_index  index.php;
          fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
          include        fastcgi_params;
       }
    }
    

    Replace /Applications/MAMP/htdocs with the path to the folder where you extracted the downloaded DokuWiki files.

  3. Save the file and restart Nginx using the following command:

    sudo nginx -s reload
    

Step 3: Install DokuWiki

  1. Open a web browser and enter http://localhost/dokuwiki/install.php in the URL bar.

  2. Follow the on-screen instructions to complete the installation process.

  3. Once the installation is complete, remove the install.php file from the DokuWiki folder.

Conclusion

Congratulations! You have successfully installed DokuWiki on your macOS system. You can now start using DokuWiki to document your projects and share knowledge with your team members.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!