MediaWiki 1.30 went end of life a year and a half ago (June 2019), and is no longer receiving any security or maintenance updates. You should definitely upgrade that wiki if it is exposed to the internet in any fashion. See Version lifecycle for more information on MediaWiki EOL dates.
For PHP and MySQL versions, check the Compatibility page
The general recommendation is to install the dependencies (apache, PHP, mysql) via your distribution's package manager and then keep them updated via said package manager on a regular basis. MediaWiki remains compatible with the older versions present in package managers from e.g. Debian stable for quite some time. Unless you are doing a very exotic setup (or if you're on Windows) there's generally no need to install the underlying dependencies manually.