MediaWiki FAQ (52 Articles)

How to assign users to groups in MediaWiki?

If you want to grant extra permissions to some of your registered users in MediaWiki, you have to login with your admin user, click on the Special pages link at the left column and then follow the User rights management link. On the next page, enter the user name you want to modify in the text box and hit the Edit user groups button. Under the text box you can see a section with all user groups available in your MediaWiki installation. In front of each group there is a check box. Check the groups where the user should be added and press the Save user groups button. After that the user will have the permissions of the selected groups.…

How to get complex math formulas working in MediaWiki

This article explains how to overcome issues with Math formulas not properly displaying in MediaWiki with enabled Math Support. The problem is mainly caused by the fact that the default Math Support in MediaWiki does not include all desired formulas or mathematical signs. Particularly more complex ones. If you are getting an error that the formula you are trying to use is not recognize follow these steps. 1. Enable Math Support for your MediaWiki 2. Download this file and place it in the cgi-bin folder for your account with execute permissions. 3. Make sure there is a directory under the cgi-bin folder called mathtex and set its permissions to 755. 4. Open the Math.php file located in the /includes folder of your MediaWiki and find this function (at the bottom): public static function renderMath( $tex, $params=array() ) {     global $wgUser;     $math = new MathRenderer( $tex, $params );     $math->setOutputMode( $wgUser->getOption('math'));     return $math->render(); } Add this line after the first line:     return '<img class="tex" src="http://www.example.com/cgi-bin/mathtex.cgi?' . rawurlencode($tex) . '"' . htmlspecialchars($tex) . '">'; The result should look like this: public static function renderMath( $tex, $params=array() ) {     return '<img class="tex" src=" http://www.example.com/cgi-bin/mathtex.cgi ?' . rawurlencode($tex) . '"' . htmlspecialchars($tex) . '">';     global $wgUser;     $math = new MathRenderer( $tex, $params );     $math->setOutputMode( $wgUser->getOption('math'));     return $math->render(); } Where http://www.example.com/cgi-bin/mathtex.cgi is the URL of the mathTeX cgi script you have just downloaded and placed on your account. That's it. All valid mathematical formulas should be loading properly for your MediaWiki installation now.…

How to convert your MediaWiki database to SQLite?

Sometimes, when you have a very popular MediaWiki web site with a lot of articles, the database becomes quite large. Slow MySQL queries could be generated and this will cause a negative impact to your web server performance. In such a case there are two possible solutions. You can either decrease the database size by removing the unnecessarily articles or you can migrate your MySQL database to SQLite . Prior to proceed with the migration it is recommended to create a full backup of your MediaWiki web site: http://www.siteground.com/tutorials/cpanel_crystal/backup.htm Use an SSH connection to your server. Alternatively, if you have a really large database with a lot of records in the text table (total size above 100MB) download the web site backup to your local computer and set the web site using your local web server. Run the following commands through a terminal window: cd your_current_wiki_folder php maintenance/dumpBackup.php --full --uploads > wiki-backup.xml tar -cipzf wiki_images.tgz images/ Replace your_current_wiki_folder with your actual MediaWiki directory. Download the latest stable version of MediaWiki from the following URL: http://www.mediawiki.org/wiki/Download Install it as per the manual installation instructions posted in the SiteGround's MediaWiki tutorial: http://www.siteground.com/tutorials/mediawiki/mediawiki_installation.htm Pick SQLite as the Database type. Complete the installation. Navigate to the new MediaWiki installation folder. Copy the wiki-backup.xml file under it. Execute the following command: php maintenance/importDump.php wiki-backup.xml The import procedure can take some time. It depends on the amount of the MediaWiki pages. The main page should be regenerated manually. Once the above procedure is completed all the other pages will appear in the new installation. At the end you should import the images. Navigate to the new MediaWiki folder and copy the wiki_images.tgz file under it. Then run the following commands: mkdir temp cd temp/ cp ../wiki_images.tgz ./ tar -xzvf wiki_images.tgz cd .. mkdir tempimg cp temp/images/*/*/* tempimg php maintenance/importImages.php tempimg/ Your new MediaWiki installation is ready to be used. If you are a SiteGround customer and you have difficulties with the above procedure you can always post an Exclusive Support Services request in the Script, Component or Module Configuration Assistance category: Our Senior Support Team members will complete the SQLite migration for you. Additional MediaWiki optimization tips can be found in the SiteGround's Website Optimization tutorial: http://www.siteground.com/tutorials/websiteperformance/optimize_mediawiki.htm …

