Introduction:
Just follow these steps
New features of php 7.4
- PHP 7.4 is not recommended to use the function
- Warning about the vessel entered invalid
- Speed up your work
- Arrow function
- Improved features
- Work more smoothly.
Step 1: Add PHP PPA repository
First, add ppa: ondrej / php PPA repository, it has the latest PHP build the package. Type the following command to add the repository. When prompted, press Enter to add a repository.
Step 2: PHP 7.4 installed on Ubuntu 18.04 / 19.04 / 19.10
Ubuntu simply trigger command in the terminal to install php 7.4, and then continue at the press Y.
Verifying the Installation
For installation of other software packages, use the following syntax
apt-get install php7.4-xxx
As we all know, we need a Web server to run PHP, so in this case, we will consider using Nginx on Ubuntu.
Install Nginx
Before installing Nginx, please do not forget to disable the Apache server.
sudo systemctl disable --now apache2
After installing the extension fpm and nginx packages, press Y to continue
sudo apt-get install nginx php7.4-fpm
By running check service status
systemctl status php7.4-fpm nginx
You can find the configuration file in PHP fpm /etc/php/7.4/fpm/pool.d/www.conf.
Congratulations! You have php 7.4 on Ubuntu successfully installed. If you have any questions about this tutorial, please post a comment in the comments column.