How to know the version of PHP and other software via SSH

How to know the version of PHP and other software from the console on your VPS/dedicated server

In order to find out the version of the software you need, you need to connect to the VPS/dedicated server via SSH. And enter the appropriate commands. To find out the version of PHP:

php -v

nginx version:

nginx -v

mysql:

mysql -V

Apache: On CentOS 6, 7:

httpd -v

On Debian 7, 8 and Ubuntu 16, 18:

apachectl -v
Need help?Our engineers will help you free of charge with any question in minutesContact us