PHP is a scripting language, and a powerful tool for developing dynamic and interactive Web pages. It was originally created in 1994 by Danish-Canadian programmer Rasmus Lerdorf. According to W3Techs’ data, PHP is used by 78.9% websites running in public network. So almost 8 out of every 10 websites on the Internet are using PHP in some way. Show PHP 8.0 is the latest available version for the web development. It is the most advanced and secure version released by the PHP Team. This tutorial will help you to install PHP 8.0 on Debain 10 Buster Linux system. Step 1 – Setup Apt RepositoryOndrej Sury is maintaining the PPA that contains the latest PHP packages for the Debian systems.
Step 2 – Installing PHP 8 on DebianYour system is ready for the PHP installation. Use following commands to install PHP 8 on Debian system.
Fist command will update the apt cache on your system and second command will install PHP packages. Once the installation finished, verify the PHP version on terminal.
Step 3 – Installing PHP ExtensionsPHP comes with multiple extensions (also known as modules) to preform specific tasks. You can install these extensions on your system as per your requirements. First, search for available modules in repository:
Then install required php modules on your system. The following command will install some frequently used PHP modules on your system.
You can check for currently installed and active PHP modules on your system by running following command.
You can visit another article about enable or disable PHP modules on a Debian system systems. Step 4 – Setup Apache with PHP 8Generally the above commands also install Apache PHP extension on your system. But incase not installed, execute below command to install Apache with PHP 8 module.
After successful installation, restart Apache service to reload newly installed modules.
Next, verify
thta PHP modules is loaded with Apache. Create a php script with
Access this file in browser using server ip address. For example: http://server-ip/info.php You will see the detailed PHP information on the web page. ConclusionThis tutorial helped you to install PHP 8.0 on Debian 10 system. February 15, 2022February 15, 20220 PHP is the most widely used programming language on the web. PHP 7 was released with a slew of new features and performance enhancements, and its successor, PHP 8, is even better. PHP 8.1.x is the most recent PHP build, released earlier this year. If you are starting a new PHP project, it is highly recommended that you have the most recent version installed. If not, we’ll show you how to upgrade to PHP 8.1 in Debian 9, 10, or 11. If you’re using Ubuntu, check out this article on how to install/upgrade to the most recent PHP version in Ubuntu or derivatives. If your PHP application is built upon an older PHP version, make sure that it supports the latest . WordPress, the most popular content management system and Laravel, a great PHP framework supports PHP 8. Pre-requisitesBefore installation begins, make sure to run the following command to install pre-requisites to installing PHP 8. Install PHP pre requisitesAdd GPG key and Sury repository – Add GPG key
Update repositories –
Now Ondrej Sury PHP repository added to the operating system. After updating the local repositories, we can install the latest PHP version. At the time of writing this article, PHP 8.1.x is the latest version. If you have an older PHP version installed, then upgrade to get the latest version.
Install PHP 8 in Debian Install PHP.Install PHP 8 with Apache supportApache is the most popular web server. If you plan to setup your application on Apache, then use the following command –
Install PHP 8 with Nginx supportNginx is the best alternative to Apache. If you plan to set up your application on Nginx, then use the following command –
ConclusionYou can use this article to install PHP 8 on Debian 9, Debian 10, and Debian 11. If you’re upgrading a production server, make sure to read this guide first. Finally, your application must support PHP 8, or else it may encounter issues. |