To change the PHP version in cPanel, follow these steps:
1. Log in to cPanel:
- Go to your cPanel or your hosting provider's cPanel login page.
- Enter your username and password.
2. Find the Software Section:
- In the cPanel dashboard, scroll down to the "Software" section.
- Click on "Select PHP Version" or "MultiPHP Manager," depending on what your cPanel interface provides.
3. Select the PHP Version:
- If you clicked "Select PHP Version," you will see a dropdown menu where you can choose the desired PHP version.
- Select the version you want.
- Click "Set as current" to apply the change.
- If you clicked "MultiPHP Manager," you will see a list of your domains.
- Check the box next to the domain you want to change.
- Select the desired PHP version from the dropdown menu at the top.
- Click "Apply" to save the changes.
4. Verify the Change:
- Create a PHP info file to verify the change.
- Create a new file named `phpinfo.php` in your website's root directory.
- Add the following code:
<?php
phpinfo();
?>
- Save the file and access it via your web browser (e.g., yourdomain.com/phpinfo.php).
- Check the PHP version displayed on the page to confirm it has been updated.
5. Remove the PHP info File:
- For security reasons, delete the `phpinfo.php` file after verifying the PHP version.
That's it! You have successfully changed the PHP version in cPanel. If you encounter any issues, consider reaching out to your hosting provider's support for assistance.