How to install DokuWiki on Debian Wheezy with Nginx

dokuwikiDokuWiki is very simple to use open-source wiki software that doesn’t require a database and it is mainly aimed at creating documentation of any kind.
To install DokuWiki on a virtual server with Debian Wheezy follow the very easy steps described below. The installation instructions should apply to any Debian based server with Nginx and PHP-FPM installed on it.


Make sure your Debian VPS is up-to-date:

apt-get update
apt-get upgrade

‘apt-get update’ will refresh your package list so it’s all up to date, then the upgrade will upgrade any packages that have newer versions.

Install Nginx and PHP-FPM using the following command:

apt-get install nginx php5-fpm php5-cli php5-mcrypt php5-gd

Download and unpack the latest version of DokuWiki available at :

cd /root
wget -O dokuwiki.tgz
tar -xvf dokuwiki.tgz

Create a new Nginx server block. For example, create a new Nginx configuration file to the ‘/etc/nginx/sites-available’ directory:

vi /etc/nginx/sites-available/

and add the following content:

server {
listen 80;
root /var/www/;
access_log /var/log/nginx/;
error_log /var/log/nginx/;

index index.php index.html doku.php;
location ~ /(data|conf|bin|inc)/ {
      deny all;
location ~ /\.ht {
      deny  all;
location ~ \.php {
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

Create a symbolic link using the following command:

ln -s /etc/nginx/sites-available/ /etc/nginx/sites-enabled/

Restart the Nginx web server for the changes to take effect:

/etc/init.d/nginx restart

Move the DokuWiki installation files to the document root directory defined in the Nginx server block above:

mv /root/dokuwiki-* /var/www/

The webserver user (www-data) needs to be able to write to ‘data’ , ‘conf’ and ‘lib/plugins/’ directories, so you can easily accomplish that by executing the following command:

chown -R www-data:www-data /var/www/

Open in a web browser. Enter the following information: your site name, username, password and email address for the admin user, then click ‘Save’.

Once the installation is complete, our recommendation is to install ‘captcha’ and ‘preregister’ plug-ins in order to protect the registration against spam bots which create a huge amount useless fake users.

install dokuwiki

Delete the install script:

rm /var/www/

That is it. The DokuWiki installation is now complete.

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install DokuWiki for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.


How to Install Linux Dash on an Ubuntu VPS with Nginx and Password Protect it
How to Install Plone 4 CMS on Debian Wheezy with Nginx
Install and run DokuWiki the most versatile Wiki on a CentOS 7 VPS
There are currently no comments.