I am getting ‘libgomp: Thread creation failed: Cannot allocate memory’ when uploading images to MediaWiki.

This error message appears when you try to upload an image with large dimensions to a MediaWiki website which is configured to use ImageMagick for image conversions. In order to resolve the issue, you would need to switch the conversion method from ImageMagick to GD Library by changing the following line in your LocalSettings.php file: $wgUseImageMagick = true ; to $wgUseImageMagick = false ; …

How to run the MediaWiki update script through a browser?

By default, when upgrading MediaWiki, you have to run the update.php file from a command prompt. This becomes a problem if you don't have SSH access to your account. Fortunately, there is a way to run the script through your browser. Follow the steps below to complete the process: Rename LocalSettings.php to something else (e.g. LocalSettings-old.php) Open your site in the browser and start the installer Fill in the fields using the same details (MySQL user, database, password) as the ones for the existing installation Start the installation - the install script will detect the existing database tables and upgrade their schema Delete the newly-generated LocalSettings.php file Rename the old file (LocalSettings-old.php) to LocalSettings.php This will complete the MediaWiki…

How to remove the ‘Powered by SiteGround cPAddons’ message from the MediaWiki footer?

SiteGround offers a customized cPAddons tool for easy automatic installation of several popular applications. All SiteGround packaged applications in cPanel's cPAddons have a link "Powered by SiteGround cPAddons" in their footer. The purpose of this link is to make the installations easily recognizable, as well as to popularize the tool so that more people can take advantage of the easy application management options it provides. We don't recommend removing the link, but if you are sure you want to remove it, here's how to do it: These instructions require you to edit a certain file. You can use the cPanel -> File Manager -> Code editor tool for easy file modification. Find the file includes/ Skin.ph p and locate the following line (line number 1406): $img = '<a href="http://www.mediawiki.org/"><img src="'.$url.'" alt="Powered by MediaWiki" /></a><br /></a> Powered by SiteGround <a href="http://www.siteground.com/" target="_blank" title="Web Hosting">Web Hosting</a>'; Remove this section from it: Powered by SiteGround <a href="http://www.siteground.com/" target="_blank" title="Web Hosting">Web Hosting</a>…

How to install MediaWiki?

MediaWiki is a free wiki application. It is used to run Wikipedia , the World's largest online encyclopedia, as well as many other wikis. Installing MediaWiki is not very difficult. You can check our MediaWiki installation tutorial for more information on the installation steps. However, many people find it hard to perform a script installation themselves. This is why many hosting providers offer automatic tools through which users can easily install an application in just a few clicks. As one of the leading hosts on the market, SiteGround offers automatic tools for easy application installation. Our customers can install MediaWiki in just a few clicks from their cPanel > Softaculous tool. For more information on how to install MediaWiki via Softaculous we also provide a detailed MediaWiki Softaculous installation tutorial . If you have problems installing MediaWiki yourself and your current host does nothing to help you, check our MediaWiki hosting package. SiteGround offers the best MediaWiki hosting and we'll assist you with any MediaWiki-related questions/problems you may have.…

How to change the color of the bottom borders in MediaWiki?

In order to change the color for the bottom borders (the lines under the headings) in MediaWiki, you should edit the skin's main.css file. For example, if you are using the default Monobook skin, the file you should edit is: /home/user/public_html/skins/monobook/ main.css Look for the following code: h1, h2, h3, h4, h5, h6 {     color: black;     background: none;     font-weight: normal;     margin: 0;     padding-top: .5em;     padding-bottom: .17em;     border-bottom: 1px solid #aaa;   You should edit the border-bottom: 1px solid #aaa; line. For example, if you wish to change the border color to blue, the line should be changed to:  border-bottom: 1px solid  #0066FF ; …

How to change the font color for the headings in MediaWiki?

In order to change the font color for the headings in MediaWiki, you should edit the skin's main.css file. For example, if you are using the default Monobook skin, the file you should edit is: /home/user/public_html/skins/monobook/ main.css Look for the following code: h1, h2, h3, h4, h5, h6 {     color: black;      background: none;     font-weight: normal;     margin: 0;     padding-top: .5em;     padding-bottom: .17em;     border-bottom: 1px solid #aaa;   You should edit the color:black; line. For example, if you wish to change the heading color to blue, the line should be changed to:     color: blue;   You can also use hex codes for the colors of your MediaWiki headings.…

