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

  1. Open Your Web Browser:
    • Go to your cPanel URL (e.g., https://yourdomain.com/cpanel).
  2. Enter Your Credentials:
    • Log in using your cPanel username and password.

Step 2: Locate the MultiPHP Manager

  1. Find the Software Section:
    • In the cPanel dashboard, scroll down to the "Software" section.
  2. 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

  1. View Your Domains:
    • You will see a list of all your domains and subdomains.
  2. 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

  1. Choose the PHP Version:
    • In the "PHP Version" dropdown menu, select the desired PHP version for the selected domain or subdomain.
  2. Apply the Changes:
    • Click the "Apply" button to save your changes.

Step 5: Verify the Change

  1. 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!

Дали Ви помогна овој одговор? 0 Корисниците го најдоа ова како корисно (0 Гласови)