How to Upgrade PHP Version from 8.0 to 8.1 in Ubuntu?
Today, I will let you know example of update php 8.0 to 8.1 ubuntu. if you want to see example of upgrade php 8.0 to 8.1 ubuntu then you are a right place. you can see how to upgrade php 8.0 to 8.1 ubuntu. This article goes in detailed on ubuntu update php 8.0 to 8.1. Let's get started with ubuntu 20 upgrade php 8.0 to 8.1.
just follow bellow command to update php 8.0 to php 8.1 in ubuntu os.
Add PPA for PHP 8.1
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
Install PHP 8.1
sudo apt install php8.1
Install PHP 8.1 Packages
sudo apt install php8.1-common php8.1-mysql php8.1-xml php8.1-xmlrpc php8.1-curl php8.1-gd php8.1-imagick php8.1-cli php8.1-dev php8.1-imap php8.1-mbstring php8.1-opcache php8.1-soap php8.1-zip php8.1-intl -y
PHP 8 Enable
sudo a2dismod php8.0
sudo a2enmod php8.1
sudo service apache2 restart
now you can check php version:
php -v
If it's still show old php version then you can run bellow command and choose new php version from there list. so run bellow command:
sudo update-alternatives --config php
Then it will works
i hope it can help you....
Hardik Savani
I'm a full-stack developer, entrepreneur and owner of ItSolutionstuff.com. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Laravel, Angular, Vue, Node, Javascript, JQuery, Codeigniter and Bootstrap from the early stage. I believe in Hardworking and Consistency.
We are Recommending you
- How to Restrict/Block IP Address in Apache Ubuntu?
- How to Set Up Password Authentication with Apache in Ubuntu?
- How to Install Apache PHP MySQL and Phpmyadmin on Ubuntu?
- How to Install MySQL in Ubuntu Server?
- How to Install Apache Web Server on Ubuntu Server?
- How to Connect SSH using ppk File Ubuntu?
- How to Upgrade PHP Version from 7.4 to 8 in Ubuntu?
- How to Upgrade PHP Version from 7.3 to 7.4 in Ubuntu?
- How to Upgrade PHP Version from 7.2 to 7.3 in Ubuntu?
- How to Enable Apache mod_rewrite Module in Ubuntu?