...

How to Set the PHP Version per Domain using cPanel

How to Set the PHP Version per Domain using cPanel

Setting the PHP version for each domain in cPanel is a crucial task, especially for website developers and server administrators who manage multiple websites with different PHP requirements. cPanel’s MultiPHP Manager tool allows you to easily assign different PHP versions to each of your domains. Here’s a step-by-step guide on how to set the PHP version per domain using cPanel:

Steps to Set PHP Version per Domain in cPanel

1. Log in to cPanel

  • Open your web browser and navigate to your cPanel login page (usually something like ).
  • Enter your cPanel username and password to log in.

2. Access MultiPHP Manager

  • Once logged in, look for the ‘Software’ section in the cPanel dashboard.
  • Find and click on the ‘MultiPHP Manager’ tool. This tool allows you to manage the PHP version for each domain hosted in your cPanel account.

3. Select the Domain

  • In the MultiPHP Manager, you’ll see a list of your domains and subdomains.
  • Select the domain(s) for which you want to change the PHP version. You can do this by checking the box next to each domain name.

4. Choose the PHP Version

  • Above or below the list of domains, you’ll find a dropdown menu labeled ‘PHP version’ or similar.
  • Click on this dropdown menu to see the available PHP versions. cPanel typically offers a range of PHP versions to choose from.
  • Select the desired PHP version for the selected domain(s). Choose the version that is compatible with your website’s requirements.

5. Apply the Changes

  • After selecting the PHP version, click the ‘Apply’ or ‘Set as current’ button (the exact wording can vary).
  • cPanel will then update the PHP version for the selected domain(s).

6. Verify the Update

  • It’s a good practice to verify that the change has been applied successfully.
  • You can do this by creating a PHP info file (a simple PHP file containing <?php phpinfo(); ?>) and uploading it to your domain. Accessing this file through a web browser will display the current PHP version and configuration.

Important Considerations

  • Compatibility Check: Before changing the PHP version, ensure that your website’s applications (like WordPress, Joomla, etc.) are compatible with the new version to avoid any functionality issues.
  • Backup: Always back up your website before making significant changes like updating the PHP version.
  • Propagation Time: The change in PHP version usually takes effect immediately, but in some cases, it might require a few minutes.

Conclusion

Regularly updating the PHP version for your websites in cPanel is important for security and performance. The Multi PHP Manager tool in cPanel simplifies this process, allowing for flexibility and control over the PHP environment of each domain. Always ensure compatibility before making changes and verify the update to ensure a smooth transition. As a website developer or server administrator, staying on top of such maintenance tasks is key to the smooth operation of your online platforms.

Previous Post
How to Set the PHP Version per Folder in cPanel
Next Post
How to restore a backup in cPanel