How to check PHP and other software versions via SSH

Quick way to view installed software versions on your VPS or dedicated server.

When managing a server, you often need to quickly check the versions of installed components such as PHP, web server, database, and other services. This is useful for compatibility checks, planning updates, or troubleshooting issues.

Connect to your server via SSH and use the following commands:

Basic version check commands

  • PHP
    php -v
    
  • Nginx
    nginx -v
    
  • MySQL / MariaDB
    mysql -V
    
  • Apache
    • on CentOS / Rocky / AlmaLinux:
      httpd -v
      
    • on Debian / Ubuntu:
      apache2 -v
      
    • or
      apachectl -v
      

Additional commands

  • PHP-FPM (if used)
    php-fpm -v
    
  • MariaDB (if used instead of MySQL)
    mariadb -V
    
  • PostgreSQL
    psql --version
    
  • Redis
    redis-cli --version
    
  • Node.js
    node -v
    
  • Composer
    composer --version
    

Our products and services

Web HostingReliable hosting services for websites of any scale.
Order
VPSFlexible cloud infrastructure with full root access.
Order
Dedicated ServersBare metal servers for maximum performance.
Order

Useful tips

  • To get detailed PHP information including all loaded modules:
    php -i
    
  • To check the version of a specific PHP extension:
    php -m | grep -i имя_модуля
    

These commands work on most modern Linux distributions and allow you to quickly get the information you need.

Help

If you have any questions or need assistance, please contact us through the ticket system — we're always here to help!

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