Mediawiki Upgrade Tutorial with Spamblacklist patch
Please drop a line on the talk page with feedback or comments on this page
s23/seti23 is not responsible for any damages or data loss you experience by following this tutorial.
Maybe Wikipedia/Mediawiki developers are taking care of things in the next version of Mediawiki, but in the mean time smaller wikis are getting totally blasted with spam. This is totally wearing the wiki maintainers down, stifling creativity and constructivness. Most of the creative energies are spent on making monotonous repetitive rollbacking to non-spammed page versions and IP blocking which is ineffective against multiple dynamic IP spam attacks. So this wikipage has been created to help those folks who are looking to control the amount of spam on their wiki.
This tutorial assumes...
that you are somewhat familiar with:
- using a *nix shell,
- installing patches,
- recompiling sourcecode,
- and reinstalling the mediawiki installation.
- A working mediawiki installation of the 1.4 or 1.5 branch. (Yes, sadly you will need to upgrade to a these more recent branches, and only then patch and recompile). See Mediawiki Upgrade Tutorial with Spamblacklist patch#Upgrading Mediawiki
- The SpamBlacklist extension Download files here.
(If you have Version 1.4 or 1.5 skip this step)
Backup before you Upgrade
Making a backup of a mediawiki installation is basically a four-step process. Copying the regular files, making a database backup,compressing the files and sending them to a remote backup location.
Copy "w" directory
1. If you follow the standard wikipedia way to hide "index.php" in URLs and your webserver's document root is /var/www/, you will have the wiki physically installed in /var/www/w and an alias for /var/www/wiki in your apache config. Hence, something like:
- cp -r /var/www/w /home/backup/w_20051223
would be sufficient.
If you are not hiding index.php and you have installed your wiki to a physical directory /var/www/wiki or another place, change the path accordingly. (cp -r /path/to/your/wiki /path/to/your/backup)
2. To make a dump of the Mysql database, use the "mysqldump" command on a console.
- mysqldump -u root -p wikidb > wikidb_20051223.sql
- tar zcvf wikidb_20051223.sql.tar.gz wikidb_20051223.sql
- tar zcvf w_20051223.tar.gz /home/backup/w_20051223
Copy to remote location
- scp wikidb_20051223.sql.tar.gz email@example.com:/home/user/backups/
- scp w_20051223.tar.gz firstname.lastname@example.org:/home/user/backups/
Keep in mind that your backup files will include passwords for the wiki database.
Before putting them in a public location consider editing LocalSettings.php (and possibly AdminSettings.php if existing).