Denelezh is a website that allows you to explore the gender gap in the content of Wikidata and Wikimedia projects. Data can be aggregated by Wikimedia project and/or by characteristics of human beings (year of birth, country of citizenship, and occupation).
denelezh-core is a PHP project. It handles both the import of the data from Wikidata (except for a little part explained later) and the visualization.
This documentation covers the installation of Denelezh under a Linux system, at the URL
- MySQL 5.7 (compatibility with MariaDB has not been tested)
- a web server (seems OK with Apache and nginx)
- PHP 5.6 (seems OK with PHP 7.0)
- Java 8
Denelezh needs a MySQL database.
You can install the MySQL server using the official repositories.
Create a new database on your MySQL server:
CREATE DATABASE `denelezh` DEFAULT CHARACTER SET 'utf8mb4';
Create a user (change the password):
CREATE USER 'denelezh'@'localhost' IDENTIFIED BY 'xxxxxxx';
Grant to the user all rights to the database:
GRANT ALL ON `denelezh`.* TO 'denelezh'@'localhost';
Initialize the schema with the script
Copy all files from the project
Configure a new site on your web server, with
/var/www/denelezh.dicare.org/www as the root directory.
An example of nginx site configuration is available in
A step of the import is done by the project
Copy the file
denelezh-import.jar (generated by the project
denelezh-import) into the
By default, Wikidata JSON dumps are stored in
/home/wikidata/dumpfiles (see the project
denelezh-import to change that). This directory must be readable and writable by the user who starts the imports.
Create the file
conf/conf.inc.php, using the example
Most important variables are:
DB_HOST: host of the MySQL server
DB_USER: MySQL user
DB_PASSWORD: password of the MySQL user
DB_NAME: name of the schema
SITE_DIR: URL of Denelezh
SITE_STATIC_DIR: URL of the directory with static web resources of Denelezh
To start an import, go into the
cron directory and use the following command:
By default, the import use the last JSON dump, downloading it if it is not already present on the server.
You can import another dump by specifying the date of the dump as a parameter:
bash import.cron.sh 2018-06-04
In that case, the JSON dump must already be present on the server.