Though this doesn't answer my question completely. I think it is good start
Please guide, if you know a better or efficient method over this.
(Obtained below information from link --> https://docs.bitnami.com/aws/apps/mediawiki/#first_steps )
How To Upgrade MediaWiki?
It is strongly recommended that you create a backup before starting the update process. If you have important data, it is advisable that you create and try to restore a backup to ensure that everything works properly.
Migrating The Database From An Old Version To A New One
To migrate the database from an old version to a new one, follow these steps:
Launch a new MediaWiki cloud server instance.
Copy the database backup to the new server.
Stop all servers and start only MySQL.
sudo /opt/bitnami/ctlscript.sh stop
sudo /opt/bitnami/ctlscript.sh start mysql
Remove the previous database and create the new one. You can configure the database user password with a secure password.
mysql -u root -p
mysql> drop database bitnami_mediawiki;
mysql> create database bitnami_mediawiki;
mysql> grant all privileges on bitnami_mediawiki.* to 'bn_mediawiki'@'localhost' identified by 'DATABASE_PASSWORD';
Restore the new database:
mysql -u root -p bitnami_mediawiki < backup.sql
Edit the MediWiki configuration file to update the database user password (the same that you set previously) at /opt/bitnami/apps/mediawiki/htdocs/LocalSettings.php:
$wgDBpassword = "DATABASE_PASSWORD";
/opt/bitnami/apps/mediawiki/htdocs/files directory from the old installation to the new one.
If you have installed plugins in the previous version, copy the folders from the vendor/plugins directory into the new installation directory, into the plugins directory.
Restart the servers.
sudo /opt/bitnami/ctlscript.sh restart