User Tools

Site Tools


mediawiki

Mediawiki

Upgrade Mediawiki

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

#mysqldump wikidb > mediawiki.sql

#cd /root #wget http://download.wikimedia.org/mediawiki/1.15/mediawiki-1.15.0.tar.gz #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

Reference: http://wowtutorial.org/tutorial/174.html

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

Install Message Box Templates for Mediawiki (mbox)

Install Mediawiki Parser Extension

Read: http://www.mediawiki.org/wiki/Extension:ParserFunctions 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)

1. Option 1: Take all of mediawiki's Common.css Style sheet and copy it. URL: http://en.wikipedia.org/w/index.php?title=MediaWiki:Common.css&action=edit Option 2: Copy the cut down version I created here: http://wiki.kartbuilding.net/Mediawiki:Common.css.txt

2. Login and browse to: http://yourwiki.com/index.php/MediaWiki:Common.css 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: http://en.wikipedia.org/wiki/Special:Export <br> Export the following page, ticking all three boxes ( Include only the current revision, not the full history, Include templates and Save as file ) Template:mbox Save the xml file to your computer

Browse to: http://yourwiki.com/index.php/Special:Import and upload the xml file. <br> This imports and creates around 34 template pages.

Create/Edit/Add Message Box

mediawiki.txt · Last modified: 2022/07/19 21:13 by 127.0.0.1