How to Change PHP Version in Plesk
You can easily change the PHP version for any domain or subdomain using Plesk's control panel.
1. Log in to Plesk
Visit your Plesk panel:
https://your-server-ip:8443
Log in using your credentials.
2. Go to Websites & Domains
In the left sidebar, click Websites & Domains.
Then choose the domain or subdomain where you want to change the PHP version.
3. Click on Hosting Settings
Under your domain name, click the Hosting Settings button.
This will take you to the configuration page for that domain.
4. Locate the PHP Support Section
Scroll down to the Web scripting and statistics or PHP support section.
You’ll see a dropdown labeled PHP version.
5. Select the Desired PHP Version
From the dropdown, choose the PHP version you want to use (e.g. 8.1.18
, 7.4.33
, etc.).
Make sure PHP support is checked/enabled.
6. Click OK or Apply
Scroll down and click OK or Apply to save the changes.
Plesk will apply the new PHP version for the selected domain.
7. Verify the Change (Optional)
To confirm the PHP version:
-
Create a PHP file in your domain folder (e.g.,
phpinfo.php
) -
Add this code:
<?php phpinfo(); ?>
-
Visit
https://yourdomain.com/phpinfo.php
to view the current PHP version.