Created
June 29, 2022 11:45
-
-
Save majeedraza1/7fb1c38236b97516134f3c419ec4fe20 to your computer and use it in GitHub Desktop.
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
# update the Apt cache and upgrade the current packages of system | |
sudo apt update && sudo apt upgrade | |
# nstall few dependencies required | |
sudo apt install software-properties-common ca-certificates lsb-release apt-transport-https | |
# Add the Ondrej PPA | |
LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php | |
# update the Apt package manager cache | |
sudo apt update | |
# Install PHP 8.1 | |
sudo apt install php8.1 | |
# Install the various PHP extensions required for (WordPress/Laravel) | |
sudo apt install php8.1-curl php8.1-gd php8.1-imagick php8.1-mbstring php8.1-xml php8.1-xmlrpc php8.1-soap php8.1-intl php8.1-zip php8.1-bcmath | |
# Install PHP 7.4 | |
sudo apt install php7.4 | |
# Install PHP 7.3 | |
sudo apt install php7.3 | |
# Install PHP 7.2 | |
sudo apt install php7.2 | |
# Check Active PHP Version | |
php -v | |
# Switch Default PHP Version for CLI | |
sudo update-alternatives --config php | |
# Uninstalling PHP | |
sudo apt remove php5.6 | |
sudo apt remove php5.6-* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment