Nowadays it is quite common to come across projects that have a wiki. This model presents the information in a pleasant way for the view and above all in a functional way. And thanks to the open-source development we have a tool that will allow us to create one on our server quickly and easily. Well, in this post we will show you how to install MediaWiki on Debian 10. With MediaWiki we will be able to deploy a wiki for our projects or website.
MediaWiki is a web-based tool that allows you to deploy a collaborative project in the form of a Wiki. According to the project website, it is used by many companies and websites to present their content in a dynamic and fast way.
It has support for extensions that allow you to extend the functionality of the application. Like almost all quality applications there are, it is open source. Therefore, we can examine the source code for bugs or vulnerabilities.
Of course, it supports many different languages including the most spoken worldwide.
So let’s get started.
Install MediaWiki on Debian 10
1) Install LAMP on Debian 10
Since this is a web application that requires a database manager, we need LAMP on our server. So that’s the first step.
However, make sure you have these PHP modules installed. This will ensure that the functioning of the application is as expected.
php7.3 php7.3-mysql libapache2-mod-php7.3 php7.3-xml php7.3-mbstring php7.3-apcu php7.3-intl php7.3-gd php7.3-cli php7.3-curl
Anyway, as you can see, they are basic modules that probably any server would already have installed.
2) Create a new database and user for MediaWiki
MediaWiki stores data in a relational database management system such as MariaDB or MySQL. It is already installed and configured as part of the LAMP stack. However, for security reasons, it’s a good idea to create a new user that has exclusive permissions on the database we’re going to create for MediaWiki.
So let’s go to the MariaDB console and get started:
:~$ sudo mysql -u root -p
> CREATE DATABASE mediawikidb;
> GRANT ALL PRIVILEGES ON mediawikidb.* TO mediawikiuser'@'localhost' IDENTIFIED BY 'mediawikipss';
> FLUSH PRIVILEGES;
With this, we will be able to continue.
3) Download and install MediaWiki on Debian 10
We have already prepared our server to install MediaWiki. Then, we will be able to download it and start with the installation. To do this, we are going to go to the root folder of apache and from there we proceed to download it.
:~$ cd /var/www/html/
:~$ sudo wget -c https://releases.wikimedia.org/mediawiki/1.33/mediawiki-1.33.1.tar.gz
Next, decompress the folder.
:~$ sudo tar -xzvf mediawiki-1.33.1.tar.gz
Then, I will rename the folder to make it more accessible.
:~$ sudo mv mediawiki-1.33.1 mediawiki
Finally, enable the apache rewrite module and restart it.
:~$ sudo a2enmod rewrite
:~$ sudo systemctl restart apache2
Now, we can complete the installation using the web browser.
4) Install MediaWiki on Debian 10 (II)
Once you have prepared everything, just complete the installation using your web browser. To do this, go to
http://your-server/mediawiki/mw-config/ to start.
On the next screen, you will have to accept the license terms.
Then, you have to write the credentials of the database you just defined.
Then, you will have to configure some database settings.
Next, type the wiki name. There, you have to create the admin account.
After that, start the installation.
If everything went well, you will see the following screen. It tells us that everything went well and that there is a file called
LocalSettings.php to download and copy into the installation directory.
If you are working with a remote server, then we will have to copy the downloaded file to the MediaWiki installation directory.
It’s simple thanks to the scp command.
:~$ scp Path_file your-server:/home/your-home/
:~$ scp ~/Downloads/LocalSettings.php 192.168.250.15:/home/your-home/
You will have to enter the user key of the server and then it will remain on the server.
On the server, move it to the MediaWiki installation directory.
:~$ mv /home/your-home/LocalSettings.php /var/www/html/mediawiki/
Finally, go back to your web browser and go to
http://your-server/mediawiki and start enjoying the installation.
Having a wiki available for your projects is a great way to present your information in a well-known collaborative format. Thanks to this installation it is possible to do it without many problems in a server with Debian 10.
Also the interesting thing about these projects are their reliability and ease of installation that allows many to enjoy it for free without sacrificing quality.