{"id":782,"date":"2021-08-20T00:21:47","date_gmt":"2021-08-20T00:21:47","guid":{"rendered":"https:\/\/serverhub.com\/kb\/?p=782"},"modified":"2024-12-10T13:29:02","modified_gmt":"2024-12-10T13:29:02","slug":"how-to-install-php-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/serverhub.com\/kb\/how-to-install-php-on-ubuntu-20-04\/","title":{"rendered":"How to Install PHP on Ubuntu 20.04? Step-by-step Easy Guide"},"content":{"rendered":"\n<p class=\"has-black-color has-text-color\">PHP is a simple, secure, flexible, and efficient open-source language.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Standing for PHP Hypertext Preprocessor, it is the most used programming language worldwide.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Able to integrate into HTML, PHP handles the connection between your web pages and databases.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">After installing\u00a0<a href=\"https:\/\/serverhub.com\/kb\/how-to-install-apache-on-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Apache as a web server<\/strong><\/a>, and\u00a0<a target=\"_blank\" href=\"https:\/\/serverhub.com\/kb\/howto\/mysql-the-most-popular-open-source-database-system\/?trashed=1&amp;ids=5836\" rel=\"noreferrer noopener\"><strong>MySQL as a database system<\/strong><\/a>.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">The scripting language, PHP, will process the code to display dynamic content to users.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">By the end of this PHP tutorial<\/h2>\n\n\n\n<ul class=\"has-black-color has-text-color wp-block-list\"><li>You\u2019ll be able to install PHP on Ubuntu 20.04 and in less than 7 minutes!<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">PHP tutorial requirements<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"725\" height=\"484\" src=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-tutorial-requirements.png\" alt=\"Tools required to install PHP\" class=\"wp-image-783\" srcset=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-tutorial-requirements.png 725w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-tutorial-requirements-300x200.png 300w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-tutorial-requirements-480x320.png 480w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-tutorial-requirements-506x338.png 506w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-tutorial-requirements-580x387.png 580w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-tutorial-requirements-427x285.png 427w\" sizes=\"(max-width: 725px) 100vw, 725px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Update package repository<\/h2>\n\n\n\n<p class=\"has-black-color has-text-color\">First, always update Ubuntu\u2019s package repository.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Why?<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Because doing so will:<\/p>\n\n\n\n<ul class=\"has-white-color has-pale-cyan-blue-background-color has-text-color has-background wp-block-list\"><li><strong>Protect your software, while shortening your future updates time<\/strong><\/li><li><strong>Always get you the latest versions of what you want to install.<\/strong><\/li><\/ul>\n\n\n\n<p class=\"has-black-color has-text-color\">You&#8217;re probably wondering how to update your package repository by now.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Simply, type the following command into your terminal and press ENTER.<\/p>\n\n\n\n<ul class=\"has-black-color has-vivid-cyan-blue-background-color has-text-color has-background wp-block-list\"><li><strong>sudo apt update<\/strong><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img decoding=\"async\" width=\"724\" height=\"528\" src=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Update-repository-to-Install-PHP.png\" alt=\"\" data-id=\"792\" data-full-url=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Update-repository-to-Install-PHP.png\" data-link=\"https:\/\/serverhub.com\/kb\/?attachment_id=792\" class=\"wp-image-792\" srcset=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Update-repository-to-Install-PHP.png 724w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Update-repository-to-Install-PHP-300x219.png 300w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Update-repository-to-Install-PHP-480x350.png 480w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Update-repository-to-Install-PHP-463x338.png 463w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Update-repository-to-Install-PHP-555x405.png 555w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Update-repository-to-Install-PHP-391x285.png 391w\" sizes=\"(max-width: 724px) 100vw, 724px\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p class=\"has-black-color has-text-color\">Then, put in your password and let Ubuntu do the magic work.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Don&#8217;t forget to check our tutorial on <a href=\"https:\/\/serverhub.com\/kb\/what-is-ubuntu-linux-and-how-to-install-it\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>what is Ubuntu Linux and how to install it<\/strong>.<\/a> <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Install PHP on Ubuntu <\/h2>\n\n\n\n<p class=\"has-black-color has-text-color\">Installing <strong><a href=\"https:\/\/www.php.net\/\">PHP<\/a><\/strong> is a straightforward task. <\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Just, copy the below command and paste it into your terminal. <\/p>\n\n\n\n<ul class=\"has-black-color has-vivid-cyan-blue-background-color has-text-color has-background wp-block-list\"><li><strong>sudo&nbsp;apt&nbsp;install&nbsp;PHP<\/strong><\/li><\/ul>\n\n\n\n<p class=\"has-black-color has-text-color\">Press Y to confirm the latest PHP download and install.<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img decoding=\"async\" width=\"719\" height=\"498\" src=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-on-Ubuntu-1.png\" alt=\"Install PHP on Ubuntu\" data-id=\"794\" data-full-url=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-on-Ubuntu-1.png\" data-link=\"https:\/\/serverhub.com\/kb\/?attachment_id=794\" class=\"wp-image-794\" srcset=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-on-Ubuntu-1.png 719w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-on-Ubuntu-1-300x208.png 300w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-on-Ubuntu-1-480x332.png 480w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-on-Ubuntu-1-488x338.png 488w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-on-Ubuntu-1-580x402.png 580w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-on-Ubuntu-1-411x285.png 411w\" sizes=\"(max-width: 719px) 100vw, 719px\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Verify PHP installation on Ubuntu<\/h2>\n\n\n\n<p class=\"has-black-color has-text-color\">Coming up, time to verify the PHP version after the installation.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Put in the command:<\/p>\n\n\n\n<ul class=\"has-black-color has-vivid-cyan-blue-background-color has-text-color has-background wp-block-list\"><li><strong>php -v<\/strong><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-3 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img decoding=\"async\" width=\"705\" height=\"109\" src=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-verify-version.png\" alt=\"Install PHP version verification\" data-id=\"795\" data-full-url=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-verify-version.png\" data-link=\"https:\/\/serverhub.com\/kb\/?attachment_id=795\" class=\"wp-image-795\" srcset=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-verify-version.png 705w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-verify-version-300x46.png 300w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-verify-version-480x74.png 480w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-verify-version-580x90.png 580w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-verify-version-665x103.png 665w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p class=\"has-black-color has-text-color\">Well, you can see that, by the time of writing this article, the latest PHP version is 7.4.3<\/p>\n\n\n<span class='bctt-click-to-tweet'><span class='bctt-ctt-text'><a href='https:\/\/x.com\/intent\/tweet?url=https%3A%2F%2Fserverhub.com%2Fkb%2F%3Fp%3D782&#038;text=How%20to%20Install%20PHP%20on%20Ubuntu%2020.04%3F%20Master%20the%20basics%20with%20this%20step-by-step%20%22pictures%20included%22%20guide%2C%20in%20less%20than%207%20minutes%21%20&#038;via=benunc&#038;related=benunc' target='_blank'rel=\"noopener noreferrer\">How to Install PHP on Ubuntu 20.04? Master the basics with this step-by-step &quot;pictures included&quot; guide, in less than 7 minutes!  <\/a><\/span><a href='https:\/\/x.com\/intent\/tweet?url=https%3A%2F%2Fserverhub.com%2Fkb%2F%3Fp%3D782&#038;text=How%20to%20Install%20PHP%20on%20Ubuntu%2020.04%3F%20Master%20the%20basics%20with%20this%20step-by-step%20%22pictures%20included%22%20guide%2C%20in%20less%20than%207%20minutes%21%20&#038;via=benunc&#038;related=benunc' target='_blank' class='bctt-ctt-btn'rel=\"noopener noreferrer\">Share on X<\/a><\/span>\n\n\n<h2 class=\"wp-block-heading\">Step 4: Install PHP with Apache<\/h2>\n\n\n\n<p class=\"has-black-color has-text-color\">Did you know that it is possible to install PHP using Apache as well?<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">All you have to do is put in the following command:<\/p>\n\n\n\n<ul class=\"has-black-color has-vivid-cyan-blue-background-color has-text-color has-background wp-block-list\"><li><strong>sudo&nbsp;apt&nbsp;install&nbsp;libapache2-mod-php<\/strong><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"707\" height=\"526\" src=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-with-Apache.png\" alt=\"Installing PHP using Apache via Ubuntu cmd\" class=\"wp-image-796\" srcset=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-with-Apache.png 707w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-with-Apache-300x223.png 300w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-with-Apache-480x357.png 480w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-with-Apache-454x338.png 454w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-with-Apache-544x405.png 544w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Install-PHP-with-Apache-383x285.png 383w\" sizes=\"(max-width: 707px) 100vw, 707px\" \/><\/figure>\n\n\n\n<p class=\"has-black-color has-text-color\">For the changes to take effect immediately, you need to restart Apache using the given command:<\/p>\n\n\n\n<ul class=\"has-black-color has-vivid-cyan-blue-background-color has-text-color has-background wp-block-list\"><li><strong>sudo&nbsp;systemctl restart apache2<\/strong><\/li><\/ul>\n\n\n\n<p class=\"has-black-color has-text-color\">Next, check and verify the Apache PHP module status by using the command: <\/p>\n\n\n\n<ul class=\"has-black-color has-vivid-cyan-blue-background-color has-text-color has-background wp-block-list\"><li><strong>sudo&nbsp;systemctl status apache2<\/strong><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-4 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img decoding=\"async\" width=\"721\" height=\"315\" src=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-Apache-module.png\" alt=\"PHP Apache module running on Ubuntu 20.04\" data-id=\"797\" data-full-url=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-Apache-module.png\" data-link=\"https:\/\/serverhub.com\/kb\/?attachment_id=797\" class=\"wp-image-797\" srcset=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-Apache-module.png 721w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-Apache-module-300x131.png 300w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-Apache-module-480x210.png 480w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-Apache-module-580x253.png 580w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-Apache-module-652x285.png 652w\" sizes=\"(max-width: 721px) 100vw, 721px\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p class=\"has-black-color has-text-color\">Now that it&#8217;s up and running, you are on the right track! <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Install PHP extensions on Ubuntu 20.04<\/h2>\n\n\n\n<p class=\"has-black-color has-text-color\">To get a list of PHP extensions, you can enter the following command <\/p>\n\n\n\n<ul class=\"has-black-color has-vivid-cyan-blue-background-color has-text-color has-background wp-block-list\"><li><strong>sudo&nbsp;apt&nbsp;install&nbsp;php-<\/strong><\/li><\/ul>\n\n\n\n<p class=\"has-black-color has-text-color\">Afterward, press the tab button on your keyboard twice, followed by Y, for a complete extensions list <\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-5 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img decoding=\"async\" width=\"700\" height=\"508\" src=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-extentions.png\" alt=\"complete PHP extensions list\" data-id=\"803\" data-full-url=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-extentions.png\" data-link=\"https:\/\/serverhub.com\/kb\/?attachment_id=803\" class=\"wp-image-803\" srcset=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-extentions.png 700w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-extentions-300x218.png 300w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-extentions-480x348.png 480w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-extentions-466x338.png 466w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-extentions-558x405.png 558w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-extentions-393x285.png 393w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p class=\"has-black-color has-text-color\">For example, to install the cas extension, the command you need to enter would be:<\/p>\n\n\n\n<ul class=\"has-black-color has-vivid-cyan-blue-background-color has-text-color has-background wp-block-list\"><li><strong>sudo&nbsp;apt&nbsp;install&nbsp;php-cas<\/strong><\/li><\/ul>\n\n\n\n<p class=\"has-black-color has-text-color\">The system will ask for the needed additional space to install the extension.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Press &#8220;y&#8221; to accept the process.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Momentarily, it will begin to download and install the extension you picked up.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">This is the way you can download and run any of the available PHP extensions.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"714\" height=\"414\" src=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-extention-installation.png\" alt=\"Installing one of the PHP Ubuntu extensions \" class=\"wp-image-804\" srcset=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-extention-installation.png 714w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-extention-installation-300x174.png 300w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-extention-installation-480x278.png 480w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-extention-installation-583x338.png 583w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-extention-installation-580x336.png 580w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-extention-installation-492x285.png 492w\" sizes=\"(max-width: 714px) 100vw, 714px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6: Test your PHP process<\/h2>\n\n\n\n<p class=\"has-black-color has-text-color\">To test the configuration of your web server for PHP processing.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Create a new file named&nbsp;info.php inside var\/www\/html with the following command:<\/p>\n\n\n\n<ul class=\"has-black-color has-vivid-cyan-blue-background-color has-text-color has-background wp-block-list\"><li><strong>sudo nano \/var\/www\/html\/info.php<\/strong><\/li><\/ul>\n\n\n\n<p class=\"has-black-color has-text-color\">With the code:<\/p>\n\n\n\n<p class=\"has-black-color has-vivid-cyan-blue-background-color has-text-color has-background\"><strong>&lt;?php<br><\/strong><br><strong>phpinfo(); <\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"714\" height=\"89\" src=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Create-file-inside-directory.png\" alt=\"Create a new file inside directory\" class=\"wp-image-805\" srcset=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Create-file-inside-directory.png 714w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Create-file-inside-directory-300x37.png 300w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Create-file-inside-directory-480x60.png 480w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Create-file-inside-directory-580x72.png 580w, https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/Create-file-inside-directory-665x83.png 665w\" sizes=\"(max-width: 714px) 100vw, 714px\" \/><\/figure>\n\n\n\n<ol class=\"has-black-color has-text-color wp-block-list\"><li>Save the file <\/li><li>Head over to your browser <\/li><li>Browse the server\u2019s IP address&nbsp;<code>http:\/\/your_server_ip\/info.php<\/code>.<\/li><\/ol>\n\n\n\n<p class=\"has-black-color has-text-color\">You will get the following webpage.<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-6 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img decoding=\"async\" width=\"749\" height=\"484\" src=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-processing-testing-1-e1629400477777.jpg\" alt=\"PHP processing testing\" data-id=\"807\" data-full-url=\"https:\/\/serverhub.com\/kb\/wp-content\/uploads\/2021\/08\/PHP-processing-testing-1-e1629400477777.jpg\" data-link=\"https:\/\/serverhub.com\/kb\/?attachment_id=807\" class=\"wp-image-807\"\/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">ServerHub to the rescue <\/h2>\n\n\n\n<p class=\"has-black-color has-text-color\">You can do it yourself, but you don&#8217;t have to!<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Wave us hello at&nbsp;<a href=\"https:\/\/serverhub.com\/company\/contact\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>support@serverhub.com<\/strong><\/a>&nbsp;and let us guide you&nbsp;<strong>freely&nbsp;<\/strong>to your upcoming website.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Additionally, with 100% Uptime, 24\/7 support, and 40GB interface connectivities. <\/p>\n\n\n\n<p class=\"has-black-color has-text-color\"><strong><a href=\"https:\/\/serverhub.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">ServerHub<\/a><\/strong>&nbsp;spans 9 locations and offers custom quotes <\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Check out our amazing deals starting<strong> <a href=\"https:\/\/serverhub.com\/vps\/ssd-vps\" target=\"_blank\" rel=\"noreferrer noopener\">from $5 a month!<\/a><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Final thoughts <\/h2>\n\n\n\n<p class=\"has-black-color has-text-color\">That was the simplest-full guide to master the PHP basics on Ubuntu 20.04.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">I&#8217;m sure that by now, you are a PHP professional yourself.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">With learning how to install PHP, PHP extensions, and integrating them with Apache.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Let us discuss your thoughts and questions in the comments below so we can brainstorm, together!<\/p>\n\n\n\n<p class=\"has-black-color has-vivid-green-cyan-background-color has-text-color has-background\"><strong>This tutorial is a part of the LAMP stack guide series.<\/strong> <\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Check out the rest of the series:  <\/p>\n\n\n\n<p><strong><strong><a href=\"https:\/\/serverhub.com\/kb\/what-is-ubuntu-linux-and-how-to-install-it\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to install the latest Ubuntu Linux? Beginner\u2019s guide<\/a><\/strong><\/strong> <\/p>\n\n\n\n<p><strong><a href=\"https:\/\/serverhub.com\/kb\/how-to-install-apache-on-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\">How To Install Apache On Ubuntu? The Comprehensive Guide<\/a><\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/serverhub.com\/kb\/how-to-install-mysql-on-ubuntu-the-proven-2021-guide\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>How To Install MySQL On Ubuntu? The Proven 2021 Guide<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP is a simple, secure, flexible, and efficient open-source language. Standing for PHP Hypertext Preprocessor, it is the most used programming language worldwide. Able to integrate into HTML, PHP handles the connection between your web pages and databases. After installing\u00a0Apache as a web server, and\u00a0MySQL as a database system. The scripting language, PHP, will process &#8230; <a title=\"How to Install PHP on Ubuntu 20.04? Step-by-step Easy Guide\" class=\"read-more\" href=\"https:\/\/serverhub.com\/kb\/how-to-install-php-on-ubuntu-20-04\/\" aria-label=\"More on How to Install PHP on Ubuntu 20.04? Step-by-step Easy Guide\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":802,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"om_disable_all_campaigns":false,"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[60,61,99,62,59],"tags":[8,100,63],"class_list":["post-782","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","category-linux","category-php","category-tutorial","category-ubuntu","tag-linux","tag-php","tag-ubuntu"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/posts\/782","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/comments?post=782"}],"version-history":[{"count":2,"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/posts\/782\/revisions"}],"predecessor-version":[{"id":1049,"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/posts\/782\/revisions\/1049"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/media\/802"}],"wp:attachment":[{"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/media?parent=782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/categories?post=782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/tags?post=782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}