User:Varnent/Dog food

Over the years, I have been the system operator for a number of third-party MediaWiki installations. The longest running was WikiQueer, which will be relaunched in the coming year. However, it has been at least three years since I setup from scratch a complete MediaWiki installation for third-party usage. With this "eating our own dog food" page, I am attempting to document my experiences both for my own future reference and potentially for use by others as I install and setup WikiGreed from scratch.

Basics
At time of setup:


 * Ubuntu 18.04.3 (LTS) x64
 * MediaWiki 1.34.1
 * PHP 7.2.24
 * Apache
 * MySQL 5.7.29
 * ICU 60.2
 * Lua 5.1.5

Impressions

 * Setup of extensions during initial MediaWiki installation was much easier. A vast majority of the extensions I wanted to utilize were already in the package.
 * VisualEditor is usually an expected hurdle.
 * File upload problems are usually a surprise hurdle.
 * It is easy to overlook a lot of little things that align the end-user experience with that of Wikimedia projects.
 * There are SO MANY template to import from various Wikimedia projects of varying setups (Office Wiki is a handy cheat based on its simple setup). Would be handy if there was an auto updated package of templates and modules you could import for a designated set of basic and common wiki maintenance functions.
 * MBox
 * Copyrights
 * Documentation subpages
 * Reflist formatting

VisualEditor
$wgVirtualRestConfig['modules']['parsoid'] = array(   // URL to the Parsoid instance    // Use port 8142 if you use the Debian package    'url' => 'http://localhost:8142',    // Parsoid "domain", see below (optional)    'domain' => 'wikigreed.org', ); $wgDefaultUserOptions['visualeditor-enable'] = 1; $wgDefaultUserOptions['visualeditor-newwikitext'] = 1; $wgVisualEditorEnableWikitext = true;
 * Getting Parsoid to work within Terminal was not too challenging. Getting it linked with VisualEditor was a lot of trial and error. Final coding:
 * Problems getting editors to display for everyone as expected. Final coding:

Uploads
$wgUploadDirectory = "$IP/uploads"; $wgUploadPath = "$wgServer/w/uploads";
 * Getting errors at first. Solution was playing around with CHMOD and CHOWN settings as well as this setup (note that the use of 'upload' is just my own personal oddness):

Easy to overlook
These are things which were easy to overlook:


 * Testing file uploads
 * Setting up and testing email sending
 * Hiding database password further in server
 * All of the other custom settings already default on Wikimedia wikis - for things like custom CSS for users, etc.

Extensions
I installed these extensions, which were not include with the MediaWiki tar build:
 * Extension:Popups
 * Extension:Flow
 * Extension:Thanks
 * Extension:CheckUser
 * Extension:cldr
 * Extension:AbuseFilter
 * Extension:Echo
 * Extension:VisualEditor

Visual Editor
$wgVirtualRestConfig['modules']['parsoid'] = array(   // URL to the Parsoid instance    // Use port 8142 if you use the Debian package    'url' => 'http://localhost:8142',    // Parsoid "domain", see below (optional)    'domain' => 'wikigreed.org', ); // Enable by default for everybody $wgDefaultUserOptions['visualeditor-enable'] = 1; $wgDefaultUserOptions['visualeditor-newwikitext'] = 1; $wgVisualEditorAvailableNamespaces = [ "Help" => true, "Project" => true ]; $wgVisualEditorEnableWikitext = true;

File uploads
$wgEnableUploads = true; $wgFileExtensions = [ 'png', 'gif', 'jpg', 'jpeg', 'webp', 'svg', 'pdf' ]; $wgSVGConverter = 'rsvg'; $wgUploadDirectory = "$IP/uploads"; $wgUploadPath = "$wgServer/w/uploads"; $wgUseImageMagick = true;

Short URL
$wgScriptPath = "/w"; $wgScriptExtension = ".php"; $wgArticlePath = "/wiki/$1";

Additional settings
$wgAllowUserCss = true; $wgAllowUserJs = true;