This how-to will help you with your install and configuration of PhpWiki on your CentOS 7 server. For those of you who didn’t know, PhpWiki is a wiki-based content management software written in PHP, used to create web sites where anyone can edit or create the pages using a web browser.
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. I will show you through the step by step installation PhpWiki in CentOS 7 server.
Install PhpWiki on CentOS 7
Step 1. First of all, make sure that all packages are up to date.
Step 2. Install LAMP server.
A CentOS 7 LAMP server is required. If you do not have LAMP installed, you can follow our guide here.
Step 3. Install Zikula.
Download the latest stable version of PhpWiki, At the moment of writing this article it is version 1.5.4:
We will need to change some folders permissions:
Step 4. Configuring MariaDB.
By default, MariaDB is not hardened. You can secure MySQL using the mysql_secure_installation script. you should read and below each step carefully which will set a root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB.
Next, we will need to log in to the MariaDB console and create a database for the PhpWiki. Run the following command:
This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for PhpWiki installation:
Create tables inside your phpwikidb database:
Step 5. Configuring Apache webserver.
Create a new virtual host directive in Apache:
Add the following lines to it:
Now, we can restart Apache so that the changes take place:
Create a subdirectory called ‘data’ in the ‘phpwiki’ directory:
Copy ‘/var/www/html/config/config-dist.ini’ to ‘/var/www/html/phpwiki/config/config.ini’ and edit the settings in ‘/var/www/html/phpwiki/config/config.ini’ file according to your needs. It may be simpler for you to use http://phpwiki.fr/configurator.php to generate the ‘config.ini’ configuration file for PhpWiki:
- Enter the name of your website, administrator username and password
- Make sure you select to use encrypted passwords to be stored in the ‘config.ini’ file and the user’s homepages metadata
- Set the path to access log file (e.g.
- Set ‘COMPRESS_OUTPUT’ to true (Always try to compress output)
- Set ‘HTTP Cache-Control’ to ‘LOOSE’ so cached pages will be invalidated whenever they are edited
- Select the database backend type to SQL
- SQL Type (MySQL), SQL User (phpwikiuser) and its password, SQL Database Name (phpwikidb)
- Set ‘Allow anonymous edit’ and ‘Allow Bogo Login’ to false
- Set ‘PASSWORD_LENGTH_MINIMUM’ to at least 8 characters
- Edit part four: ‘Page appearance and layout’ according to your liking and finally click on the ‘Save config/config.ini’ button.
Step 6. Accessing PhpWiki.
PhpWiki content management system will be available on HTTP port 80 by default. Open your favourite browser and navigate to http://yourdomain.com or http://server-ip and complete the required steps to finish the installation. If you are using a firewall, please open port 80 to enable access to the control panel.
Congratulations! You have successfully installed PhpWiki. Thanks for using this tutorial for installing PhpWiki content management system in CentOS 7 system. For additional help or useful information, we recommend you to check the official Zikula web site.