MediaWiki

DNS
This guide assume that you are using a dedicated subdomain for your wiki like https://wiki.example.com. Don't forget to point that domain to your webserver.

Database
You will need a database server store all dynamic data (users, articles…). You can check the MariaDB installation guide.

Nginx
In this guide, we will use Nginx as a web server. Please check the Nginx installation guide.

Configure PHP
Edit file   and add folder   to the   setting.

Configure Nginx
create certificate

update nginx config

/mw-config

ParserFunctions
This extension is bundled by default with MediaWiki. You just need to activate it.

Add the line  to the file

SyntaxHighlight
This extension is bundled by default with MediaWiki. You just need to activate it.

Add the line  to the file

TemplateData
Allows you to describe your templates using structured data for a better experience with the VisualEditor.

https://www.mediawiki.org/wiki/Extension:TemplateData

Parsoid
The VisualEditor extension require Parsoid to be installed.

Install
The project is still you and instruction might change. See mediawiki instructions.

Connect to MediaWiki
Edit configuration in

If you have changed the listening port of your webserver (you are using sslh), you might need to change the  in the line above.

You can check your ports using Parsoid seems to pick the IPV4 port. 4433 in this case

Logging
If you have issue with making Parsoid work, you can enable debug logging. Just add the line  in

Logs are written in

Restarting
After changing the config, you need to restart Parsoid.

php-curl
VisualEditor require the curl PHP extension

MobileFrontend
Because a lot of your traffic will come from mobile devices.


 * Download MobileFrontend
 * Extract it in
 * Add the following to

For more information, check the extension documentation

Speedup
By default the MediaWiki installation is pretty slow.

Localisation cache
Uncomment the line about  in.

Enable CronJob
First create the log file Then add the following line in  Finally you can disable jobs running on user visits in   You can check the number of jobs in the queue at https://wiki.example.com/api.php?action=query&meta=siteinfo&siprop=statistics&format=jsonfm

Canonical links
Page in MediaWiki can be accessed by several URLs. For example the main page of this wiki can be accessed with To avoid issues with duplicated content, it is possible to add a canonical link to all pages
 * https://wiki.meurisse.org/
 * https://wiki.meurisse.org/wiki/Main_Page
 * https://wiki.meurisse.org/index.php?title=Main_Page
 * https://wiki.meurisse.org/index.php?title=Main_Page&mobileaction=toggle_view_desktop

Capital Links
By default, MediaWiki forces the first letter of a page title to be upper case. The advantage of it is that you can omit the first capital in links,

Eg. You have a page named. You can link to it like.

The drawback is that you can't create a page with lower case title.

Change that in.

Footer
By default the footer contain several links that we want to configure.

Licence
The license is controlled by these parameters The text of the link itself is the content of the page https://wiki.example.com/wiki/MediaWiki:Copyright

About / Disclaimers / Privacy
The three other default links in the footer are controlled by this pages:

https://wiki.example.com/wiki/MediaWiki:Aboutsite

https://wiki.example.com/wiki/MediaWiki:Disclaimers

https://wiki.example.com/wiki/MediaWiki:Privacy

To remove one of the link set the content of the page to.

No-nofollow
By default MediaWiki adds  to all external links. While it's usage for real wikis is discussed, it is counterproductive for a personal wiki. It can be disabled in.

Subpages
Subpages are only enable for some namespaces. Others can be enabled in.