Changing the PHP version for specific subfolders or subdomains allows you to tailor the environment to meet the needs of different applications. Here’s how to do it:
Step 1: Log in to cPanel
- Open Your Web Browser:
- Go to your cPanel URL (e.g., https://yourdomain.com/cpanel).
- Enter Your Credentials:
- Log in using your cPanel username and password.
Step 2: Locate the MultiPHP Manager
- Find the Software Section:
- In the cPanel dashboard, scroll down to the "Software" section.
- Click on MultiPHP Manager:
- Select the "MultiPHP Manager" option to manage PHP versions for your domains and subdomains.
Step 3: Select the Domain or Subdomain
- View Your Domains:
- You will see a list of all your domains and subdomains.
- Select the Domain or Subdomain:
- Check the box next to the domain or subdomain for which you want to change the PHP version.
Step 4: Change the PHP Version
- Choose the PHP Version:
- In the "PHP Version" dropdown menu, select the desired PHP version for the selected domain or subdomain.
- Apply the Changes:
- Click the "Apply" button to save your changes.
Step 5: Verify the Change
- Check the PHP Version:
- To confirm that the PHP version has been updated, you can create a phpinfo.php file in the subfolder or subdomain.
Add the following code to the file:
php
Copy code
<?php phpinfo(); ?>
- Access the file in your web browser (e.g., https://yourdomain.com/phpinfo.php) to view the current PHP version and configuration.
Conclusion
Changing the PHP version for specific subfolders or subdomains in cPanel is a straightforward process using the MultiPHP Manager. This flexibility allows you to ensure that each application runs optimally. Always test your applications after changing the PHP version to ensure compatibility!
