How to change PHP version for a domain in cPanel. Changing the PHP version in cPanel is a simple but essential process for website security and performance.
By using a modern and compatible version, you ensure platform stability and protect web applications against vulnerabilities.
How to change PHP version?
Why is PHP version important?
The PHP version used by a website influences performance, application compatibility, and security.
Newer versions offer speed improvements, support for modern functions, and essential security fixes.
If your website uses an outdated version, it is recommended to update to a compatible version that is officially supported.
Accessing the PHP version modification function in cPanel
cPanel offers a simplified interface for choosing the desired PHP version for each domain or subdomain:
- Log in to your cPanel account.
- Go to the Software section.
- Click on Select PHP Version or MultiPHP Manager, depending on the cPanel interface provided by your hosting provider.
Changing PHP version with “Select PHP Version”
If you have the “Select PHP Version” module available:
- Choose the domain or subdomain from the displayed list.
- On the right side, select the desired PHP version from the list (for example, 8.1, 8.2, etc.).
- Click Set as current to apply the change.
You can also enable or disable specific PHP extensions for that domain directly from the interface.
Changing PHP version with “MultiPHP Manager”
If you have the MultiPHP Manager option enabled:
- Check the domain for which you want to change the PHP version.
- From the right side of the screen, open the PHP Version list.
- Select the desired PHP version.
- Press Apply to save the changes.
This option is recommended when you want to manage multiple domains from a single panel.
Checking the active PHP version
To verify what PHP version is active:
- You can create a file
phpinfo.phpwith the following content:
<?php phpinfo(); ?>
After uploading the file to the public_html directory, access it from the browser (ex: https://your-domain.com/phpinfo.php). The page will display details about the active PHP version and server configurations.
Recommendations and best practices
- Test the website on a new PHP version in a staging environment before applying the change to production.
- Check theme and plugin compatibility (for CMS platforms like WordPress).
- Avoid using unsupported PHP versions, even if they are still available in the list.
- Periodically update the PHP version to benefit from the latest functions and security measures.

Comments (0)