Install and run DokuWiki the most versatile Wiki on a CentOS 7 VPS

Install and run DokuWiki the most versatile Wiki on a CentOS 7 VPSIn the following article, we’ll explain how you can install and run DokuWiki on a CentOS 7 server. We support DokuWiki running on all our SSD VPS hosting plans and with our DokuWiki hosting stack, you’ll get DokuWiki pre-loaded on your virtual server, making your wiki up and running in no-time.


What is DokuWiki?

DokuWiki is considered to be the most versatile open source Wiki software application which is proven to meet your demanding wiki needs.

DokuWiki does not require a database and it’s extremely simple and easy to use. Its features are available here.

System Requirements?

  • Webserver such as Apache, Nginx etc..
  • PHP server version 5.2 or later
  • PHP-GD / Image Magick library



Before proceeding with the actual DokuWiki installation, ssh to your CentOS 7 SSD VPS, initiate a screen session and upgrade your system using yum:

## screen -U -S dokuwiki-screen
## yum update



Install some useful packages on your CentOS SSD powered virtual server:

## yum install wget unzip vim



In this set-up we are going to serve DokuWiki using the Apache 2.4 webserver, so install Apache on your CentOS 7 using the following yum command:

## yum install httpd openssl mod_ssl

Once installed, restart Apache and add it to automatically start on your system start-up using:

## systemctl restart httpd
## systemctl status httpd
## systemctl enable httpd

Now let’s configure some extra Apache options, for example, hide its version number, its banner etc… by adding the following to /etc/httpd/conf.d/options.conf

## vim /etc/httpd/conf.d/options.conf

TraceEnable off

## Disable Signature
ServerSignature Off

## Disable Banner
ServerTokens Prod

Test Apache configuration file and restart the webserver for the changes to take effect:

## apachectl configtest
## systemctl restart httpd
## systemctl status httpd



Since DokuWiki relies on PHP, we have to add PHP support to the Apache webserver by installing the following packages:

## yum install php php-gd

Although DokuWiki operates with the default PHP settings, it is recommended to tune your PHP configuration (php.ini) as described here. At least you should edit your /etc/php.ini and set the following:

## vim /etc/php.ini

expose_php = Off

restart Apache using systemctl for the changes to take effect:

## systemctl restart httpd
## systemctl status httpd

Test if PHP module is loaded in Apache using:

## httpd -M | grep php


## php -v



We’ll use to access the DokuWiki installation, so we would have to create an Apache Virtual Host directive. So, create /etc/httpd/conf.d/vhosts.conf and add the following:

## cat /etc/httpd/conf.d/vhosts.conf

# Load my vhosts
IncludeOptional vhosts.d/*.conf

This tells Apache, to load the configuration files ending with .conf which reside in /etc/httpd/vhosts.d. As you can guess, this is the place where we put the Virtual Hosts, so let’s set-up one for

## mkdir /etc/httpd/vhosts.d
## vim /etc/httpd/vhosts.d/

<VirtualHost YOUR_SERVER_IP:80>
    DocumentRoot "/var/www/html/dokuwiki"
    ErrorLog "/var/log/httpd/"
    CustomLog "/var/log/httpd/" combined

    <Directory "/var/www/html/dokuwiki/">
        DirectoryIndex index.php
        Options FollowSymLinks
        AllowOverride All
        Require all granted

restart apache for the changes to take effect:

## systemctl restart httpd
## systemctl status httpd



First thing to do is to go to DokuWiki’s download page and download the latest stable version of DokuWiki.

## wget -P /tmp

once the archive is downloaded, extract it to /var/www/html using:

## tar zxf /tmp/dokuwiki-de8b19be26a1d74ba5bd5e075dbb7996.tgz -C /var/www/html

set-up proper ownership using the chown command:

## chown apache: -R /var/www/html/dokuwiki

and open in your favorite browser to initiate the DokuWiki installer. You should get something like this:


once you complete the installer, you can safely remove the install.php script located withing your DokuWiki document root in /var/www/html/dokuwiki

## rm -f /var/www/html/dokuwiki/install.php



Now you have your DokuWiki up and running, so you may want to check its manual at and also learn more about its syntax at


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 Apache and DokuWiki. 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.

Tips and Tricks
Basic MySQL database administration on a Linux VPS
Install Craft CMS on CentOS 7
How to install Pimcore on Ubuntu
  • belen


    Author Reply

    Great doc!

  • Murat


    Author Reply


    I used these instructions, now I am having permission issues :(

    DokuWiki Setup Error

    The datadir (‘pages’) at ./data/pages is not found, isn’t accessible or writable. You should check your config and permission settings. Or maybe you want to run the installer?

    • admin


      Author Reply

      Please check the file and directory permissions of your DokuWiki installation.

Free Migration to RoseHosting. Award Winning Linux VPS Hosting with Fully Managed Support. Coupon RHBLOG50 for 50% offOrder Now