MediaWiki

From Sasara
Revision as of 00:23, 23 August 2025 by Rubenerd (talk | contribs)
Jump to navigationJump to search

MediaWiki is the wiki software we use for Sasara. It's also used on Wikimedia Foundation projects like Wikipedia and Wikimedia Commons.

Change homepage

Update link on MediaWiki:Mainpage to point to the new target home page.

Image uploads

Enabling uploads

Open LocalSettings.php, and change this option:

$wgEnableUploads = true;

Make sure the uploads folder is writable by the web server process. We run ours in a separate zfs dataset with execution off and quotas for security:

zfs create $DATASET/wiki/uploads
zfs set exec=off $DATASET/wiki/uploads
zfs set quota=1G $DATASET/wiki/uploads

Improve quality

The default quality setting for image compression is 80, which isn't great.

Open LocalSettings.php, and add the following option under wgEnableUploads:

$wgJpegQuality = 96;

Increasing size

Open php.ini, and change this to what you want:

upload_max_filesize = 8M

If you run nginx, you may need to add this to your nginx.conf file to prevent HTTP 413 Entity Too Large errors:

http {
    client_max_body_size 8M;
}