Jump to content

MediaWiki - Installation: Difference between revisions

From jeankn.app WIKI
No edit summary
m Jeanknapp moved page MediaWiki Installation to MediaWiki - Installation without leaving a redirect
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
DISPLAYTITLE
== Download Instructions ==
 
== Download and Installation ==


=== Update your server ===
=== Update your server ===
Line 13: Line 11:
<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
</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 44: Line 27:
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>Then run the following commands, replacing the variable with the user you log into the FTP Client:<pre>
sudo chown -R [FTP_USER]:www-data /var/www/html/mediawiki
</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
</pre>
</pre>
=== Language ===
Select <u>english</u> for both options and click '''continue'''.
=== Copyright and Terms ===
Click '''continue'''.
=== Connect to database ===
Insert the following data:
* '''Database name'''
* '''Database username'''
* '''Database password'''
Click '''continue'''.
=== Database settings ===
Click continue.
=== Name ===
# Set the Name of wiki
# In Project namespace, select Other and specify a namespace.
# Setup an Administrator account, and uncheck '''Share data about this installation with MediaWiki developers'''.
# Click '''Continue'''.
=== Options ===
# Select the following options: <u>Authorized editors only</u> and <u>Creative Commons Attribution-ShareAlike</u>
# Uncheck <u>Enable outbound email</u>
# Uncheck skins <u>MinervaNeue</u>, <u>MonoBook</u>, <u>Timeless</u>, and select '''Use this skin as default''' under '''<u>Vector</u>.'''
# Check all <u>Special pages</u>, <u>Editors</u>, <u>Parser hooks</u> and <u>Media handlers</u>
# Under '''Other''', check <u>MultimediaViewer</u>.
# Clear '''Logo''' and '''Sidebar logo.'''
# Click '''Continue'''.
=== Install ===
Click '''Continue'''.
Click '''Continue''' again.
=== Upload LocalSettings.php ===
A file named LocalSettings.php will be downloaded. Upload that file to /var/www/html/mediawiki/.
[[Category:Google Cloud]]
[[Category:Google Cloud]]
[[Category:MediaWiki]]
[[Category:MediaWiki]]

Latest revision as of 19:48, 19 October 2025

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

Then run the following commands, replacing the variable with the user you log into the FTP Client:

sudo chown -R [FTP_USER]:www-data /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

Language

Select english for both options and click continue.

Click continue.

Connect to database

Insert the following data:

  • Database name
  • Database username
  • Database password

Click continue.

Database settings

Click continue.

Name

  1. Set the Name of wiki
  2. In Project namespace, select Other and specify a namespace.
  3. Setup an Administrator account, and uncheck Share data about this installation with MediaWiki developers.
  4. Click Continue.

Options

  1. Select the following options: Authorized editors only and Creative Commons Attribution-ShareAlike
  2. Uncheck Enable outbound email
  3. Uncheck skins MinervaNeue, MonoBook, Timeless, and select Use this skin as default under Vector.
  4. Check all Special pages, Editors, Parser hooks and Media handlers
  5. Under Other, check MultimediaViewer.
  6. Clear Logo and Sidebar logo.
  7. Click Continue.

Install

Click Continue.

Click Continue again.

Upload LocalSettings.php

A file named LocalSettings.php will be downloaded. Upload that file to /var/www/html/mediawiki/.