How To Install DokuWiki on CentOS 8

Install DokuWiki on CentOS 8

In this tutorial, we will show you how to install Dokuwiki on CentOS 8. For those of you who didn’t know, DokuWiki is open-source software written in PHP that allows users to create and edit pages using a web browser. It works on plain texts and requires no database. Using a very familiar interface, allows you to easily scale and optimize using many advanced features.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of DokuWiki on a CentOS 8 server.


  • A server running one of the following operating systems: CentOS 8.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install DokuWiki on CentOS 8

Step 1. First of all, make sure that all packages are up to date.

sudo dnf update

Step 2. Installing LAMP Stack.

If you don’t have a LAMP stack already installed on your server, you can follow our guide here. Also, install required PHP modules, run the command below to install other required PHP extensions for DokuWiki:

sudo dnf install php-{spl,hash,ctype,json,mbstring,zip,gd,curl,xml,common}

Step 3. Installing Dokuwiki on CentOS 8.

Now, we go to the DokuWiki download page and grab the latest release version. You can simply run the command below to download the current stable release version of DokuWiki:

wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz

Once the download is complete, run the command below to extract DokuWiki:

tar xzf dokuwiki-stable.tgz  --strip-components=1 -C /var/www/html/

We will need to change some folders permissions:

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

Step 4. Configuring Apache for DokuWiki.

We will create Apache virtual host for your DokuWiki website. Now we create the following Apache configuration file:

sudo nano /etc/httpd/conf.d/dokuwiki.conf
<VirtualHost *>

        ServerName    dokuwiki.idroot.us
	DocumentRoot  /var/www/html

 	<Directory ~ "/var/www/html/(bin/|conf/|data/|inc/)">
	    <IfModule mod_authz_core.c>
        	Require all denied
	    <IfModule !mod_authz_core.c>
	        Order allow,deny
        	Deny from all

	ErrorLog   /var/log/httpd/dokuwiki_error.log
	CustomLog  /var/log/httpd/dokuwiki_access.log combined

Save and close the file. Restart the Apache service for the changes to take effect:

systemctl restart httpd.service
systemctl enable httpd.service

Step 5. Configure Firewall.

To remotely allow HTTP traffic to the DokuWiki server, you need to open port 80 on the firewall. Otherwise, for HTTPS, open port 443:

sudo firewall-cmd --zone=public --add-port=80/tcp
sudo firewall-cmd --zone=public --add-port=443/tcp
sudo firewall-cmd --reload

Step 6. Accessing DokuWiki.

DokuWiki will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://your-domain.com/install.php or http://your-server-ip-address/install.php and complete the required steps to finish the installation.

Congratulations! You have successfully installed Dokuwiki. Thanks for using this tutorial for installing Dokuwiki on your CentOS 8 system. For additional help or useful information, we recommend you to check the official Dokuwiki website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!


r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button