Easiest way of upgrading or updating Mediawiki version on Debian/Ubuntu/etc.

So far this is the easiest way I have found to update Mediawiki. This presumes SSH access.   Back up your database and files first!  
wget https://releases.wikimedia.org/mediawiki/1.31/mediawiki-1.31.1.tar.gz
(if going for another version, replace with the appropriate link)
tar -xvzf mediawiki-1.31.1.tar.gz
cp -rf mediawiki-1.31.1/* /var/www/YOURSITE
If your sites are stored elsewhere, replaces /var/www/YOURSITE with whatever the path name is. Copy with the rf flags forces over-write and copies recursively.
Visit https://yoursitename/mw-config/ in your browser
Follow the instructions from there – you will need the upgrade key from your existing LocalSettings.php file, which should be found in your existing Wiki directory via:

cat LocalSettings.php | grep -A 2 key


Mediawiki 403 forbidden errors after upgrading to Ubuntu 13.10

  A customer upgraded from 13.04 to 13.10 and their internal wiki was broken afterwards; for a simple Apache install where the wiki was installed at the web root and all access was via the LAN (thus they were happy with not restricting the access), the fix was to add:  
<Location /> Require all granted </Location>
  towards the bottom of:  
…just above the last line, which should be </VirtualHost>. Restart apache with:  
service apache2 restart
  After that you should be able to refresh and see your wiki as before.

New Mediawiki install produces error “Fatal exception of type MWException”

  Saw this on a new Mediawiki install where all of the optional extensions were selected, LocalSettings.php had been uploaded to the server and that’s as far as it would go.   To fix, open up LocalSettings.php and comment out the line:  
require_once( “$IP/extensions/LocalisationUpdate/LocalisationUpdate.php” );
  You should now be able to refresh the main page and start using your wiki.