From Wiki

Jump to: navigation, search


Upgrade Mediawiki

#cd /home/mediawiki/
#tar -cf mediawiki.tar public_html
#cp mediawiki.tar /root

#mysqldump  wikidb > mediawiki.sql

#cd /root
#tar xvfz mediawiki-1.14.0.tar.gz
#Copy across files, overwriting files!!
#cp -R mediawiki-1.14.0/* /home/mediawiki/public_html

#Run Update Script
#cd /home/mediawiki/public_html/maintenance
#php update.php --aconf ../AdminSettings.php

#Troubleshooting "No superuser credentials" error
#cd /home/mediawiki/public_html
#cp AdminSettings.sample AdminSettings.php  
#vi AdminSettings.php  

#### Edit below lines to match your DB user and password ####
$wgDBadminuser      = 'wiki';
$wgDBadminpassword  = 'wikipassword';[/code]

#After edit the AdminSettings.php. You need to reapply update
#cd /home/mediawiki/public_html/maintenance
#php update.php --aconf ../AdminSettings.php


Disallow Anonymous Editing and Accounts

vi LocalSettings.php
//add in at the bottom:
// No anonymous editing allowed -
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['createaccount'] = false;

Install mediawiki from SVN

mkdir ~/public_wiki
cd public_wiki
svn co .


Install Message Box Templates for Mediawiki (mbox)

Install Mediawiki Parser Extension

Download and extract into /extensions/ParserFunctions/

vi LocalSettings.php 
//add in the following at the end: 
require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );

Add new Common.css Mediawiki Styles for message boxes

We are going to be copying and pasting the CSS styles for this. (i.e. CTRL+C and CTRL+V)


Option 1: Take all of mediawiki's Common.css Style sheet and copy it. URL:
Option 2: Copy the cut down version I created here:

2. Login and browse to: This will give you a special page you can create and save. Paste (CTRL+V) the above Common.css styles into this new page.

Export and Import Template Files

Browse to:
Export the following page, ticking all three boxes ( Include only the current revision, not the full history, Include templates and Save as file )


Save the xml file to your computer

Browse to: and upload the xml file.
This imports and creates around 34 template pages.

Create/Edit/Add Message Box


Personal tools