Skip to content

Instantly share code, notes, and snippets.

@Inquisitor-Sasha
Last active December 27, 2015 15:39
Show Gist options
  • Save Inquisitor-Sasha/7348768 to your computer and use it in GitHub Desktop.
Save Inquisitor-Sasha/7348768 to your computer and use it in GitHub Desktop.
This is a shell script that can be used with the MediaWiki extension SimpleFarm to create new wikis quickly with a single command from the MediaWiki directory. The number of commands needed when running the script can be reduced by manually replacing variables in the script with what they will always be. For example, if you use the same admin us…
#!/bin/bash
# Inquisitor Ehrenstein
# [email protected]
# GNU Free Documentation License
# $1 = Wiki name
# $2 = Wiki admin user name
# $3 = Wiki admin user password
# $4 = Wiki database name
# $5 = Database prefix
# $6 = Database user
# $7 = Database password
mv LocalSettings.php LocalSettings1.php
WIKI=$4 php maintenance/install.php $1 $2 --pass=$3 --dbname=$4 --dbprefix=$5 --dbuser=$6 --dbpass=$7
rm LocalSettings.php
mv LocalSettings1.php LocalSettings.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment