To check your PHP version, run php -v on the server, look at your hosting panel’s PHP settings, or open WordPress Tools → Site Health → Info → Server. The version that matters is the one your web server uses, which is not always the one the command line shows. To update, pick a newer version in cPanel or Plesk on shared hosting, or install it with your package manager on your own server, then restart PHP and test the site.
Why the PHP version matters
Each PHP branch gets about two years of active support and two more years of security fixes. After that, newly discovered flaws are no longer fixed, as the October 2026 critical vulnerabilities showed for PHP 8.1 and older. Newer versions are also noticeably faster. As of October 2026, 8.3, 8.4 and 8.5 are the best choices; 8.2 receives security fixes only until December 31, 2026.
Ways to check your PHP version
| Where | How | Notes |
|---|---|---|
| Command line (Linux, macOS, Windows) | php -v | Shows the CLI version, which may differ from the web server’s |
| phpinfo page | Create a file with <?php phpinfo();, open it in the browser | Shows exactly what the web server runs; delete the file right after |
| WordPress | Tools → Site Health → Info → Server | No server access needed |
| cPanel | Select PHP Version or MultiPHP Manager | Can be set per domain |
| Plesk | Domain → PHP Settings (or Hosting & DNS → PHP) | Also shows the handler (FPM, FastCGI) |
| XAMPP / local | php -v in the XAMPP shell, or the dashboard’s phpinfo link | Only your local copy, not the live site |
Can I check the PHP version of any website?
Sometimes. Some servers announce it in the X-Powered-By response header, for example X-Powered-By: PHP/8.3.14, which you can see with our HTTP headers tool. Many sites hide this header on purpose, and sites behind a CDN may not show it at all, so a missing header does not mean the site is not using PHP. Online “PHP version checkers” rely on the same header and are no more accurate. If you run the site, hiding the header with expose_php = Off is a sensible small hardening step.
How to update PHP
Shared hosting (cPanel or Plesk)
- Take a full backup of files and the database.
- Check that your CMS, theme and plugins support the target version; WordPress shows warnings in Site Health.
- Select the newer version in MultiPHP Manager (cPanel) or PHP Settings (Plesk) and save.
- Open the site and the admin area and look for errors. If something breaks, switch back and fix the incompatible plugin first.
If the panel does not offer a current version, ask your host when it will. Hosting providers are responsible for patch releases such as 8.3.35 to 8.3.36 within a branch.
Your own Linux server
# Debian / Ubuntu: install security updates from the distribution
sudo apt update && sudo apt upgrade
# RHEL / AlmaLinux / Rocky / Fedora
sudo dnf upgrade
# then restart PHP-FPM (service name depends on the version) and the web server
sudo systemctl restart php8.3-fpm
php -v
Distributions apply security fixes inside their own package versions, so the number may stay the same after a patch; your distribution’s security advisories list which package version contains the fix. Moving to a new branch (for example 8.1 to 8.3) usually means adding the new version’s packages and switching the web server or FPM pool to it.
Windows (IIS)
Download the non-thread-safe build from windows.php.net, extract it to a new folder, copy over your php.ini settings, and point the IIS FastCGI handler to the new php-cgi.exe. Then recycle the application pool.
Common problems after an update
- White screen or 500 error: an extension or plugin is incompatible; check the PHP error log. Our Is My Site Down tool shows whether the site responds from outside.
- The site still reports the old version: PHP-FPM was not restarted, or the site is bound to a different version in the panel.
- Missing extensions: each PHP version has its own extensions; install the same ones (for example
mysqli,intl,gd) for the new version.
Common Questions
How do I check my PHP version in WordPress?
Go to Tools → Site Health → Info and open the Server section. WordPress also warns on the dashboard when the PHP version is outdated.
Why does php -v show a different version than my website?
The command line and the web server can use different PHP installations. A temporary phpinfo page shows the version the web server actually runs.
Which PHP version should I use?
Use a supported branch your software is compatible with. As of October 2026, PHP 8.3, 8.4 or 8.5 are recommended; 8.2 receives security fixes only until the end of 2026.
Is updating PHP risky?
Patch updates within a branch are low risk. Jumping branches can break old plugins or code, so take a backup and test first; most panels let you switch back quickly.
Can I see the PHP version of someone else’s website?
Only if the server sends it in the X-Powered-By header. Many sites hide it, so the result is often unknown.