How to change the font color for the content in MediaWiki?

In order to change the font color for the content in MediaWiki, you should edit the skin's main.css file. For example, if you are using the default Monobook skin, the file you should edit is: /home/user/public_html/skins/monobook/ main.css Look for the following code: #content {     background: white;     color: black;        border: 1px solid #aaa;     border-right: none;     line-height: 1.5em;   You should edit the color:black; line. For example, if you wish to change the font color to blue, the line should be changed to:     color: blue;   You can also use hex codes for the colors of your MediaWiki content.…

How to change the favicon in MediaWiki?

You can create a favicon manually on your computer or you can use an online favicon generator. Here are several such generators: Dynamic Drive Generator Graphics Guru Generator 1Favicon Generator Once you create the favicon, you should upload it to your MediaWiki folder. Then in LocalSettings.php you should add the following line: $wgFavicon = "$wgScriptPath/favicon.ico"; Clear your MediaWiki page cache to see your new favicon :)…

How to enable HTML tags in MediaWiki?

In order to use HTML tags such as <form> and <input> in your MediaWiki pages, you should add the following line to your LocalSettings.php file: $wgRawHtml = true; This is useful when you wish to add a PayPal button to your MediaWiki. Don't forget to insert your HTML code between an opening <html> and closing </html> tags.…

How to change the ‘Main Page’ title to something else.

The default name for the MediaWiki main page is Main Page . You can change this by editing the MediaWiki:Mainpage page. Go to: www.yourdomain.com/wiki/index.php?title= MediaWiki:Mainpage and click the edit button to edit the page. Change Main Page to the new page name you wish to use and save the change.…

How to change the default skin for guests in MediaWiki?

To change the MediaWiki skin for users which have not logged in, you should change the $wgDefaultSkin variable in LocalSettings.php . For example, if you wish to change the default skin to standard , you should open LocalSettings.php and change the $wgDefaultSkin variable to: $wgDefaultSkin = ' standard '; …

How to view the print-friendly version of a MediaWiki page?

By default, you should be able to view the print-friendly version of a MediaWiki page by clicking on the Printable version button located in the toolbox section on the left side of the wiki (assuming the default skin is used). However, if the button is missing, or you don't want to use it, you can simply add this string to the page's URL: &printable=yes and you will see the print-friendly version of the MediaWiki page. For example, if you wish to view the print-friendly version of: http://yourdomain.com/wiki/index.php?title=Main_Page    you should add &printable=yes to the URL so that in your browser the address is: http://yourdomain.com/wiki/index.php?title=Main_Page &printable=yes …

How to disable caching in MediaWiki?

If you wish to disable caching in your MediaWiki, you should open the LocalSettings.php file and add the following lines to it: $wgEnableParserCache = false; $wgCachePages = false; …

How to remove the additional footer links in MediaWiki?

By default, MediaWiki shows additional items in the footer such as the time of the last page modification, the privacy policy, etc. You can remove these items by modifying the skins file of your MediaWiki. The default skin's file is skins/ MonoBook.php . Open the file with a text editor and find this section:        // Generate additional footer links ?>             <ul id="f-list"> <?php         $footerlinks = array(             'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright',             'privacy', 'about', 'disclaimer', 'tagline ',         ); The items in the array represent the footer links in your MediaWiki. If you wish to remove a certain item from your footer, you should delete its entry from the array. For example, if you wish to remove the Privacy policy link, you should delete the 'privacy' item from the array. Then open your MediaWiki in a browser and clean the page cache to see the change.…

How to customize the MediaWiki sidebar?

To edit the links in your MediaWiki sidebar, you should log in as admin and edit the MediaWiki:Sidebar page. The format of the link items is: ** link target|link text The link target can be the name of an interface message, a wiki page or an external link. The link text can be the name of an interface message or plain text. For example, if you wish to edit the Help link by changing the text from Help to Support and pointing the link to www.siteground.com, you should edit the MediaWiki:Sidebar page and change: ** helppage|help to ** http://www.siteground.com|Support For more information on how to customize your MediaWiki sidebar, please check the official documentation .…