ПІДТРИМАЙ УКРАЇНУ ПІДТРИМАТИ АРМІЮ
Uk Uk

How to change your PHP version on Ubuntu 22.04

How to change your PHP version on Ubuntu 22.04

Guide to change your PHP version through the command line on Ubuntu

Info

This is a guide to change your PHP version through the command line on Ubuntu 22.04

Installed versions list

To list all the installed PHP versions on your local device, use the following command :

sudo update-alternatives --config php

Change active PHP version

To change your currently used PHP version to a different version (that is installed), you can use the following command:

sudo update-alternatives --set php /usr/bin/php${version}

Ресурс : dev.to


Scroll to Top