User:Stefahn/Docu

On this page I collect useful stuff for running great MediaWiki websites :)

(This page is ever-growing)

MediaWiki Docu

 * Manual:FAQ
 * Manual:LocalSettings.php
 * How to become a MediaWiki hacker
 * Manual
 * Book "Working with MediaWiki" (by Yaron Koren): workingwithmediawiki.com
 * List of configuration variables
 * Lots of advice: http://wiki.laub-home.de/wiki/MediaWiki (German)
 * Mailinglist of new MediaWiki versions
 * Commoncraft explains how Wikipedia works

Stying up-to-date / Newsletters:
 * https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce
 * https://meta.wikimedia.org/wiki/Tech/News
 * https://en.wikipedia.org/wiki/Wikipedia:Wikipedia_Signpost
 * Podcast by Yaron Koren: http://betweenthebrackets.libsyn.com/

MediaWiki Support
Here you can get free support for MediaWiki:
 * Project:Support desk
 * Mailing lists
 * IRC channel #mediawiki: Best time to get answers: 17:30 MEZ (5:30 pm) = 10 pm IST = forenoon in the US
 * Facebook group "MediaWiki Developers"
 * MediaWiki on Slack
 * German forum: http://www.wiki-forum.de/mediawiki-forum-f466.htm

Finding MediaWiki Consultants:
 * Professional development and consulting
 * http://www.wikimatrix.org/consultants/mediawiki/
 * SMW: https://www.semantic-mediawiki.org/wiki/Professional_support

SEO

 * If you use Sitenotice chances are Google will show the sitenotice text instead of the page content in the SERPs. Use no index for the sitenotice (?).
 * http://www.cloudways.com/blog/mediawiki-seo-tips/
 * Lots of tips & tricks (German)
 * Optional: Set some links to be follow (no nofollow) (German)
 * Thread:Project:Support desk/SEO question: Removing "wiki" from domain
 * Add Meta Description
 * To read:
 * http://www.richardcarterconsultancy.com/2012/07/5-tips-to-improve-your-mediawiki-sites-seo/
 * http://bundu.hubpages.com/hub/Give-your-MediaWiki-Installation-an-SEO-optimisation-and-add-Advertising
 * http://blog.säsongsmat.nu/2012/07/31/adding-authorship-information-to-mediawiki-pages/

