[[howto:desktop:setup-a-portable-dokuwiki-instance-in-windows]]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

howto:desktop:setup-a-portable-dokuwiki-instance-in-windows [2018-08-05 04:25]
howto:desktop:setup-a-portable-dokuwiki-instance-in-windows [2018-08-05 04:25] (current)
Line 1: Line 1:
 +~~META:
 +creator = Brendan Kidwell
 +&date created = 2014-05-23
 +~~
 +{{tag>​dokuwiki notebook portable windows}}
 +~~DISCUSSION~~
 +====== Setup a Portable DokuWiki Instance in Windows ======
 +
 +[[http://​dokuwiki.org/​|DokuWiki]] is a great wiki engine with minimal requirements that usually gets used to build small public web sites and teams' documentation collections. It's also a good place to keep your personal notes.
 +
 +This howto will show you the quickest way to get DokuWiki up and running in Windows, with a portable launcher script that should work even if the project'​s path changes (as it would on a thumbdrive).
 +
 +{{::​dokuwiki-notebook-example.png?​direct&​400|}}
 +
 +===== Create the Project Folder and Launcher =====
 +
 +In your personal storage space or on your thumbdrive, create a folder called "​Notebook"​ or whatever you want to call it.
 +
 +Create this Windows batch file in the new folder:
 +
 +<file dos run-dokuwiki.cmd>​
 +@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:​9003
 +</​file>​
 +
 +===== Install PHP =====
 +
 +Download the **non-thread-safe** version of PHP for Windows from [[http://​windows.php.net/​download/​|windows.php.net/​download/​]]. Extract the Zip file to a new "​php"​ folder under your "​Notebook"​ folder.
 +
 +Download this {{::​php.ini.zip|php.ini}} file, extract it from its Zip file, and put it in your "​Notebook\php"​ folder.
 +
 +
 +===== Install DokuWiki =====
 +
 +Download the **stable** version of DokuWiki from the [[http://​download.dokuwiki.org/​|DokuWiki downloads]] page. Extract the dokuwiki folder from that archive to your "​Notebook"​ folder. If the "​dokuwiki"​ folder has a version number in it, rename it to just "​dokuwiki"​.
 +
 +===== Configure DokuWiki =====
 +
 +Now you should have a "​Notebook"​ folder like this:
 +
 +<​code>​
 +Notebook
 +├── run-dokuwiki.cmd
 +├── php
 +│   ​└── [PHP system]
 +└── dokuwiki
 +    └── [DokuWiki installation]
 +</​code>​
 +
 +Run <wrap file>​run-dokuwiki.cmd</​wrap>​. It will start PHP's built-in web server running on port 9003. In your browser, go to [[http://​127.0.0.1:​9003/​install.php|http://​127.0.0.1:​9003/​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.
 +
 +Your wiki home page is [[http://​127.0.0.1:​9003/​doku.php|http://​127.0.0.1:​9003/​doku.php]].
 +
 +Here are some more optional things you can do to configure a nice notebook setup:
 +
 +Go to your Extension Manager page on the Admin screen and install the <wrap file>​indexmenu</​wrap>​ extension.
 +
 +Go to the the Configuration Settings page on the Admin screen and set the following options:
 +
 +<code text>
 +breadcrumbs = 0
 +youarehere = true
 +useheading = Always
 +userewrite = DokuWiki internal
 +useslash = true
 +plugin → indexmenu → skip_index = /​(^wiki$|^playground$)/​
 +plugin → indexmenu → skip_file = /​(^sidebar$)/​
 +</​code>​
 +
 +Create a page called "​sidebar"​ in the root namespace with this code in it:
 +
 +<file text sidebar>
 +{{indexmenu>​..#​1|js navbar nocookie id#random}}
 +</​file>​
 +
 +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 [[https://​www.dokuwiki.org/​manual|read the manual]] or [[https://​www.dokuwiki.org/​screencast|watch the intro videos]].