Last active
January 18, 2024 16:38
-
-
Save UbuntuEvangelist/76fec31dac717cf9c0e54e7ce0e33a7a to your computer and use it in GitHub Desktop.
Install PHP (8.2, 8.1, 7.4) on Ubuntu 22.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update && sudo apt upgrade | |
sudo apt install software-properties-common ca-certificates lsb-release apt-transport-https | |
LC_ALL=C.UTF-8 sudo add-apt-repository ppa:ondrej/php | |
sudo apt update | |
sudo apt install php8.1 | |
# Check active php version php -v | |
php -v | |
# Check system php version | |
php --version | |
# To install another php version same machine | |
sudo apt install php8.2 | |
# Switch Default PHP Version | |
sudo update-alternatives --config php | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment