Change PHP Version In CyberPanel using Web Interface and SSH
CyberPanelIf you're a webmaster or an advanced user of CyberPanel, then you may need to change the PHP version of your website from time to time. Changing the PHP version of your website can help you optimize its performance and security, as well as to make sure that it's compatible with the latest software and plugins.
CyberPanel allows you to manage multiple websites on the same server, and you can easily switch between different PHP versions.
Here at Fixwebnode, we shall look into how to change the PHP version in CyberPanel.
Table of contents [Show]
1. Changing PHP Version from the CyberPanel Web Interface
You can follow the below steps to change the PHP version in CyberPanel is to use the web interface:
- Log in to your CyberPanel control panel: The first step is to log in to your CyberPanel control panel via https://<host-name-or-IP>:8090. Then enter your username and password. Once you’ve logged in, you’ll be taken to the main dashboard of your control panel.
- Select the domain you want to change the PHP version for: Once you've logged in to your control panel, the next step is to select the domain that you want to change the PHP version for. To do this, click on the “Domains” option in the main menu on the left side of the page. This will open up a list of all the domains that are associated with your control panel. Select the domain that you want to change the PHP version for and click on it to open up the domain's settings page.
- Change the PHP version: Now that you've opened up the domain’s settings page, you can change the PHP version of the domain. To do this, scroll down to the “PHP” section of the page and select the PHP version that you want to use. Once you’ve selected the version, click on the “Save” button at the bottom of the page to save your changes.
- Test your website: Once you've saved your changes, you should test your website to make sure that it's working correctly with the new PHP version. To do this, simply open up your website in a web browser and make sure that it's functioning correctly. If there are any errors, you may need to go back and modify your settings or contact your web hosting provider for assistance.
2. Change PHP Version via SSH
Alternatively, you can change the PHP version in CyberPanel is to use SSH. So do the following:
1. Log into your server via SSH.
2. Change the PHP Version
Once you are connected to the server, you can change the PHP version. To do this, you will need to run the following command:
# /usr/local/CyberPanel/bin/changePHPVersion.py
This command will show you a list of available PHP versions. Simply type the number of the PHP version you want to use and press Enter. The PHP version will be changed immediately.
3. Check the PHP Version
Once you have successfully changed the PHP version, you can check if it was changed correctly. To do this, you can run the following command:
# php -v
This command will show you the current PHP version that is being used.
And that's it! You have successfully changed the PHP version in CyberPanel.
[Need CyberPanel server support ? We can help you. ]
This tutorial covers how to change the PHP version in CyberPanel via SSH and from CyberPanel Web Interface. This process is simple and can be done in just a few steps. Once you have successfully changed the PHP version, you can check if the change was successful by running the php -v command.