Jump to content

MediaWiki - Installation: Difference between revisions

From jeankn.app WIKI
Line 1: Line 1:
DISPLAYTITLE
DISPLAYTITLE


== Download and Installation ==
== Download Instructions ==


=== Update your server ===
=== Update your server ===
Line 13: Line 13:
<pre>
<pre>
sudo apt install php-intl php-xml php-mbstring php-json php-curl php-gd php-apcu -y
sudo apt install php-intl php-xml php-mbstring php-json php-curl php-gd php-apcu -y
</pre>
=== Create a database for MediaWiki ===
Run the following command in Terminal:
<pre>
sudo mysql -u root -p yourpassword
</pre>
Then run the folllowing SQL command:
<pre>
CREATE DATABASE wikidb;
CREATE USER 'wikiuser'@'localhost' IDENTIFIED BY 'StrongPasswordHere';
GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
</pre>
</pre>


Line 46: Line 31:
</pre>
</pre>


== Configuration ==
== Database Setup ==
 
# Open phpMyAdmin and navigate to '''User accounts''' and click '''Add user account.'''
# Setup an '''User name''' and a '''Password''', and select '''Host name''' to <u>Local</u>. Write down the password you set.
# Under '''Database for user accoun'''t, check '''Create database with same name and grant all privileges''', and click '''Go'''.
# Open the created Database, navigate to '''Operations > Collation''' and switch it to <u>mb4_unicode_ci</u>.
 
== Wiki Setup ==
Open your browser and go to:<pre>
Open your browser and go to:<pre>
https://your-domain.com/mediawiki
https://your-domain.com/mediawiki

Revision as of 19:23, 19 October 2025

DISPLAYTITLE

Download Instructions

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

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

Database Setup

  1. Open phpMyAdmin and navigate to User accounts and click Add user account.
  2. Setup an User name and a Password, and select Host name to Local. Write down the password you set.
  3. Under Database for user account, check Create database with same name and grant all privileges, and click Go.
  4. Open the created Database, navigate to Operations > Collation and switch it to mb4_unicode_ci.

Wiki Setup

Open your browser and go to:

https://your-domain.com/mediawiki