{"id":4188,"date":"2019-09-19T09:54:52","date_gmt":"2019-09-19T06:54:52","guid":{"rendered":"https:\/\/kifarunix.com\/?p=4188"},"modified":"2019-09-19T09:54:53","modified_gmt":"2019-09-19T06:54:53","slug":"install-php-7-4-on-debian-10-debian-9","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-php-7-4-on-debian-10-debian-9\/","title":{"rendered":"Install PHP 7.4 on Debian 10\/Debian 9"},"content":{"rendered":"\n<p>In this guide, we are going to learn how to install PHP 7.4 on Debian 10\/Debian 9. PHP 7.4 is a minor release of PHP 7 that that comes with a lot of changes meant to boost performance and improve code readability or maintainability.<\/p>\n\n\n\n<p>The official release of PHP 7.4 is scheduled to happen on November 28, 2019.<\/p>\n\n\n\n<p>To see a complete list of new features and what has been deprecated on PHP 7.4, review the <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/wiki.php.net\/rfc#php_74\" target=\"_blank\">PHP 7.4 changelog<\/a>.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install PHP 7.4 on Debian 10\/Debian 9<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Add SURY PHP Repository<\/h3>\n\n\n\n<p>PHP 7.4 is not available on the default Debian 10 APT repositories. As such you need to install the <a rel=\"noreferrer noopener\" aria-label=\"SURY PHP repository (opens in a new tab)\" href=\"https:\/\/deb.sury.org\/\" target=\"_blank\">SURY PHP repository<\/a>.<\/p>\n\n\n\n<p>With SURY repos, you can install PHP 7.4 beta release for testing purposes.<\/p>\n\n\n\n<p>Install the SURY Repository Signing Key<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt install gnupg2 -y\nwget -qO - https:\/\/packages.sury.org\/php\/apt.gpg | sudo apt-key add -<\/code><\/pre>\n\n\n\n<p>Install the SURY Repository<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>echo \"deb https:\/\/packages.sury.org\/php\/ $(lsb_release -sc) main\" | sudo tee \/etc\/apt\/sources.list.d\/php7.x.list<\/code><\/pre>\n\n\n\n<p>Update and upgrade your system packages<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt update\napt upgrade<\/code><\/pre>\n\n\n\n<p>Check the PHP 7.4 is available for installation.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt-cache policy php7.4<\/code><\/pre>\n\n\n\n<p>Debian 10<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>php7.4:\n  Installed: (none)\n  Candidate: 7.4.0~beta4-1+0~20190827.2+debian10~1.gbpd41595\n  Version table:\n     7.4.0~beta4-1+0~20190827.2+debian10~1.gbpd41595 500\n        500 https:\/\/packages.sury.org\/php buster\/main amd64 Packages<\/code><\/pre>\n\n\n\n<p>Debian 9<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>php7.4:\n  Installed: (none)\n  Candidate: 7.4.0~beta4-1+0~20190827.2+debian9~1.gbpd41595\n  Version table:\n     7.4.0~beta4-1+0~20190827.2+debian9~1.gbpd41595 500\n        500 https:\/\/packages.sury.org\/php stretch\/main amd64 Packages<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install PHP 7.4<\/h3>\n\n\n\n<p>You can now install PHP 7.4 now that you have the repos in place.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt install php7.4<\/code><\/pre>\n\n\n\n<p>Verify the version of installed PHP 7.4<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>php -v<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>PHP 7.4.0beta4 (cli) (built: Aug 27 2019 13:24:38) ( NTS )\nCopyright (c) The PHP Group\nZend Engine v3.4.0-dev, Copyright (c) Zend Technologies\n    with Zend OPcache v7.4.0beta4, Copyright (c), by Zend Technologies<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install PHP 7.4 Extensions<\/h3>\n\n\n\n<p>To install extra PHP 7.4 modules, you can simply run the command;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt install php7.4-<strong>extension<\/strong><\/code><\/pre>\n\n\n\n<p>Where the <strong>extension<\/strong> is the PHP 7.4 module you want to install.<\/p>\n\n\n\n<p>For example, to install MySQL module for PHP 7.4, simply execute the command;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt install php7.4-mysql<\/code><\/pre>\n\n\n\n<p>Well, that is all on how to install PHP 7.4 beta release on Debian 10\/9. Enjoy<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Related Tutorials<\/h3>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/how-to-install-php-7-3-3-on-ubuntu-18-04\/\" target=\"_blank\">How to Install PHP 7.3.3 on Ubuntu 18.04<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-php-7-3-4-on-fedora-30\/\" target=\"_blank\">Install PHP 7.3.4 on Fedora 30<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/installing-php-7-3-3-on-centos-7-6\/\" target=\"_blank\">Installing PHP 7.3.3 on CentOS 7.6<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we are going to learn how to install PHP 7.4 on Debian 10\/Debian 9. PHP 7.4 is a minor release of PHP<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,342],"tags":[997,287,203,1132],"class_list":["post-4188","post","type-post","status-publish","format-standard","hentry","category-howtos","category-php","tag-debian-10","tag-debian-9","tag-php","tag-php-7-4","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4188"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=4188"}],"version-history":[{"count":1,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4188\/revisions"}],"predecessor-version":[{"id":4189,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4188\/revisions\/4189"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=4188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=4188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=4188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}