How to check the PHP version
Knowing the exact PHP version your server runs helps you verify compatibility, meet security requirements, and plan upgrades. This guide shows three quick methods -cPanel, command line, and a phpinfo()
script – so you can confirm the version that powers your sites.
Method 1: View the PHP version in cPanel
1. Log in to your cPanel account.
2. Scroll to the Software section.
3. Click Select PHP Version (sometimes labeled MultiPHP Manager).
Your current PHP version appears at the top of the page or next to each domain.
(Optional) If multiple versions are available, you can switch to a newer one here – be sure to test after changing.
Method 2: Create a temporary phpinfo()
page
1. In your site’s document root, create a file named info.php
.
2. Add the following one‑line script and save: <php phpinfo(); ?>
3. Visit https://your‑domain.com/info.php in a browser.
4. The top of the page lists the PHP version and SAPI (server API).
5. Important: delete the info.php
file afterward. Exposing detailed server data can create a security risk.
Method 3: Check via the command line (SSH)
1. Connect to your hosting account with SSH.
2. Run:php
-v
The first line of output shows the full version, build date, and architecture – for example:PHP 8.3.5 (cli) (built: Apr 23 2025 09:41:27) (NTS)
By quickly confirming your PHP version, you can ensure your applications run on a supported release and plan upgrades confidently. If you encounter issues or need help updating, contact our Support Team for assistance.