I'm a little bit confused about the license of DokuWiki. Can I use it on a commercial website?
The short answer is yes.
The one that is probably the one you are interested in, is the one for the software. It's the GNU General Public License (or shorter: GPL). This means (simply spoken):
You get some rights:
But you have to accept these terms:
The second license applies to all the content which is created at dokuwiki.org. It is licensed under the Creative Commons Attribution - ShareAlike license (abbreviation: CC-BY-SA).
See the FAQ on the Licenses.