DokuWiki on a USB Stick in 2024

If you want to run DokuWiki (Latest version) from a portable device like an USB stick on any Windows computer without installing anything on the computer itself – this guide is for you!

Current version – March 2024 – TESTED and working on Windows 11 Pro

First of all download DocuWiki distro from it official website https://download.dokuwiki.org/

docuwiki

I prefer to use “Stable” version. Do not check “MicroApache” box. We don’t need it because it will not work in Windows 10 “out of the box”, we will use the server that comes with the php instead. You can add plug-ins of you choice if you want to.

Next step is to download php-8.3.3-nts-Win32-vs16-x64.zip (it have build-in webserver) – https://windows.php.net/download/releases/

docuwiki

Download the non-thread-safe version!

That’s all we need for success 🙂

Next steps:

  1. In your personal storage space or on your USB stick, create a folder called “Wiki” or whatever you want to call it.
  2. Create this Windows batch file docuwiki.cmd in the new “Wiki” folder:
    @echo off
     
    set app_root=%~dp0
    set PATH=%app_root%\php;%PATH%
     
    set ext_path=%app_root%\php\ext
    set ini_path=%app_root%\php\php.ini
     
    cd /d "%app_root%\dokuwiki"
     
    php -c "%ini_path%" -d extension_dir="%ext_path%" -S 127.0.0.1:900
  3. Extract the dokuwiki folder from that archive to your “Wiki” folder. If the “dokuwiki” folder has a version number in it, rename it to just “dokuwiki”.
  4. Extract the downloaded PHP for Windows Zip file to a new “php” folder under your “Wiki” folder. (example: copy All php-8.3.3-nts-Win32-vs16-x64.zip content to php folder)
  5. Download this php.ini file, extract it from Zip archive and put it in your “Wiki\php” folder.
  6. Now you should have a “Wiki” folder like this:
    Wiki
    ├── dokuwiki.cmd
    ├── php
    │   └── [PHP system]
    │   └── php.ini
    └── dokuwiki
        └── [DokuWiki installation]
  7. Run docuwiki.cmd
    It will start PHP’s built-in web server running on port 900. In your browser, go to http://127.0.0.1:900/install.php.
    Complete the setup wizard with your desired settings. I prefer to set it up as a “closed” wiki requiring me to login, just to be safe.
  8. Your wiki home page now is http://127.0.0.1:900/doku.php
  9. Here are some more optional things you can do to configure a nice wiki setup: Go to your Extension Manager page on the Admin screen and install the indexmenu extension (by Samuele Tognini, Gerrit Uitslag). Go to the the Configuration Settings page on the Admin screen and set the following options:
    breadcrumbs = 0
    youarehere = true
    useheading = Always
    userewrite = DokuWiki internal
    useslash = true
    plugin → indexmenu → skip_index = /(^wiki$|^playground$)/
    plugin → indexmenu → skip_file = /(^sidebar$)/

    Create a page called “sidebar” in the root namespace with this code in it:

    {{indexmenu>..#1|js navbar nocookie id#random}}

    If you’re not sure how to create a page, one way would be to type “sidebar” in the search box, click “Search” and then click the “Create this page” button on the right.

    If you’re new to DokuWiki, please take the time to read the manual or watch the intro videos.

  10. Enjoy!

LEAVE A REPLY

Please enter your comment!
Please enter your name here
Captcha verification failed!
CAPTCHA user score failed. Please contact us!

Stay in the Loop

Get the weekly email from TechLifeTravel that makes reading the news actually enjoyable. Join our mailing list to stay in the loop to stay informed, for free.

LATEST ARTICLES