Jump to content

MediaWiki - Installation: Difference between revisions

From jeankn.app WIKI
No edit summary
Line 18: Line 18:
Run the following command in Terminal:
Run the following command in Terminal:
<pre>
<pre>
sudo mysql -u root -p
sudo mysql -u root -p yourpassword
</pre>
</pre>



Revision as of 19:16, 19 October 2025

DISPLAYTITLE

Download and Installation

Update your server

Run the following command in Terminal:

sudo apt update && sudo apt upgrade -y

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

Create a database for MediaWiki

Run the following command in Terminal:

sudo mysql -u root -p yourpassword

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;

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

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

Configuration

Open your browser and go to:

https://your-domain.com/mediawiki