Short URLs
RewriteRule ^wiki/(.*)$ /mediawiki/index.php?title=$1 [PT,L,QSA] RewriteRule ^wiki/*$ /mediawiki/index.php [L,QSA] RewriteRule ^/*$ /mediawiki/index.php [L,QSA]
 * very important!
 * Docu: Short URL
 * What I use in my .htaccess files:
 * Last line redirects domain.com to domain.com/wiki/Mainpage


 * Not tested yet, but looks helpful to setup short URLs for MediaWiki: http://shorturls.redwerks.org/
 * Related to URL: If you set your wiki to private and you're not logged in, the homepage won't be redirected to domain.com/wiki/Mainpage but stay at domain.com. This is useful for testing the pagespeed at https://www.pagespeed.de/

URLs with / without capitals
Default behavior:
 * URLs are case sensitive
 * However, the first character of the page name is case-insensitive - Example: http://secret-wiki.de/wiki/gesetz_der_Anziehung redirects to http://secret-wiki.de/wiki/Gesetz_der_Anziehung (this is also the case on Wikimedia projects)
 * http://secret-wiki.de/wiki/Gesetz_der_anziehung gives an error (also http://secret-wiki.de/wiki/Gesetz_der_anziehung ) - this might be a problem if a user enters the URL this way (without capitals)

One can change behavior of links and allowed URLs with $wgCapitalLinks. Setting $wgCapitalLinks to false...
 * ...doesn't change anything about the existing pages with capitals!
 * ....enables links like small (which would link to a page "small" not "Small")
 * ...enable pages/URLs that start with a small letter

I still don't know if URLs with capitals are a bad thing in terms of SEO. If someone knows more about it please mail me at info AT interspirit.de

Sitemap
'''Possibilities to generate a sitemap:
 * Extension:DynamicWikiSitemap (my preferred methode)
 * Manual:generateSitemap.php
 * Generate Sitemap via shell: http://wiki.laub-home.de/wiki/Mediawiki_Sitemap_erstellen (German)

Debugging & Hacking
If you get an empty page, chances are there is a fatal PHP error: Add this to the second line from the top (right below the <?php) of LocalSettings.php to turn on error messages: error_reporting( -1 ); ini_set( 'display_errors', 1 );

This corresponds to error_reporting = E_ALL display_errors = On in your php.ini.

For more info see Manual:How to debug. Another proposed way:

My debugging "setup": error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT display_errors = Off error_reporting( -1 ); ini_set( 'display_errors', 1 ); $wgShowExceptionDetails = true; $wgDebugLogFile = "/tmp/debug-{$wgDBname}.log";
 * in my php.ini I had (and have) :
 * If my website is live I don't have any "debugging lines". If I want to debug something I temporarily add this code to my LocalSettings.php:

Become a MediaWiki hacker:
 * Gerrit/Tutorial, Gerrit/Getting started
 * Info for myself: My account on https://wikitech.wikimedia.org is separate from my Unified Account, because wikitech is separate. The accounts have the same login though.

Hosting

 * Never go for windows hosting for Meadiawiki.

'''Memory limit:
 * "The minimum amount of memory that MediaWiki "needs" is 50 megabyte."
 * "The minimal limit should be something like 20 MB, but if you want MediaWiki to work correctly, consider using at least 50 MB."

'''PHP Version:
 * See Compatibility

'''Speeding up MediaWiki:
 * Manual:Performance tuning
 * $wgDBserver: Use IP addresses where possible to avoid the overhead of a DNS lookup for every single connection to the wiki.

'''Permissions:
 * If you have root or sudo access:
 * chown everything to the apache user/group (recursively). In Ubuntu:
 * chmod LocalSettings.php to 600. Leaving everything else as default should be fine (644 for files and 755 for directories).
 * If you do not have root or sudo access:
 * chown LocalSettings.php and the images directory (recursively) so it is in your name but the apache group
 * chmod LocalSettings.php to 640 and chmod the images directory to 775 (recursively). Leaving everything else as the default should be fine.

Database

 * To keep database size small the contents of objectcache table may be deleted (delete only the contents of this table, no other one!) - see http://www.mediawiki.org/wiki/Manual:Objectcache_table and http://www.mediawiki.org/wiki/Thread:Project:Support_desk/How_to_use_only_small_images_from_commons.wikimedia.org%3F#How_to_use_only_small_images_from_commons.wikimedia.org.3F_16262

Upgrading / Updating

 * Detailed information: Manual:Upgrading
 * Version lifecycle - Information about MW Versions - including info about Long term support (LTS)
 * Locking the database during upgrades or technical stuff: Manual:$wgReadOnly

'''Web updater:
 * Useful if you don't have SSH access. Instead of the update script you can use the web updater.
 * Accessible at
 * Manual:Upgrading
 * This is not recommended since the web update can timeout (see )

'''Essential changes (to me):
 * List of essential changes in MediaWiki versions
 * Hit counters were removed in MediaWiki 1.25, see here why.

Major upgrades
This is how I do major upgrades on my wikis: This includes, but is not limited to:
 * 1) Backup all MediaWiki databases and all FTP files that I adapted (for example these files).
 * 2) Access the command line by connecting to my server via Putty/SSH.
 * 3) Navigate to my website folder (not the   folder but the one that contains the   folder).
 * 4) Download the new package via   (URLs of the download packages can be retrieved from Download).
 * 5) Extract the file via   (this will create a new folder named  )
 * 6) Copy all "old", adapted FTP files into the new mediawiki folder.
 * 1) extensions that are not bundled with the tarball
 * 2) the   folder (for example with
 * 3) custom skins (or changes you made to default skins)
 * 4) In the release notes for the new version, see if any changes need to be made to.
 * 5) Rename the old   folder to.
 * 6) Rename the new   folder to.
 * 7) Update any extensions if there are updates.
 * 8) Run the update script with.
 * 9) Check my wiki if all works like it should, for example
 * 10) Viewing pages
 * 11) Editing pages
 * 12) Uploading a file
 * 13) Visit Special:Version and check that the version shown is correctly and that my extensions are present.
 * 1) Uploading a file
 * 2) Visit Special:Version and check that the version shown is correctly and that my extensions are present.

Minor upgrades
This is how I do minor version upgrades:
 * 1) Backup all MediaWiki databases and all FTP files that I adapted (for example these files).
 * 2) Access the command line by connecting to my server via Putty/SSH.
 * 3) Navigate to my html folder.
 * 4) Download the new patch file via
 * 5) Extract the file via
 * 6) Navigate to the   folder of the wiki.
 * 7) Run   to check what will be patched.
 * 8) If all is fine, run
 * 9) Visit Special:Version and check that the version shown is correctly and that my extensions are present.
 * 10) Repeat the last 4 steps for every wiki.

Upgrading extensions
This is how I upgrade my extensions:
 * 1) Visit the extension page and get the download link of the new version (I always try to run the master version, even if I'm on the LTS version).
 * 2) Access the command line by connecting to my server via Putty/SSH.
 * 3) Navigate to my extension folder.
 * 4) Run
 * 5) Rename the existing extension folder to
 * 6) Run   (this extracts the files into the folder.
 * 7) Visit Special:Version and check that the version number is updated.
 * 8) Check functionality that the extension provides.

Maintenance scripts
SERVER_NAME=yourdomain.com export SERVER_NAME php update.php
 * Manual:Maintenance scripts
 * '''Helpful after importing data into your wiki (fixes categories for example): Manual:rebuildall.php
 * if you get an PHP Notice like "Undefined index: SERVER_NAME in /yourfolder/mediawiki/includes/GlobalFunctions.php on line 1471" you can try this on the console
 * If  doesn't work, try

Manual:RunJobs.php:
 * one can also run it with
 * SMW recommends parameter

Moving entire wiki
Steps to change the domain of the wiki:
 * Point the new domain to your FTP folder
 * In LocalSetting.php change the domain under $wgServer
 * Done :)

Caching

 * see Manual:Cache
 * If you use  and you can't login afterwards, try to set.
 * Caching on SMW: http://semantic-mediawiki.org/wiki/FAQ#Why_doesn.27t_data_I_have_just_added_show_up_in_queries.3F
 * Only single page:
 * http://www.mwusers.com/forums/showthread.php?15954-Is-it-possible-to-disable-cache-for-a-particular-page
 * worked for me (1.19.2): Extension:Winter with

Extensions
All Extensions:
 * Category:All_extensions
 * Extension Matrix/AllExtensions is no longer up to date
 * Good tip: Search for keywords within the namespace "Extension": https://www.mediawiki.org/w/index.php?title=Special%3ASearch&profile=advanced&ns102=1

Misc:
 * Snippets - small pieces of code to provide additional functionality whether interactive, visual or both.
 * Cite: It's okay to use and define foo only later.
 * If the version number on Special:Version is not updated although you have the new files in place: Topic:Ubxbytoe9k5jqkug

Useful extensions

 * 100 most popular MW extensions
 * Extensions in use on my site Secret Wiki
 * Extension:AddBodyClass: allows to add custom classes to the HTML body tag

Show a list of users who have contributed to an article:
 * Extension:Contributors: used often, works after this and this hack, in includable version contributors are sorted by edits, but not linked and there is no number of edits -> managed to hack the code so that users are linked and number of edits are shown :)
 * Extension:Contribution_Credits: ordered by username, stable, used 6 times (works!), managed to remove certain usernames by hacking extension
 * Extension:Uniwiki_Authors: old, unordered list, hack to show only users who contributed certain number of bytes, according to Wikipiary: not used
 * Extension:PageBy: excludes bots and anons, ordered by edits?, very old, used 6 times (but couldn't see it on two of those wikis)
 * Extension:AuthorInfo: limit number of shown users, not used, code completely outdated
 * Extension:Semantic_Extra_Special_Properties: unordered, output as a property (I can adapt it via ask function)

Extensions that (in my eyes) could provide a good commenting service (as of 23.7.2016):
 * Extension:Comments - works good. Anons can comment too, but they can only leave a text (not their name, not their website).
 * Extension:PageDisqus - integrates the Disqus commenting service to every page, right after the content area
 * Extension:Widgets - with Facebook and Disqus widgets

Failed extensions
Extensions I tried and didn't find to be useful (so far).

Hooking / Building custom extensions

 * Extensions_FAQ
 * Available_hooks
 * To insert HTML on edit pages only: Manual:Hooks/EditPage::showEditForm:fields (maybe there's a better hook, but it works with this one)
 * If custom hook doesn't work: Check if custom php file is included in LocalSettings.php first ;)
 * How to render wikitext in one's extension -  doesn't seem to work in my "usual" extensions (not special pages)

Ways to add HTML output (in MediaWiki 1.19)
Don't quote me on that, I might be wrong / not completely right.

If OutputPage object is passed to function
 * Use  in function definition, like.
 * Then use one of the following:

If OutputPage object is not passed to function
 * Use:
 * Then use one of the following:

Get the title of a page

 * in VectorTemplate.php:
 * in LocalSettings.php:  (at least this works within a function like this

Example: Adding og:image to the Main page of your wiki (and only on the Main page): $wgHooks['BeforePageDisplay'][] ='MyFunction'; function MyFunction(&$out, &$skin) {

$script= ""; if ($out->getTitle == "Main page" ) { $script .= ""; }

$out->addHeadItem("My script", $script); return true; };

CSS

 * All stylesheets MW uses: Manual:Interface/Stylesheets
 * CSS class for every category: Snippets/Style_pages_based_on_categories
 * To change the way MediaWiki pages print: add CSS on the page MediaWiki:Print.css
 * To allow CSS on restricted pages like the login page: Manual:$wgAllowSiteCSSOnRestrictedPages

'''Tables:
 * Zebra (alternating colors) and highlighting: http://de.wikipedia.org/wiki/Hilfe:Tabellen#zebra
 * Working zebra CSS:

Sidebar tricks

 * Highlight a sidebar entry:
 * Add picture before sidebar entry:
 * Show a certain entry (or a group of entries) only to a certain user group:
 * Add to your Common.css:


 * Add to MediaWiki:Group-groupname.css (for example for bureaucrats: MediaWiki:Group-bureaucrat.css, more examples at Manual:User group CSS and Javascript) :


 * Remove entries from toolbox: http://www.wiki-forum.de/aus-toolbox-einzelne-eintraege-entfernen-t328359.htm (German)

Design & Skins

 * Manual:Interface
 * Thread:Project:Support desk/How to add wikitext into a skin
 * To get the page without skin: add  to URL

'''Footer:
 * To remove the privacy, about and/or disclaimer links entirely, replace the link text in MediaWiki:Privacy, MediaWiki:Aboutsite or MediaWiki:Disclaimers with a single dash.
 * See Manual:Footer for more info

'''Mobile skinning:
 * Manual:Mobiles, tablets and responsive design
 * Extension:MobileFrontend
 * Simple_mobile_skin_auto_change
 * Use other skin for mobile devices (German)
 * How to use mobile theme of Wikipedia (German)

'''Learn skinning:
 * Manual:Skinning/Tutorial
 * German skin docu on WikiPedia: w:de:Wikipedia:Technik/Skin
 * http://www.earlgreyandbattenburg.co.uk/books/mediawiki-skins-design/
 * http://blog.blue-spice.org/2012/10/01/mediawiki-skins-a-visual-feast/
 * WMF style guides: https://tools.wmflabs.org/styleguide/

Cool skins
'''My favorites:
 * Skin:Chameleon - Discussions:, , with nice example
 * http://www.mediawikibootstrapskin.co.uk
 * http://foreground.thingelstad.com
 * Puts your content in the foreground
 * used as default skin on https://wikiapiary.com
 * inherently responsive for mobile thanks to Foundation
 * User:Thingles on responsiveness: However, responsiveness on a wiki is such a tricky thing since the editors have a ton of control over it. CSS changes can make it non-responsive. Also, any template that uses tables can break responsiveness. In short, the skin enables it but the wiki must play along.

Other skins:
 * The most used MediaWiki skins: https://wikiapiary.com/wiki/Skin:Skins
 * https://github.com/mtyeh411/mediawiki-bootstrap
 * https://de.onpage.org/wiki/Hauptseite
 * http://fr.wikimini.org/wiki/Accueil
 * http://energypedia.info - uses Iswiki skin developed by http://idea-sketch.com (my guess)
 * http://practicalplants.org/wiki/Practical_Plants
 * http://docs.webplatform.org
 * http://sunshinereview.org/index.php/Portal:WikiFOIA
 * http://www.whoinspired.com/
 * http://gomediawiki.com/wiki/Free_wiki_skin (Example: critical-mass-rides.co.cc)
 * Skin:Erudite
 * Nimbus_skin - Example: http://www.halopedia.org/
 * https://sellfy.com/p/VRjA/
 * http://rilpartner.se/mediawiki-skins/
 * http://paulgu.com/wiki/Mediawiki_Skins - Used to used it myself on http://marketingunited.org
 * Even more skins: Category:All_skins

'''Ideas:
 * http://www.wikipediaRedefined.com/

Show content only to logged-in users
Ways to show content only to logged-in users and not to anons ("show" means "print on screen"):

Working solution: CSS

In MW 1.16.2 I used this code to load a custom CSS sheet (in my PHP skin file) - this code still works with 1.19.2:

Create a file "anon.css" (in the skins/vector directory) and add:

Then in your wikitext add the following class if you don't want to show content to anons (that means if you want to show content only to logged-in users):

Working solution: Extension:UserFunctions

Use parser function.

Possible solution: common.js (not working for me) use something like your wikitext ; in MediaWiki:common.css add: .anononly { display: none; } and in MediaWiki:common.js add if ( !mw.user.isAnon ) { $( '.anononly' ).removeClass( 'anononly' ); }

Tried it and failed - tried the example shown here and replaced isanon with anonymous (since I used 1.19.2) but still no message.

Possible solution: user group CSS

One can load a CSS file for certain user groups via Manual:User_group_CSS_and_Javascript - this works fine for all user groups except for anons (see this discussion).

User group CSS file seems to be case sensitive (I had to name the file MediaWiki:Group-Mitschreiber.css instead of MediaWiki:Group-mitschreiber.css to get it working).

Show content only to a certain group (in PHP files)
The following worked for me - I added this code in my skin PHP file:

Images
'''Thumbnails:
 * Change thumbnail size: Manual:$wgThumbLimits
 * Issues with thumbnails
 * in 1.19.x: Thread:Talk:MediaWiki 1.19/Thumbnails didn't work since Update to 1.19/reply (32)
 * other option:

'''Uploads:
 * Bulk upload is possible with Extension:UploadWizard
 * Uploading within the editor is possible with the VisualEditor
 * Fix issues with uploading files in MW 1.26.2: in Ubuntu chown everything to www-data:

'''Other technical stuff:
 * Renaming (a lot of) images with the API:
 * Manual:Image_administration
 * Images URLs: To use absolute URLs instead of relative URLs place the domain in the variable . This is useful if you embed the wiki content on another domain but want the images to be loaded from the original (wiki) URL.

JavaScript & jQuery
'''JavaScript:
 * JavaScript code should be added within MediaWiki:Common.js
 * if you want to load a certain JavaScript file (asynchronously): Add  to your MediaWiki:Common.js . See also ResourceLoader/Modules.
 * In MediaWiki:Common.js: Leave out . Otherwise you'll get an JavaScript error.
 * Manual:Interface/JavaScript
 * It's not possible to use JavaScript inline elements in Common.js. See.
 * Add scripts / styles / fonts to the head in  via the hook BeforePageDisplay :

'''Loading JavaScript that is required for other modules:

Since MediaWiki 1.26 all of MediaWiki's JavaScript is loaded asynchronously. If one doesn't load the external code through the ResourceLoader and declare dependencies, you have no guarantee that jQuery (or anything else) will be available at the time you load your code.

-> Possibilities:
 * Add JavaScript code itself to Common.js (worked for me).
 * mw.loader.usi‌​ng would be a good solution for this. But at the moment it doesn't accept URLs and thus external scripts.
 * Use one of two possible workarounds given at https://phabricator.wikimedia.org/T27962#3790660

'''jQuery:
 * jQuery has been introduced in MediaWiki core as of MediaWiki 1.16 and is loaded by default on every page as of 1.17 (see JavaScript).
 * One doesn't find any "jquery" term within the source code of the page though.
 * Add jquery ready function to Mediawiki:Common.js: just write  without script tags.
 * If you add  to the wikitext of a page, you'll get an error.
 * If you add a script.js (that contains jQuery) somewhere in your php files, there might be an error "$ is not defined". If you load the script via Mediawiki:Common.js there is no problem.

Search / Replace
The Wikimedia Foundation uses CirrusSearch (ElasticSearch). More info:
 * Help:CirrusSearch
 * http://blog.wikimedia.org/2014/01/06/wikimedia-moving-to-elasticsearch/
 * How to search within wikitext: Use  (Help:CirrusSearch)
 * Some search operations (german)
 * With Extension:CirrusSearch it is possible to use CirrusSearch on own wikis.
 * Since MediaWiki 1.28, CirrusSearch supports indexing and searching of properties of files - see here

"Usual" MediaWiki uses LuceneSearch: Good workaround: Use the search function of Extension:Replace Text (without replacing anything, i.e. don't carry out the 2nd step, just do the 1st one). It also finds part of a word :)
 * "The search functionality can be considered to operate on whole words." -> You won't get the desired results if you enter only a part of a word :(
 * See Help:Searching for more info

Other search engines:
 * Extension:SphinxSearch

Misc:
 * Eliminating Wiki Markup from Search Results
 * Add Search Suggestions to inputbox

Replace:
 * Extension:ReplaceText works fine - in terms of Regex (regular expressions) only the following special characters are allowed:  -   for example doesn't work
 * To use other (all) Regex commands, use Extension:MassEditRegex
 * Do not alter the database with offline tools like Notepad++, see Topic:Ubxsfo482b58tlop.
 * People also recommend to use Pywikibot to do replacements on the wiki.

Users
Benutzerkonto anlegen = use PW that was entered before Per E-Mail = use random PW and mail it to new user
 * If admin creates a user account (for someone else):
 * Account names (usernames) are case sensitive. Not allowed characters in usernames by default:  and   (see Manual:$wgInvalidUsernameCharacters). Spaces are allowed.
 * Change email address of an user:
 * Mass delete (spam) users: Possible with Extension:BlockAndNuke in combination with Extension:UserMerge - see this paragraph

Permissions

 * Important to know:  means everyone, it doesn't mean "only anons"!
 * Thread:Project:Support desk/Bureaucrat can degrade sysop!?
 * Manual:User_rights
 * Default_rights

'''Groups
 * To define a new group just use a line in LocalSettings.php with  (it's not necessary to create a page MediaWiki:Group-Test-Gruppe, but it's recommened - see here)
 * How to add bureaucrats to protection groups
 * To disable for everyone and also users that don't belong to a certain group "Test-Gruppe":

Feed

 * Per default feeds give only 50 entries. To increase it change $wgFeedLimit.
 * Category:Feed variables
 * Category:Feed generator extensions
 * Discussion on how to use a RSS feed from MediaWiki to use in Social Media:
 * Feeds Available from MediaWiki
 * By default the Recentchanges feed is only renewed after 60 seconds - see Manual:$wgFeedCacheTimeout

Multilingual Wiki

 * Manual:Wiki_family
 * Discussion about alternatives to a wiki family:
 * Extension:Translate
 * Opinion from Marc (german):

Namespaces

 * To see all namespaces used on a wiki (with their numbers): use URL
 * All namespaces used by MediaWiki itself and its extensions: Extension default namespaces

'''Custom namespaces:
 * "Numbers from 3000 and higher are a good pick for system administrators to define their custom namespaces."
 * Manual:Using custom namespaces
 * Change ids of custom namespace: One way (didn't test it)

API

 * Get the content part of a page via the API:
 * Special:ApiSandbox
 * Other stuff: search for  on this page

Connecting WordPress with MediaWiki
Single Sign-On
 * Use Extension:WPMW
 * If WordPress (WP) is not installed in a higher level folder but in the same folder as MediaWiki (MW) use this WordPress plugin to fix cookie problems

Run MW and WP on the same domain (without subdomains)

Say you want your wiki to be located at example.com/wiki and at the same time you want your WordPress pages to be at example.com/word and example.com/press - and: the homepage example.com should be also a WordPress page.

This worked for me: RewriteEngine On RewriteRule ^wiki/(.*)$ /mediawiki/index.php?title=$1 [PT,L,QSA] RewriteRule ^wiki/*$ /mediawiki/index.php [L,QSA] RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC] RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301]
 * Install MediaWiki in folder root/mediawiki and WordPress in root/wordpress.
 * In WP Dashboard -> Settings -> General set the following:
 * WordPress Address (URL): http://domain.com/wordpress (should be set to this already by the installation)
 * Site Address (URL): http://domain.com/
 * Copy the index.php from root/wordpress to root/ and change the line  to   (see also )
 * Now comes the magic: Copy the content of root/wordpress/.htaccess and generate the following .htaccess file in root/ :
 * 1) BEGIN MediaWiki
 * 1) for Short Wiki URL:
 * 1) To redirect all users to access the site WITHOUT the www. prefix,
 * 2) (http://www.example.com/... will be redirected to http://example.com/...)
 * 3) adapt and uncomment the following:
 * 1) END MediaWiki

 RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule. /index.php [L]  $wgScriptPath      = "/mediawiki"; $wgArticlePath = "/wiki/$1"; $wgUsePathInfo = true;
 * 1) Copy the content of root/wordpress/.htaccess and add it below:
 * 2) BEGIN WordPress
 * 1) END WordPress
 * Make sure that you do not add a line like the  since this would forward the homepage to your wiki (we don't want this since we want a WordPress homepage).
 * This tutorial assumes that you use Short URLs for your wiki - I use the following lines in my LocalSettings.php:
 * You don't have to delete the original .htaccess file in root/wordpress/.htaccess.

Messages / Languages

 * If you want to see system messages in another language add  to the URL (for english use   for example)
 * You can find the message you want to change by adding  to the URL.
 * MediaWiki:Copyright is only shown if  is set to something else than   (also works if one uses   but in this case an empty image is put into the footer)

Misc

 * A better diff tool that recognizes if a wikitext block was only moved: http://www.mediawiki.org/wiki/Thread:Project:Support_desk/Better_diff_tool%3F#Better_diff_tool.3F_18763
 * Mass rename pages: Manual:MoveBatch.php,
 * Mass delete pages: Manual:deleteBatch.php works fine. Extension:Nuke does not see imported pages and is limited to pages that are shown under Recent Changes.

'''Timezone issues:
 * https://wiki.sourcefabric.org/display/CS/Adjust+Timezone+on+Your+Shared+Host

'''Security:
 * Make a mirror of your wiki: http://wiki.laub-home.de/wiki/Mediawiki_Mirror_Skript (German)

Creating content

 * Text Editor support
 * How to do syntax highlighting in WikiEditor: wikEd
 * Half automated editor: https://de.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser

Some special wikitext:
 * = horizontal rule
 * = show code in PHP highlighting (requires Extension:SyntaxHighlight GeSHi)
 * - see Manual:Collapsible elements

Templates

 * See which pages include a certain template: Navigate to template and hit "What links here" (in the toolbox)
 * Use "|" as an screen output in templates: " &amp;#124; ", Example
 * Use table in template: with Template:!
 * String templates: w:Template:String_templates_see_also_text

Parameters

 * How to use parameters in templates: Template
 * If you use  within your parameter content, you can't use Anonymous parameters - just use   before the first parameter content. If you have other parameters put ,   ... before them.   works great too.
 * When applying ParserFunctions to template parameters, a pipe symbol  may be used - see Help:Parser functions in templates and Difference between  and
 * Only output parameter if it's non empty:

Including
Go the page, click on "What links here" and "Hide Links" and "Hide redirects". Then one can see the transclusions easily.
 * If the source is in the Template namespace, just use the name itself, alone:
 * If the source is in the Main article namespace, you must put a colon in front of the name, thus:
 * If the source is in any other namespace (e.g., "User:Example"), you must use the full name, including the namespace, thus:
 * Noinclude, includeonly, onlyinclude:
 * noinclude: displayed only when the template page is being viewed directly; will not be included; useful for a description how to use the template and for
 * includeonly: displayed only when the page is being included. Useful for adding all pages containing a given template to a category, but not the template itself.
 * onlyinclude: only text surrounded by "onlyinclude" markup should be transcluded onto another page. It often overrules the other include tags: If there is at least one pair of "onlyinclude" tags on a page, then whenever this page is transcluded, it is only the material within the "onlyinclude" tags which gets transcluded.
 * If you want to know on which pages you've included a certain other page (with ):

Discussions & Watch/Unwatch
How to add this script to your site. Download the files. Add your domain under https://github.com/FlominatorTM/wikiblame/blob/master/wikiblame.php#L73 like this:. Upload the files to your server.
 * Edit watchlist: Special:EditWatchlist, in German Spezial:Beobachtungsliste_bearbeiten
 * If a watched page is moved, the old and the new are watched after the move (result of a test by myself).
 * If you want to hide edits from other users (so that they don't get a mail notification about it): Check "minor edit" when saving ("Replace all" uses this minor edit too) and make sure the users don't have the checkmark in "E-mail me also for minor edits of pages and files" (also see Thread:Project:Support desk/Hide (bot) edits from other users)
 * Script to see who added / edited what: https://github.com/FlominatorTM/wikiblame

Liquid Threads
Update: Extension:LiquidThreads (LQT) is no longer maintained and replaced by Flow

Old stuff (just for the record):
 * Namespaces that LQT adds: Extension_default_namespaces
 * How to prevent anons from using LiquidThreads
 * '''Header
 * If a LQT thread is started in a discussion page, the LQT header seems to be generated (red "Kopfbereich ergänzen" changes to "Bearbeiten Versionen Löschen")
 * If one adds LQT to a page, the Edit and Delete links at the top disappear. You can find them in the LQT header (Discussion).
 * There are 2 user preferences (see Manual:$wgDefaultUserOptions at the very end of the table):
 * lqt-watch-threads: Selbst erstellte oder von mir bearbeitete Themen beobachten (true by default)
 * lqtnotifytalk: Bei Antworten zu beobachteten Themen E-Mails senden (false by default)
 * Problems (with 2.0 alpha):
 * lqt-watch-threads works - but after replying to a thread you have to refresh the page (clear cache) to see "unwatch" instead of "watch" (if you start a new thread it works just fine).

Parser functions
):
 * Check if a "certain string" contains a certain "search-string":
 * Documentation for parser function #if: Help:Extension:ParserFunctions
 * Doing math / calculation / calculating: See Help:Extension:ParserFunctions and https://meta.wikimedia.org/wiki/Help:Calculation
 * Check whether or not a text/word exits as a wiki page: #ifexist
 * #if and tables: To prevent empty paragraphs and breaks, use this code (notice the
 * usual cells
 * without if
 * without if
 * Add references tag plus heading automatically if a ref tag is entered? Help_talk:Extension:ParserFunctions, Solution: Thread:Project:Support_desk/_How_to_use_within_parser_function%3F

'''#time
 * is identical to, except that it uses the local time of the wiki (I didn't have to set  ,   gave the right time anyway).
 * Check if a date is in the past or not:

Images & Files

 * Turn off link to image description page:  (see also Help:Images)
 * Directly link to a PDF instead of its description page: use  instead of
 * Get path to file:  - see here
 * Licensing

HTML

 * This HTML is permitted (allowed): https://meta.wikimedia.org/wiki/Help:HTML_in_wikitext
 * Using  properly: https://meta.wikimedia.org/wiki/Help:HTML_in_wikitext#.3Cdiv.3E
 * When, the wiki will allow raw unchecked HTML in   sections
 * You can't set group permissions to allow some to use raw HTML and some to not use it.
 * Better solution than allowing RawHtml: Extension:Secure HTML
 * Allow : Manual:$wgAllowImageTag

TOC / Headlines

 * Making a heading that does not show up in TOC: http://meta.wikimedia.org/wiki/Help:Section#Making_a_heading_that_does_not_show_up_in_ToC - alternative: http://en.wikipedia.org/wiki/Template:Fake_heading
 * anywhere on the page will remove ALL edit links on an article.
 * Show numbers in front of headlines: Add  to LocalSettings.php (see Auto-number headings)
 * To put  after number of h2 headlines in the TOC: http://stackoverflow.com/a/32347680/3194543

Categories

 * Hide Categories by adding  to category page (see Help:Categories)
 * Showing number of pages in subcategories (instead of number of subcats)
 * Hiding certain pages in categories is not possible (see here).
 * Help:Categories says: "It is a good idea to organize all categories into a hierarchy with a single top level category." See also this support thread.
 * Show pages from all categories except one category (german)
 * Thread:Project:Support desk/Random page from certain category?

Linking

 * Linking between Wikis: http://meta.wikimedia.org/wiki/Help:Interwiki_linking, Link on german wikipedia: Artikel
 * Template:Softredirect
 * To display a link without the arrow icon, place the external link syntax between  tags.
 * Linking to user's user page:
 * Manual:Redirect_to_the_user's_user_page
 * Avoid auto-linking of URLs:
 * Wrap URL in nowiki tags:
 * In SMW: use  when querying data, see  and Topic:T9gishan276abiu0
 * In SMW: use  when querying data, see  and Topic:T9gishan276abiu0

Misc

 * MW was released to the public in 2002. MW is supported with over 2,000 extensions. It is available in 300 languages.
 * Blog article about User engagement: http://blog.wikimedia.org/2013/02/22/onboarding-results/, Suggest Bot: https://en.wikipedia.org/wiki/User:SuggestBot
 * List of Magic Words
 * If you want to show the date on which an article was last updated:

'''Market share:
 * MediaWiki has a CMS marketshare of 0,2 %.
 * http://trends.builtwith.com/cms/MediaWiki/Market-Share