How to Change the PHP Version in CentOS Web Panel

HomeHow ToHow to Change the PHP Version in CentOS Web Panel

How to Change the PHP Version in CentOS Web Panel

CentOS Web Panel (shortened as CWP) is a free control panel that you can use to manage your VPS. Not as fancy as cPanel, but the offered features are complete enough. You can use CWP to manage the apps like DNS server, PHP, database server, web server, and so on. There is also a feature to change the PHP server on your VPS in case you need to.

There are two features that you can use to switch from a PHP version to another: PHP Version Switcher and PHP Selector. PHP Selector is only available on the pro version of CWP while PHP Version Switcher is available for all versions (free and pro). This article will show you how to change the PHP version in CWP using PHP Version Switcher.

A crucial thing to note. Changing the PHP version using this method, the new version of your PHP will be applied to all apps you have on your VPS. So, make sure that all of your apps are compatible with the PHP version you want to switch to.

Changing the PHP Version in CentOS Web Panel

First off, log in to your CWP dashboard and click PHP Version Switcher on the left panel. Then, select the PHP version you want to switch to from the dropdown menu.

Although it has been available on the dropdown menu, the PHP version you prefer is technically not installed yet on your server. CWP will install it after you have clicked the Save & Build button. You can find this button on the bottom side of the PHP Version Switcher page.

Before clicking the button, you can check the options you want to include on the new version of PHP you want to install. Once the button is clicked, the CWP compiler will start running in the background to build your preferred PHP version. The installation process takes about 10 to 15 minutes.

CWP provides no notification once the installation is complete so you need to manually check it yourself. After 15 minutes, you can open the terminal and type php -v to check the PHP version on your server. If you see a different version that before, this means the newer version of PHP has been installed.

The command above (php -v) also provides information about the date build of your new PHP version.

hand-picked weekly content in your inbox


related posts