MediaWiki - cllu/.rc GitHub Wiki

Setup MediaWiki 1.26.2 on Heroku

$ wget and uncompress
$ git init && git add .
$ git commit -m "MediaWiki release 1.21.2"
$ php composer.phar update
$ git rm -r --cached vendor/ # remove vendor
$ echo "/vendor/" > .gitignore
$ git add .gitignore composor.lock
$ git commit -m "Update dependencies, remove vendor folder"
$ git push heroku master

go to the web ui, and set up the wiki. after that, download the generated LocalSettings.php. Replace the database part:

## Database settings
$_wgDBConnectionString = getenv('DATABASE_URL');
if (preg_match('%(.*?)://([^:]+):([^@]+)@([^:]+):(\d+)/(.*)%', $_wgDBConnectionString, $regs, PREG_OFFSET_CAPTURE)) {
  $wgDBtype = $regs[1][0];
  $wgDBuser = $regs[2][0];
  $wgDBpassword = $regs[3][0];
  $wgDBserver = $regs[4][0];
  $wgDBport = $regs[5][0];
  $wgDBname = $regs[6][0];
} else {
die("Failed to parse DB connection string");
}
$ git add LocalSettings.php
$ git push heroku master

Done