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
/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

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

Add the line  to the file

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 in search engines, 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 enabled for some namespaces. Others can be enabled in.

Page Title
allows you to change the title of a page (the default is to use the same as the URL). However by default only minor changes are allowed like the case of the title.

If you want to do more changes to the page title (eg. keep a short URL but have an explicit title like this page), you can enable this

Sitemap
SItemaps are good for SEO as they allow search engines to find pages faster on your site.

Mediawiki comes included with a script that can generate the sitemaps files; but it requires a bit of setup before using it.
 * 1) In   add the following lines
 * 2) Create a folder named   at the root of your installation
 * 3) Add this line to   You can also force an initial generation of the sitemap files using this command
 * 4) Your sitemap will then be accessible at https://wiki.example.com/sitemap/sitemap-index-wiki.xml
 * 5) Add this sitemap in the webmaster tools of the targeted search engines