
If you want to update to PHP 8.0 in Ubuntu, follow the same steps but replace 7.4 with 8.0 in every command. Your PHP version will be updated to the latest version. Restart Apache web server to apply changes $ sudo service apache2 restart
#UPGRADE UBUNTU VIRTUALHOSTX HOW TO#
$ sudo a2dismod php7.0Īlso read : How to Install Erlang in Ubuntu Next you need to disable your old PHP (say 7.0) and enable new PHP 7.4. $ sudo apt install php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip php7.4-intl -yĪlso read : How to Configure X-Frame-Options in Apache PHP extensions are commonly used along with PHP. Install PHP 7.4 with the following command $ sudo apt install php7.4Īlso read : How to Redirect 403 to 404 in NGINX $ sudo apt-get updateĪlso read : How to List all processes in Linux using systemctl Open terminal and run the following commands to update Ubuntu packages. $ sudo apt install software-properties-commonĪlso read : How to Setup FTP server in Ubuntu Run the following command to add it to our list of sources. PHP 7.4 is maintained by ondej/php repository. You need to install PHP 7.4 and then change the system PHP to it. This means we need to add some modifications to the command. However, if you run this prior to the upgrade path being enabled you will get this message. This will check for a new release and prompt you to upgrade. There is no way to directly upgrade your existing PHP to PHP 7.4. The command used to upgrade Ubuntu from the CLI is: sudo do-release-upgrade.

Here is how to upgrade to PHP 7.4 in ubuntu 18.04.

You can use these steps to upgrade PHP 7.0 to PHP 7.4 or PHP 7.2 to PHP 7.4. We will look at how to upgrade to PHP 7.4 in Ubuntu 18.04. Here are the steps to upgrade PHP version in Ubuntu. So you may need to upgrade to PHP 7.4 or 8.0, to avail its new features and security improvements. It regularly releases updates with new features and performance improvements. PHP is a popular programming language used for web development.
