Difference between revisions of "Notes on upgrading this MediaWiki"

From PublicWiki
Jump to: navigation, search
 
(fix upgrade instructions again)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Step 1: Backup LocalSettings.php''''
+
Note: the following are instructions for upgrading between minor versions; for major versions (x.y versions, as opposed to x.y.z versions), you should read the documentation for the revision.
  
'''Step 2: Unpack MediaWiki tarfile into the proper directory'''
+
'''Step 1:''' Backup LocalSettings.php
  
'''Step 3: Copy LocalSettings.php into $MEDIAWIKI_ROOT'''
+
'''Step 2:''' Unpack MediaWiki tarfile into the proper directory
  
'''Step N: Reinstall SpamBlacklist'''
+
'''Step 3:''' Make the config/ subdirectory world-writeable.
 +
 
 +
'''Step 4:''' Run the installation script to generate a new LocalSettings.php file.
 +
 
 +
'''Step 5:''' Copy the config/LocalSettings.php to $MEDIAWIKI_ROOT/LocalSettings.php, and make the config/ directory read-only again.
 +
 
 +
'''Step N:''' Reinstall SpamBlacklist and download the default blacklist
 
As far as I know, this must be reinstalled whenever you update MediaWiki to a new version; to do this, run the following:
 
As far as I know, this must be reinstalled whenever you update MediaWiki to a new version; to do this, run the following:
 
  cd $MEDIAWIKI_ROOT
 
  cd $MEDIAWIKI_ROOT
Line 11: Line 17:
 
  cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/wikipedia co extensions/SpamBlacklist
 
  cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/wikipedia co extensions/SpamBlacklist
 
  cd extensions/SpamBlacklist
 
  cd extensions/SpamBlacklist
  chmod +x load_lists
+
  wget 'http://meta.wikimedia.org/w/index.php?title=Spam_blacklist&action=raw'
  ./load_lists
+
 
:Then, follow the instructions in the .  Re-run the load_lists script periodically to get the latest spam blacklist.
+
'''Step N+1:''' Copy over the old $MEDIAWIKI_ROOT/extensions/SpamBlacklist/local_blacklist to the new tree.
 +
 
 +
'''Step N+2:''' Edit your new LocalSettings.php.  Change the line that sets $wgScriptPath to read:
 +
  $wgScriptPath     = "/wiki";
 +
:and append the following lines to the end of the file, just before the closing ?>:
 +
# Enable sysop range blocks and spam content blacklist
 +
$wgSysopUserBans    = true;      # Allow sysops to ban logged-in users
 +
$wgSysopRangeBans  = true;      # Allow sysops to ban IP ranges
 +
require_once( "$IP/extensions/SpamBlacklist/SpamBlacklist.php" );
 +
  $wgSpamBlacklistFiles = array(
 +
    "$IP/extensions/SpamBlacklist/wikimedia_blacklist",
 +
    "$IP/extensions/SpamBlacklist/local_blacklist"
 +
);
 +
 
 +
'''Step N+K:''' Re-run the load_lists script periodically to get the latest spam blacklist.

Latest revision as of 22:28, 1 August 2005

Note: the following are instructions for upgrading between minor versions; for major versions (x.y versions, as opposed to x.y.z versions), you should read the documentation for the revision.

Step 1: Backup LocalSettings.php

Step 2: Unpack MediaWiki tarfile into the proper directory

Step 3: Make the config/ subdirectory world-writeable.

Step 4: Run the installation script to generate a new LocalSettings.php file.

Step 5: Copy the config/LocalSettings.php to $MEDIAWIKI_ROOT/LocalSettings.php, and make the config/ directory read-only again.

Step N: Reinstall SpamBlacklist and download the default blacklist As far as I know, this must be reinstalled whenever you update MediaWiki to a new version; to do this, run the following:

cd $MEDIAWIKI_ROOT
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/wikipedia login
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/wikipedia co extensions/SpamBlacklist
cd extensions/SpamBlacklist
wget 'http://meta.wikimedia.org/w/index.php?title=Spam_blacklist&action=raw'

Step N+1: Copy over the old $MEDIAWIKI_ROOT/extensions/SpamBlacklist/local_blacklist to the new tree.

Step N+2: Edit your new LocalSettings.php. Change the line that sets $wgScriptPath to read:

$wgScriptPath	    = "/wiki";
and append the following lines to the end of the file, just before the closing ?>:
# Enable sysop range blocks and spam content blacklist
$wgSysopUserBans    = true;      # Allow sysops to ban logged-in users
$wgSysopRangeBans   = true;      # Allow sysops to ban IP ranges
require_once( "$IP/extensions/SpamBlacklist/SpamBlacklist.php" );
$wgSpamBlacklistFiles = array(
    "$IP/extensions/SpamBlacklist/wikimedia_blacklist",
    "$IP/extensions/SpamBlacklist/local_blacklist"
);

Step N+K: Re-run the load_lists script periodically to get the latest spam blacklist.