Here’s a comprehensive guide on How to Change PHP Version in cPanel Using MultiPHP Manager:
How to Change PHP Version in cPanel Using MultiPHP Manager
Managing your PHP version is crucial for ensuring compatibility with various web applications like WordPress, Joomla, or custom scripts. cPanel offers a convenient tool called MultiPHP Manager that allows you to easily switch between different PHP versions for your domain(s). This guide will walk you through the steps to change the PHP version for your website using MultiPHP Manager in cPanel.
Step 1: Log in to cPanel
- Open your web browser and navigate to your cPanel login page (e.g.,
https://yourdomain.com/cpanel
). - Enter your cPanel username and password, then click Log in.
Step 2: Locate the MultiPHP Manager Tool
- In the cPanel dashboard, scroll down to the Software section.
- Click on MultiPHP Manager.
Step 3: Select the Domain(s) You Want to Modify
- On the MultiPHP Manager page, you will see a list of all your domains and subdomains.
- To change the PHP version for a specific domain, check the box next to the domain name(s) you wish to modify.
Step 4: Choose the Desired PHP Version
- After selecting the domain(s), look at the top-right corner of the page for the PHP Version dropdown menu.
- Click the dropdown and choose the PHP version you want to assign to the selected domain(s). The available versions may include:
- PHP 5.x (legacy versions)
- PHP 7.x
- PHP 8.x (recommended for modern websites)
Step 5: Apply the Changes
- Once you’ve selected the desired PHP version, click the Apply button to save your changes.
Step 6: Verify the PHP Version
- To confirm that the PHP version has been changed successfully, you can create a simple phpinfo.php file:
- Go to File Manager in cPanel and navigate to the root directory of your website (e.g.,
/public_html
). - Click + File and name the file
phpinfo.php
. - Edit the file and add the following code:
-
<?php
phpinfo();
?>
- Go to File Manager in cPanel and navigate to the root directory of your website (e.g.,
-
- Save the file, and then access it via your browser (
https://yourdomain.com/phpinfo.php
).
- Save the file, and then access it via your browser (
- The resulting page will display detailed information about your current PHP version. Check the PHP version at the top to ensure it matches the one you selected in MultiPHP Manager.
- Once confirmed, delete the
phpinfo.php
file for security reasons.
Additional Notes
- Why Change PHP Versions?: Sometimes certain applications or themes require specific PHP versions for compatibility or performance improvements.
- Caution: Before changing your PHP version, ensure your website and its components (e.g., CMS, plugins, themes) are compatible with the new PHP version. Switching to an unsupported version can break your site.
Conclusion
You have successfully changed the PHP version for your domain using the MultiPHP Manager in cPanel. This tool makes it easy to manage multiple domains and ensure they are running the correct PHP version for optimal performance and compatibility.