Spacemoose Spacemoose - 1 year ago 120
PHP Question

MediaWiki: How to Update.php maintenance script on wiki family?

I am running a MediaWiki wiki-family, with shared codebase and shared database. I recently succesfully upgraded to


My wiki got 4 prefixes atm, like so:


I try to run my update.php script like so:

php update.php --wiki myWikiName-de_ --doshared
php update.php --wiki myWikiName-en_ --doshared
php update.php --wiki myWikiName-es_ --doshared

on my server. This should in theory work. Sadly it ALWAYS uses the
and ignores my input..

PHP Notice: Undefined index: HTTP_HOST in /var/www/myWiki/wiki/LocalSettings.php on line 176
<br />
<b>Notice</b>: Undefined index: HTTP_HOST in <b>/var/www/myWiki/wiki/LocalSettings.php</b> on line <b>176</b><br />
MediaWiki 1.25.3 Updater

Your composer.lock file is up to date with current dependencies!
Going to run database updates for myWikiName-en_
Depending on the size of your database this may take a while!

Please someone tell me what i am doing wrong!

best regards,


leo leo
Answer Source

Try setting before running php update.php. The script might be looking for $_SERVER which, as you are running from the command line, is not available.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download