Jump to content

MediaWiki - Installation: Difference between revisions

From jeankn.app WIKI
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..."
 
No edit summary
Line 1: Line 1:
DISPLAYTITLE
== Download and Installation ==


== 1. Update your server ==
=== Update your server ===
Run the following command in Terminal:
Run the following command in Terminal:
<pre>
<pre>
Line 7: Line 7:
</pre>
</pre>


== 2. Verify PHP modules ==
=== Verify PHP modules ===
Run the following command in Terminal:
Run the following command in Terminal:
<pre>
<pre>
Line 13: Line 13:
</pre>
</pre>


== 3. Create a database for MediaWiki ==
=== Create a database for MediaWiki ===
Run the following command in Terminal:
Run the following command in Terminal:
<pre>
<pre>
Line 28: Line 28:
</pre>
</pre>


== 4. Download and unpack MediaWiki ==
=== Download and unpack MediaWiki ===
Run the following command in Terminal:
Run the following command in Terminal:
<pre>
<pre>
Line 37: Line 37:
</pre>
</pre>


== 5. Set permissions ==
=== Set permissions ===
Run the following command in Terminal:
Run the following command in Terminal:
<pre>
<pre>
sudo chown -R www-data:www-data /var/www/html/mediawiki
sudo chown -R www-data:www-data /var/www/html/mediawiki
sudo chmod -R 755 /var/www/html/mediawiki
sudo chmod -R 755 /var/www/html/mediawiki
</pre>
== Configuration ==
Open your browser and go to:<pre>
https://your-domain.com/mediawiki
</pre>
</pre>

Revision as of 19:12, 19 October 2025

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

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