You may need more or less, so check the requirements of the software you’re planning to use: apt-get install php-pear php-fpm php-dev php-zip php-curl php-xmlrpc php-gd php-mysql php-mbstring php-xml libapache2-mod-php These are the most common PHP 7.4 modules often used by php applications. PHP 7.4 is installed on your Ubuntu 20.04 server. You should get a response similar to this: PHP 7.4.3 (cli) (built: 23:16:22) ( NTS )Īnd that’s it. To verify if PHP is installed, run the following command: php -v This command will install PHP 7.4, as well as some other dependencies. Next, to install PHP 7.4 on Ubuntu 20.04, just run the following command: apt-get install php Update UbuntuĪgain, before doing anything, you should update your server: apt-get update & apt-get upgrade Install PHP 7.4 We don’t recommend using PHP 7.4, so you should skip to some of the other installation methods below. The instructions are also similar for Ubuntu 22.04, but Ubuntu 22.04 will use whatever the default PHP version it’s using. So the instructions are pretty similar to other variations. PHP 7.4 is included by default in Ubuntu 20.04’s repositories. Some shared hosts have already implemented PHP 8.1 in their shared servers, like Hawk Host and iWebFusion.If one version is installed, you can still upgrade to another. If it gives you a result, it’s installed, if it doesn’t, PHP is not installed. Check if PHP is already installed on your server.You’ll need SSH enabled if you use Ubuntu or an SSH client like MobaXterm if you use Windows.We’ll use the root user in our tutorial so there’s no need to execute each command with ‘sudo’, but if you’re not using the root user, you’ll need to do that. Either use the root user or a user with sudo access. You’ll also need root access to your server.Or you can go with any other cloud server provider where you have root access to the server. You’ll obviously need an Ubuntu server.If you still use PHP 7.4, you definitely need to upgrade ASAP because its security support ends at the end of 2022. We recommend that you install PHP 8.1 as it’s stable and has lots of improvements and new features. We’ll include instructions for PHP 8.0, PHP 8.1. Starting from the oldest that is currently supported – PHP 7.4, and onto PHP 8.0 and the latest – PHP 8.1. PHP has different versions and releases you can use.How to upgrade to PHP 8.1 (or 8.0) on Ubuntuįor the first part of our LAMP series, go to our How to Install and Optimize Apache on Ubuntu tutorial.Īnd for the second part, go to How to Install MySQL/MariaDB on Ubuntu. How to change the PHP version you’re using.How to install PHP 8.0 on Ubuntu 22.04 or 20.04.How to install PHP 8.1 on Ubuntu 22.04 or 20.04.How to Install PHP 7.4 on Ubuntu 20.04 (not recommended).Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04, Ubuntu 21.10, and should even work for Xubuntu, Kubuntu and similar distros. This tutorial should work for any Ubuntu release and other Ubuntu-based releases. In this tutorial, we’ll show you how to install various versions of PHP, including PHP 7.4, PHP 8.0 and the latest PHP 8.1. Finally, the third part of our LAMP tutorial series: how to install PHP on Ubuntu.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |