Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to Check Your PHP Version and Settings

This guide shows you easy ways to find out which PHP version your server uses and how PHP is set up.

VPS and Cloud Servers2 min read12 steps

What is PHP?

PHP is a programming language. Many websites, including WordPress, run on it. Like apps on a phone, PHP has versions, such as 8.1 or 8.2. Some scripts only work with certain versions.

Method 1: Use the command line

The command line is a text screen where you type commands. You reach it on a VPS through SSH.

  1. Log in to your server over SSH.
  2. Type this and press Enter:
    php -v
    This prints the PHP version used on the command line.
  3. To see the list of loaded add-ons, called modules, type:
    php -m
  4. To see where the main settings file is, type:
    php --ini
    That file is usually named php.ini.

Method 2: Use a test page

This shows the version your website really uses. The website version can differ from the command line version.

  1. Open your file manager or connect with FTP. FTP is a way of moving files to a server.
  2. Go to the folder of your website, often named public_html.
  3. Create a new file called info.php.
  4. Put this single line in it:
    <?php phpinfo();
  5. Save the file.
  6. Open yourdomain.com/info.php in your browser, with your own domain name.
  7. Read the top of the page for the PHP version. Scroll down to see settings such as memory_limit and upload_max_filesize.
  8. Delete the info.php file when you are done.
Tip: Always delete info.php afterwards. The page shows private details about your server that strangers could use.

Method 3: Check in your control panel

Many control panels have a page to pick the PHP version for a site. Look for a menu with a name like PHP version or MultiPHP. If you cannot find it, ask Hostvento support.

Why this matters

  • Old PHP versions stop getting security fixes.
  • New plugins may need a newer version.
  • A wrong version can cause errors on your site.

Take a backup before you change the PHP version of a live site.

Quick recap

  • php -v shows the command line PHP version.
  • A page with phpinfo(); shows the website version and settings.
  • Delete the test page afterwards.
  • Back up before changing versions.