User:Rehman/MediaWiki

Over the next few months, I plan on doing some demos on how organisations can use MediaWiki. This page is where I will be storing my own notes (hence it will look messy/incomplete).

The demos will be done on https://wiki.rehman.website/. All uploaded content are dummy content, and the main domain and subdomains were purchased with the intention of being disposable.

Quick links and notes

 * Download → Installation guide → Config script → System administration
 * Never install in  directory, use   or anything else

Extensions included within MW 1.34.2
The below extensions come with the main MediaWiki installer (v1.34.2). Install all of them (as some of them requires others):


 * Extension:CategoryTree
 * Extension:Cite
 * Extension:CiteThisPage
 * Extension:CodeEditor
 * Extension:ConfirmEdit
 * Extension:Gadgets
 * Extension:ImageMap
 * Extension:InputBox
 * Extension:InterwikiSorting (for multiple wikis only)


 * Extension:LocalisationUpdate
 * Extension:MultimediaViewer
 * Extension:Nuke
 * Extension:OATHAuth (update.php required)
 * Extension:PageImages
 * Extension:ParserFunctions
 * Extension:PdfHandler
 * Extension:Poem


 * Extension:Renameuser
 * Extension:Replace Text
 * Extension:Scribunto (see additional steps)
 * Extension:SpamBlacklist
 * Extension:SyntaxHighlight
 * Extension:TextExtracts
 * Extension:TitleBlacklist
 * Extension:WikiEditor

Suggested extensions

 * Extension:AbuseFilter (update.php required)
 * Extension:Admin Links (probably not needed)
 * Extension:AdvancedSearch
 * Extension:CirrusSearch
 * Extension:Elastica
 * Extension:AntiSpoof (update.php required) (not tested)
 * Extension:Capiunto (not tested)
 * Extension:CheckUser
 * Extension:CLDR
 * Extension:CodeMirror
 * Extension:Collection (not tested)
 * Extension:ContactPage (probably not needed)


 * Extension:DynamicSidebar
 * Extension:Echo (update.php required)
 * Extension:GeoData
 * Extension:Graph
 * Extension:JsonConfig
 * Extension:Kartographer
 * Extension:Labeled Section Transclusion
 * Extension:LoginNotify
 * Extension:MassMessage
 * Extension:PageTriage (probably not needed)
 * Extension:PageViewInfo
 * Extension:Popups


 * Extension:Quiz (not tested)
 * Extension:RelatedArticles (not tested)
 * Extension:RevisionSlider
 * Extension:SandboxLink
 * Extension:SecurePoll (update.php required) (not tested)
 * Extension:StructuredDiscussions (update.php required) (not tested)
 * Extension:Thanks
 * Extension:UploadWizard (configuration recommended)
 * Extension:UserMerge
 * Extension:Variables (better not)
 * Extension:VisualEditor (not tested)

Restricting access within MediaWiki
See Manual:Preventing access. The below are automatically set when selecting "Private wiki" during install.
 * Disable reading by anonymous users:
 * Disable anonymous editing:
 * Prevent new user registrations except by sysops:

Restriction direct access to uploaded files
See Manual:Image authorization Block malicious files (suitable if users and untrusted/unknown): Manual:Security
 * 1) Add   in the   file located in the   directory
 * 2) Change $wgUploadPath in LocalSettings.php to

Restricting bots crawling on the site
See Manual:robots.txt
 * 1) Create a   file in the web root
 * 2) Add the below lines within the file:

Hide index.php from URL
See Manual:Short URL. (pending test)

Updating the logo
Read more at Manual:FAQ  $wgLogo = "{$wgUploadPath}/6/62/mylogo.png";
 * 1) Update site logo (default path will be overridden during upgrade)

Updating the favicon
Read more at Manual:FAQ

Automatic double-redirect fix
 $wgFixDoubleRedirects = true;
 * 1) Fix double redirects after a page move. Edits by Redirect_fixer account name.

Adding more file types
 $wgFileExtensions = array_merge(   $wgFileExtensions, [        'pdf', 'ppt', 'pptx', 'doc', 'docx', 'xls', 'xlsx', 'oft'    ] );
 * 1) Add more file types to the default array

Amend poweredby and copyright logos
 $wgFooterIcons = [ "copyright" => [ "copyright" => [ "src" => "/resources/assets/example_logo.png", "url" => "https://www.example.com/", "alt" => "Example text", ]	],	"poweredby" => [ "mediawiki" => [ // Defaults to point at			// "$wgResourceBasePath/resources/assets/poweredby_mediawiki_88x31.png" // plus srcset for 1.5x, 2x resolution variants. "src" => null, "url" => "https://www.mediawiki.org/", "alt" => "Powered by MediaWiki", ]	], ];
 * 1) Amend both poweredby and copyright logos

Customising the sidebar
See Manual:Interface/Sidebar. Example:
 * MediaWiki:Sidebar
 * MediaWiki:Mw-mainpage-url
 * MediaWiki:Mainpage-description
 * MediaWiki:Tooltip-n-mainpage-description
 * MediaWiki:Accesskey-n-mainpage-description

Others

 * Cpanel: Setup email and/or forwarders for the $wgPasswordSender
 * Cpanel: Disable index viewing
 * Cpanel: Enable hotlink protection

MediaWiki interface pages

 * See Special:AllMessages for all system messages (MediaWiki.org examples)
 * MediaWiki:Loginprompt - To add a note on the login page
 * MediaWiki:Deletereason-dropdown and MediaWiki:Filedelete-reason-dropdown
 * MediaWiki:Edittools
 * MediaWiki:Licenses
 * MediaWiki:Mainpage and MediaWiki:Mainpage-nstab and MediaWiki:Sitesubtitle
 * MediaWiki:Sidebar
 * MediaWiki:Upload-default-description

To do

 * How to block web access to MediaWiki's files and folders?
 * Manual:User rights
 * How to setup pages like https://en.wikipedia.org/w/docs