You can update MediaWiki to run the update.php file via command prompt, but you may face the issue in this process hence it is recommended to update Mediawiki via web browser, and here are the steps mentioned below.
Step 1: Replace the name of LocalSettings.php with LocalSettings-old.php Or your preferred name.
Step 2: Open your website in the web browser and begin the installer.
Step 3: Enter all the fields such as MySQL user, database, and password with the same information as the existing installation.
Step 4: Run the installer, it will recognize the existing database table and will upgrade their schema.
Step 5: Remove the new LocalSettings.php file that you had created
Step 6: Replace the name of LocalSettings-old.php to LocalSettings.php.