To install PHP 7 on Ubuntu Linux 14.04 LTS, you can use the following steps:
sudo apt-get update
ondrej/php
repository to your system by running the following command:sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.4-fpm 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
Replace php7.4
with the desired version of PHP (e.g. php7.3
, php7.2
, etc.).
This will install PHP 7 and the specified extensions.
php -v
command to verify that PHP is installed and to display the version number.That's it! PHP 7 should now be installed on your Ubuntu Linux 14.04 LTS system.
Keep in mind that the above steps will install PHP 7 as a FastCGI process manager (FPM) for use with web servers such as Nginx or Apache. If you are using a different web server or want to use PHP in a different configuration, the steps may be different.