Jump to content

ICT:MW Clean installation checklist version 1.43 LTS

From Costa Sano MediaWiki

Installation Checklist – MediaWiki 1.43 LTS

This document provides a clean, reproducible installation procedure for MediaWiki 1.43 LTS on AlmaLinux with Apache, PHP, MariaDB, and an nginx reverse-proxy. It is designed for long-term stability and successor-friendly maintenance.

1. Preparation

Before installing MediaWiki, ensure the server environment is ready.

1.1 System Requirements

  • AlmaLinux (or compatible RHEL-based system)
  • Apache (httpd)
  • PHP 8.1 or later
  • MariaDB 10.5 or later
  • nginx reverse-proxy (optional but recommended)
  • SELinux/AppArmor configured or disabled as needed

1.2 Install Required Packages

Install PHP and required extensions:

dnf install php php-mbstring php-xml php-intl php-mysqlnd php-gd php-json php-cli php-opcache php-apcu

Install Apache and MariaDB:

dnf install httpd mariadb-server

Enable and start services:

systemctl enable --now httpd mariadb

2. Database Setup

Create a clean database for the new wiki.

2.1 Secure MariaDB

mysql_secure_installation

2.2 Create Database and User

CREATE DATABASE newwiki CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'newwikiuser'@'localhost' IDENTIFIED BY 'strongpassword';
GRANT ALL PRIVILEGES ON newwiki.* TO 'newwikiuser'@'localhost';
FLUSH PRIVILEGES;

3. Download MediaWiki 1.43 LTS

Download and extract the LTS release.

cd /var/www
wget https://releases.wikimedia.org/mediawiki/1.43/mediawiki-1.43.0.tar.gz
tar -xvzf mediawiki-1.43.0.tar.gz
mv mediawiki-1.43.0 newwiki

Set permissions:

chown -R apache:apache /var/www/newwiki

4. Apache Virtual Host

Create a dedicated vhost for the new wiki.

<VirtualHost *:8080>
    ServerName newwiki.example.com
    DocumentRoot /var/www/newwiki

    <Directory /var/www/newwiki>
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog /var/log/httpd/newwiki-error.log
    CustomLog /var/log/httpd/newwiki-access.log combined
</VirtualHost>

Enable the site and restart Apache:

systemctl restart httpd

5. nginx Reverse-Proxy

Duplicate the working configuration from the old wiki.

Only change:

  • server_name
  • proxy_pass target
  • SSL certificate paths

Example:

server {
    listen 80;
    server_name newwiki.example.com;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

Reload nginx:

systemctl reload nginx

6. Run the MediaWiki Installer

Navigate to:

https://newwiki.example.com

Provide:

  • Database name: newwiki
  • Database user: newwikiuser
  • Database password
  • Site name
  • Admin account

Download the generated LocalSettings.php and place it in:

/var/www/newwiki/LocalSettings.php

7. Minimal Post-Install Configuration

Add only the essential customizations.

7.1 URL Structure

Ensure these lines exist:

$wgServer = "https://newwiki.example.com";
$wgScriptPath = "";
$wgArticlePath = "/wiki/$1";
$wgUsePathInfo = true;

7.2 Enable File Uploads (optional)

$wgEnableUploads = true;

7.3 Install SyntaxHighlight (recommended)

wfLoadExtension( 'SyntaxHighlight_GeSHi' );

7.4 Create Custom Namespaces (optional)

define("NS_TECH", 3000);
define("NS_TECH_TALK", 3001);
$wgExtraNamespaces[NS_TECH] = "Tech";
$wgNamespacesWithSubpages[NS_TECH] = true;

8. Testing Checklist

Verify:

  • /wiki/Main_Page loads correctly
  • Editing works
  • File uploads work (if enabled)
  • Categories work
  • Subpages work in custom namespaces
  • Reverse-proxy preserves Host header
  • No rewrite errors in Apache logs

9. Backup Checklist

Create a backup routine for:

  • /var/www/newwiki
  • LocalSettings.php
  • MariaDB database newwiki

10. Maintenance Notes

  • MediaWiki 1.43 is LTS until December 2027.
  • Apply security updates within the 1.43 branch.
  • Avoid unnecessary extensions to keep the system stable.