{"id":1063,"date":"2021-05-20T09:47:44","date_gmt":"2021-05-20T09:47:44","guid":{"rendered":"https:\/\/www.velaninfo.com\/rs\/?post_type=techtips&#038;p=1063"},"modified":"2021-05-20T09:47:44","modified_gmt":"2021-05-20T09:47:44","slug":"how-to-install-php-8-x-on-debian-10","status":"publish","type":"techtips","link":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-install-php-8-x-on-debian-10\/","title":{"rendered":"How to Install PHP 8.X on Debian 10"},"content":{"rendered":"<p><strong>How to Install PHP 8.X on Debian10?<\/strong><\/p>\n<p>Here are the 4 simple steps to install latest php 8.X version on debian&amp; Ubuntu flavored Linux servers.<\/p>\n<p><strong>Step 1 \u2013 Setup Apt Repository<\/strong><\/p>\n<p><em>$ sudo apt update <\/em><\/p>\n<p><em>$ sudo apt install -y gnupg2 ca-certificates apt-transport-https software-properties-common<\/em><\/p>\n<p><em>$ sudowget -qO &#8211; https:\/\/packages.sury.org\/php\/apt.gpg | sudo apt-key add &#8211;<\/em><\/p>\n<p><em>$ sudo echo &#8220;deb https:\/\/packages.sury.org\/php\/ buster main&#8221; | sudo tee \/etc\/apt\/sources.list.d\/php.list<\/em><\/p>\n<p><strong>Step 2 \u2013 Installing PHP 8 on Debian<\/strong><\/p>\n<p><em>$ sudo apt update\u00a0 <\/em><\/p>\n<p><em>$ sudo apt install php8.0 <\/em><\/p>\n<p><em>$ php -v <\/em><\/p>\n<p>PHP 8.0.2 (cli) (built: Feb 12 2021 14:51:01) ( NTS )<\/p>\n<p>Copyright (c) The PHP Group<\/p>\n<p>Zend Engine v4.0.2, Copyright (c) Zend Technologies<\/p>\n<p>with Zend OPcache v8.0.2, Copyright (c), by Zend Technologies<\/p>\n<p><strong>Step 3 \u2013 Installing PHP Extensions<\/strong><\/p>\n<p><em>$ sudo apt search php8.0-* <\/em><\/p>\n<p><em>$ sudo apt install php8.0-{mysql,imap,ldap,xml,curl,mbstring,zip}<\/em><\/p>\n<p><em>$ php \u2013m<\/em><\/p>\n<p><strong>Step 4 \u2013 Setup Apache with PHP 8<\/strong><\/p>\n<p>Below command to install Apache with PHP 8 module<\/p>\n<p><em>$ sudo apt install apache2 libapache2-mod-php8.0<\/em><\/p>\n<p>After successful installation, restart Apache service<\/p>\n<p><em>$ sudo systemctl restart apache2<\/em><\/p>\n<p>Verify that PHP modules is loaded with Apache. Create a php script with phpinfo() function under the default document root.<\/p>\n<p><em>$ echo &#8220;&lt;?php phpinfo(); ?&gt;&#8221; &gt; \/var\/www\/html\/info.php<\/em><\/p>\n<p>Access this file in browser using server ip address. For example: <a href=\"http:\/\/server-ip\/info.php\">http:\/\/server-ip\/info.php<\/a><\/p>\n<p>At Velan, our server support engineers can help you with install php versions on your server. We are installing like these for our clients every day.\u00a0If you are interested in our service, please fill the <a href=\"https:\/\/www.velaninfo.com\/contact\"><strong>Quick connect form<\/strong><\/a> to get in touch with us.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Install PHP 8.X on Debian10? Here are the 4 simple steps to install latest php 8.X version on debian&amp; Ubuntu flavored Linux servers. Step 1 \u2013 Setup Apt Repository $ sudo apt update $ sudo apt install -y gnupg2 ca-certificates apt-transport-https software-properties-common $ sudowget -qO &#8211; https:\/\/packages.sury.org\/php\/apt.gpg | sudo apt-key add &#8211; $&#8230;<a class=\"continue-reading text-uppercase\" href=\"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-install-php-8-x-on-debian-10\/\"> Continue Reading <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.velaninfo.com\/rs\/wp-content\/themes\/velaninfo\/images\/reading_arw.png\" alt=\"Continue Reading\" width=\"16\" height=\"12\"\/><\/a><\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"tags":[],"class_list":["post-1063","techtips","type-techtips","status-publish","hentry","Categories_tech_tip-linux","Categories_tech_tip-php","Categories_tech_tip-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v19.5 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Install PHP 8.X on Debian 10 | Velan<\/title>\n<meta name=\"description\" content=\"How to Install PHP 8.X on Debian 10\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-install-php-8-x-on-debian-10\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install PHP 8.X on Debian 10\" \/>\n<meta property=\"og:description\" content=\"How to Install PHP 8.X on Debian 10\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-install-php-8-x-on-debian-10\/\" \/>\n<meta property=\"og:site_name\" content=\"Velan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-install-php-8-x-on-debian-10\\\/\",\"url\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-install-php-8-x-on-debian-10\\\/\",\"name\":\"How to Install PHP 8.X on Debian 10 | Velan\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/#website\"},\"datePublished\":\"2021-05-20T09:47:44+00:00\",\"description\":\"How to Install PHP 8.X on Debian 10\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-install-php-8-x-on-debian-10\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-install-php-8-x-on-debian-10\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-install-php-8-x-on-debian-10\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tech Tips\",\"item\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Install PHP 8.X on Debian 10\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/#website\",\"url\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/\",\"name\":\"Velan\",\"description\":\"Velaninfo Services India Pvt Ltd\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Install PHP 8.X on Debian 10 | Velan","description":"How to Install PHP 8.X on Debian 10","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-install-php-8-x-on-debian-10\/","og_locale":"en_US","og_type":"article","og_title":"How to Install PHP 8.X on Debian 10","og_description":"How to Install PHP 8.X on Debian 10","og_url":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-install-php-8-x-on-debian-10\/","og_site_name":"Velan","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-install-php-8-x-on-debian-10\/","url":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-install-php-8-x-on-debian-10\/","name":"How to Install PHP 8.X on Debian 10 | Velan","isPartOf":{"@id":"https:\/\/www.velaninfo.com\/rs\/#website"},"datePublished":"2021-05-20T09:47:44+00:00","description":"How to Install PHP 8.X on Debian 10","breadcrumb":{"@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-install-php-8-x-on-debian-10\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-install-php-8-x-on-debian-10\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-install-php-8-x-on-debian-10\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.velaninfo.com\/rs\/"},{"@type":"ListItem","position":2,"name":"Tech Tips","item":"https:\/\/www.velaninfo.com\/rs\/techtips\/"},{"@type":"ListItem","position":3,"name":"How to Install PHP 8.X on Debian 10"}]},{"@type":"WebSite","@id":"https:\/\/www.velaninfo.com\/rs\/#website","url":"https:\/\/www.velaninfo.com\/rs\/","name":"Velan","description":"Velaninfo Services India Pvt Ltd","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.velaninfo.com\/rs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/1063","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips"}],"about":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/types\/techtips"}],"author":[{"embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/comments?post=1063"}],"version-history":[{"count":1,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/1063\/revisions"}],"predecessor-version":[{"id":1064,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/1063\/revisions\/1064"}],"wp:attachment":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/media?parent=1063"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/tags?post=1063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}