Jump to content

MediaWiki - Installation

From jeankn.app WIKI
Revision as of 19:09, 19 October 2025 by Jeanknapp (talk | contribs) (Created page with "DISPLAYTITLE == 1. Update your server == Run the following command in Terminal: <pre> sudo apt update && sudo apt upgrade -y </pre> == 2. Verify PHP modules == Run the following command in Terminal: <pre> sudo apt install php-intl php-xml php-mbstring php-json php-curl php-gd php-apcu -y </pre> == 3. Create a database for MediaWiki == Run the following command in Terminal: <pre> sudo mysql -u root -p </pre> Then run the folllowing SQL command: <pre> CREATE DATABASE w...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

DISPLAYTITLE

1. Update your server

Run the following command in Terminal:

sudo apt update && sudo apt upgrade -y

2. Verify PHP modules

Run the following command in Terminal:

sudo apt install php-intl php-xml php-mbstring php-json php-curl php-gd php-apcu -y

3. Create a database for MediaWiki

Run the following command in Terminal:

sudo mysql -u root -p

Then run the folllowing SQL command:

CREATE DATABASE wikidb;
CREATE USER 'wikiuser'@'localhost' IDENTIFIED BY 'StrongPasswordHere';
GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

4. Download and unpack MediaWiki

Run the following command in Terminal:

cd /tmp
wget https://releases.wikimedia.org/mediawiki/1.44/mediawiki-1.44.2.tar.gz
tar -xvzf mediawiki-1.44.2.tar.gz
sudo mv mediawiki-1.44.2 /var/www/html/mediawiki

5. Set permissions

Run the following command in Terminal:

sudo chown -R www-data:www-data /var/www/html/mediawiki
sudo chmod -R 755 /var/www/html/mediawiki