Change language

Install PHP 8 on Ubuntu

Install PHP 8 on Ubuntu

[Music] [Music] hello world welcome to tech blog and you are viewing the server administration tutorial series in this video we are going to install and configure php8 on ubuntu 20.04 lts server and its also applicable for ubuntu 18.04 lts server php is one of the most widely used server side programming languages many popular cms and frameworks such as wordpress magento and laravel are written in php so lets go and here is my tech article on this topic you could find this at the description section below now come to the point what actually we have to do for installing php 8 for your development our production environment so first we have to enable php repository because php8 does not come within the default repo of 20.04 version second you need to install php8 third install your required php extension fourth integrate with apache or nginx server and finally test your newly installed php version lets go and open up a terminal and i am going to log into my remote server and here we logged in and you can see its a fresh ubuntu 20.04 lts server so first thing is first do update your package list type app update in terminal and hit enter to go now if you want to install php with its default repository of focalfossa you will find that php 7.4 is going to be installed thats why we need to enable ppa andre repo from launchpad i am going to abort this installation now one thing we need to do before adding ppa andre repo we need to install software properties common actually it provides an abstraction of the use of apt repositories it allows you to easily manage your distribution in independent software vendors and software sources unless you have to manage it manually by editing the app source list now add the repository by typing add apt repository ppa andre php hit enter to continue now again update your package list using app update command to get the new packages from the newly added repo [Music] here you can see the new launchpad repos now you are able to install php so go ahead and type apt-install php 8.0 and hit enter key it will install some additional packages with it so press y and hit enter key it will take a bit to complete the installation you were able to check your installed php version using php-v command here you can see my php version is 8.0.13 which is the latest at the time of recording this video now install the required php modules for your application by the way you can search all available php 8.0 modules using the asterisk sign as follows here are the all available modules choose exactly whatever you require for [Music] we are going to install some frequently used php modules on our system which is required to run wordpress laravel etc after installing all modules its time to integrate your php with the web server you may use apache or nginx as your web server you could check out our video on apache configuration and nginx installation for the apache web server you need to install lib apache 2 module or you may use php fpm probably i had installed it in an earlier step while installing php as its dependency [Music] lets check if my apache server is running or not just type service apache to status and here we go its running now enable your php8 module with apache server just type a 2nmod php 8.0 ok now check the default page of apache server serving or not go ahead and open the web browser and type your server ip address and here you can see it serving the default page and finally you can check if your php is working properly with your apache server or not by creating a php file containing the php info function inside it so lets move into the var w html directory and create a php info file here [Music] so type nano and then phpinfo.php add the following line and save the file get back to the browser and type the php file name followed by your server ip address [Music] yup its working perfectly so guys finally we installed php8 on ubuntu 20.04 lts server hope this video is helpful to you do like and share this video and hit on the subs button to get the latest update tech blog is sign out for now see you again thank you

Shop

Learn programming in R: courses

$

Best Python online courses for 2022

$

Best laptop for Fortnite

$

Best laptop for Excel

$

Best laptop for Solidworks

$

Best laptop for Roblox

$

Best computer for crypto mining

$

Best laptop for Sims 4

$

Latest questions

NUMPYNUMPY

Common xlabel/ylabel for matplotlib subplots

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Why do I get "Pickle - EOFError: Ran out of input" reading an empty file?

12 answers

NUMPYNUMPY

Flake8: Ignore specific warning for entire file

12 answers

NUMPYNUMPY

glob exclude pattern

12 answers

NUMPYNUMPY

How to avoid HTTP error 429 (Too Many Requests) python

12 answers

NUMPYNUMPY

Python CSV error: line contains NULL byte

12 answers

NUMPYNUMPY

csv.Error: iterator should return strings, not bytes

12 answers

News


Wiki

Python | How to copy data from one Excel sheet to another

Common xlabel/ylabel for matplotlib subplots

Check if one list is a subset of another in Python

sin

How to specify multiple return types using type-hints

exp

Printing words vertically in Python

exp

Python Extract words from a given string

Cyclic redundancy check in Python

Finding mean, median, mode in Python without libraries

cos

Python add suffix / add prefix to strings in a list

Why do I get "Pickle - EOFError: Ran out of input" reading an empty file?

Python - Move item to the end of the list

Python - Print list vertically