How to Upgrade PHP Version from 8.1 to 8.2 in Ubuntu?
Hi Dev,
Are you looking for an example of update php 8.1 to 8.2 ubuntu. In this article, we will implement a upgrade php 8.1 to 8.2 ubuntu. if you want to see an example of how to upgrade php 8.1 to 8.2 ubuntu then you are in the right place. This article goes in detailed on ubuntu update php 8.1 to 8.2.
just follow bellow command to update php 8.1 to php 8.2 in ubuntu os.
Add PPA for PHP 8.2
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
Install PHP 8.2
sudo apt install php8.2
Install PHP 8.2 Packages
sudo apt install php8.2-common php8.2-mysql php8.2-xml php8.2-xmlrpc php8.2-curl php8.2-gd php8.2-imagick php8.2-cli php8.2-dev php8.2-imap php8.2-mbstring php8.2-opcache php8.2-soap php8.2-zip php8.2-intl -y
PHP 8 Enable
sudo a2dismod php8.1
sudo a2enmod php8.2
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
- Ubuntu PHP ZIP Extension Install Commands Example
- How to Install PHP XML Extension in Ubuntu?
- How to Install PHP imap Extension in Ubuntu?
- How to Install PHP Curl Extension in Ubuntu?
- How to Increase max_input_vars in PHP Ubuntu?
- How to Increase upload_max_filesize in PHP Ubuntu?
- How to Upgrade PHP Version from 8.0 to 8.1 in Ubuntu?
- How to Generate SSH Key in Ubuntu Server?
- How to Change PHP Version in Ubuntu Server?
- How to Install Phpmyadmin in Ubuntu Server?
- How to Install MySQL in Ubuntu Server?
- How to Install PHP in Ubuntu Server?
- How to Install Apache Web Server on Ubuntu Server?
- SSH Command to Connect to Server using Pem File Example