{"id":29220,"date":"2018-12-21T14:03:11","date_gmt":"2018-12-21T20:03:11","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=29220"},"modified":"2022-12-30T02:25:58","modified_gmt":"2022-12-30T08:25:58","slug":"how-to-install-php-7-3-on-ubuntu-16-04","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/","title":{"rendered":"How to Install PHP 7.3 on Ubuntu 16.04"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div>\r\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"742\" height=\"372\" class=\"wp-image-29286\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/RH-742-php73-ubuntu.jpg\" alt=\"Install PHP 7.3 on Ubuntu 16\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/RH-742-php73-ubuntu.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/RH-742-php73-ubuntu-150x75.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/RH-742-php73-ubuntu-300x150.jpg 300w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/figure>\r\n\r\n\r\n\r\n<p>In this article, we will show you how to install PHP 7.3 on Ubuntu 16.04. PHP (Hypertext Preprocessor) is an open-source server-side scripting language and is widely used for creating dynamic web pages. PHP is among the most popular languages because it is secure, fast, simple, efficient, flexible, and a loosely typed language.<\/p>\r\n\r\n\r\n\r\n<div class=\"wp-block-image\">\r\n<figure class=\"alignright size-full is-resized\"><img decoding=\"async\" class=\"wp-image-38332\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/07\/install-php-7.3-ubuntu-16.04.jpg\" alt=\"install php 7.3 ubuntu 16.04\" width=\"162\" height=\"162\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/07\/install-php-7.3-ubuntu-16.04.jpg 1000w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/07\/install-php-7.3-ubuntu-16.04-300x300.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/07\/install-php-7.3-ubuntu-16.04-150x150.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/07\/install-php-7.3-ubuntu-16.04-768x768.jpg 768w\" sizes=\"(max-width: 162px) 100vw, 162px\" \/><\/figure>\r\n<\/div>\r\n\r\n\r\n\r\n<p><br \/>PHP can be run on any operating platform (Windows, Linux, MacOS) and almost on any web server (Nginx, Apache). PHP 7.3.0 was officially released on December 6, 2018, and it contains new improved features and functions.<\/p>\r\n\r\n\r\n\r\n<p>For more updates, you can also check our guide on <a href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-8-on-ubuntu-20-04\/\">how to install PHP 8 on Ubuntu 20.04<\/a><\/p>\r\n\r\n\r\n\r\n<p><!--more--><\/p>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\" id=\"h-requirements\">Requirements:<\/h4>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>In this tutorial, we will use an <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\">Ubuntu VPS<\/a> with an already installed LAMP stack, because our Ubuntu 16.04 VPS has been pre-installed with a fully working LAMP stack. However, if you do this on a clean server, we will show you how to install Apache&#8217;s web server during this tutorial.<\/li>\r\n<li>A user with sudo privileges or root is required.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69eb0f4ae355e\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69eb0f4ae355e\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/#Step-1-Connect-to-your-server-via-SSH-and-update-your-server-OS-packages\" >Step 1: Connect to your server via SSH and update your server OS packages<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/#Step-2-Install-a-Web-Server\" >Step 2: Install a Web Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/#Step-3-Install-Ondrej-Surys-PPA-repository\" >Step 3: Install Ond\u0159ej Sur\u00fd\u2019s PPA\u00a0repository<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/#Step-4-Install-PHP-73\" >Step 4: Install PHP 7.3<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/#Step-5-Install-specific-PHP-73-extensions\" >Step 5: Install specific PHP 7.3 extensions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/#Step-6-Change-the-PHP-version\" >Step 6: Change the PHP version<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/#Step-7-Test-and-verify-your-PHP-version\" >Step 7: Test and verify your PHP version<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-step-1-connect-to-your-server-via-ssh-and-update-your-server-os-packages\"><span class=\"ez-toc-section\" id=\"Step-1-Connect-to-your-server-via-SSH-and-update-your-server-OS-packages\"><\/span>Step 1: Connect to your server via SSH and update your server OS packages<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<p>The first thing to do is to connect to your VPS via SSH as a user with root privileges or a root user.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">ssh root@SERVER_IP_ADDRESS -p PORT_NUMBER<\/pre>\r\n\r\n\r\n\r\n<p>Just replace the &#8220;SERVER_IP_ADDRESS&#8221; and &#8220;PORT_NUMBER&#8221; with your actual server IP address and port number.<br \/>Please note that if you want to connect to a user who has root privileges, simply change the &#8216;root&#8217; user with the user you want to use.<\/p>\r\n\r\n\r\n\r\n<p>Once logged in, you can update your Ubuntu OS packages to the latest version using:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">apt update &amp;&amp; apt upgrade<\/pre>\r\n\r\n\r\n\r\n<p>If you have a new Linux VPS and you are not familiar with the procedure on how to manage your server then you should definitely check our article <a href=\"https:\/\/www.rosehosting.com\/blog\/connect-to-your-linux-vps-via-ssh\/\">Connecting via SSH to your server<\/a>.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id=\"h-step-2-install-a-web-server\"><span class=\"ez-toc-section\" id=\"Step-2-Install-a-Web-Server\"><\/span>Step 2: Install a Web Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<p>In this step, we will install a web server. You can choose between Apache or Nginx because both are fast, secure, and reliable. In this tutorial, we will use Apache which is the most popular among web servers.<\/p>\r\n\r\n\r\n\r\n<p>To install Apache web server, run the following command on your server:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">apt install apache2<\/pre>\r\n\r\n\r\n\r\n<p>After installing Apache2, use the command below to start the Apache service:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">systemctl start apache2<\/pre>\r\n\r\n\r\n\r\n<p>Also, you can enable Apache server to always startup when the server boots up:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">systemctl enable apache2<\/pre>\r\n\r\n\r\n\r\n<p>You can always check the status of the Apache web service with this command:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">systemctl status apache2<\/pre>\r\n\r\n\r\n\r\n<p>You can also open your favorite browser and enter your IP address (for example http:\/\/your_server_ip_address), and check whether Apache is running on your server.<br \/>If you see the Apache&#8217;s default welcome page it means that the Apache web server is successfully installed and running.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id=\"h-step-3-install-ond-ej-sur-s-ppa-repository\"><span class=\"ez-toc-section\" id=\"Step-3-Install-Ondrej-Surys-PPA-repository\"><\/span>Step 3: Install Ond\u0159ej Sur\u00fd\u2019s PPA\u00a0repository<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<p>We will use the Ond\u0159ej Sur\u00fd\u2019s PPA to install PHP 7.3 version, so install the software-properties-common and python-software-properties packages:<\/p>\r\n\r\n\r\n\r\n<p>apt install software-properties-common python-software-properties<\/p>\r\n\r\n\r\n\r\n<p>After the installation is complete, add the Ond\u0159ej PPA:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej\/php<\/pre>\r\n\r\n\r\n\r\n<p>and then update your sources:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">apt update<\/pre>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id=\"h-step-4-install-php-7-3\"><span class=\"ez-toc-section\" id=\"Step-4-Install-PHP-73\"><\/span>Step 4: Install PHP 7.3<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<p>We can install PHP 7.3 with the following command:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">apt install php7.3 php7.3-cli php7.3-common<\/pre>\r\n\r\n\r\n\r\n<p>To check if PHP 7.3 is installed on your server, use the command below:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">php -v<\/pre>\r\n\r\n\r\n\r\n<p>Output:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">PHP 7.3.0-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Dec 6 2018 20:24:27) ( NTS )\r\nCopyright (c) 1997-2018 The PHP Group\r\nZend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies\r\nwith Zend OPcache v7.3.0-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies<\/pre>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id=\"h-step-5-install-specific-php-7-3-extensions\"><span class=\"ez-toc-section\" id=\"Step-5-Install-specific-PHP-73-extensions\"><\/span>Step 5: Install specific PHP 7.3 extensions<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<p>If you want to install a specific module for PHP 7.3, you can search with this command:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">apt-cache search php7.3<\/pre>\r\n\r\n\r\n\r\n<p>Or, if you want to check all the PHP modules available in Ubuntu, run:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">apt-cache search --names-only ^php<\/pre>\r\n\r\n\r\n\r\n<p>You can find the command below useful if you want to install the most frequently used PHP modules.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">apt install php-pear php7.3-curl php7.3-dev php7.3-gd php7.3-mbstring php7.3-zip php7.3-mysql php7.3-xml php7.3-fpm libapache2-mod-php7.3 php7.3-imagick php7.3-recode php7.3-tidy php7.3-xmlrpc php7.3-intl<\/pre>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id=\"h-step-6-change-the-php-version\"><span class=\"ez-toc-section\" id=\"Step-6-Change-the-PHP-version\"><\/span>Step 6: Change the PHP version<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<p>In this step from our article, we will show you how you can change which version of PHP to be the default if you have multiple versions of PHP installed on your Ubuntu server.<\/p>\r\n\r\n\r\n\r\n<p>To set PHP 7.0 as the default, run:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">update-alternatives --set php \/usr\/bin\/php7.0<\/pre>\r\n\r\n\r\n\r\n<p>To set PHP 7.2 as the default, run:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">update-alternatives --set php \/usr\/bin\/php7.2<\/pre>\r\n\r\n\r\n\r\n<p>To set PHP 7.3 as the default, run:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">update-alternatives --set php \/usr\/bin\/php7.3<\/pre>\r\n\r\n\r\n\r\n<p>Before we can configure Apache to use PHP 7.3, we need to disable the old version of PHP 7.0 by typing:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">a2dismod php7.0<\/pre>\r\n\r\n\r\n\r\n<p>Now enable the newly installed PHP 7.3 version with the following command:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">a2enmod php7.3<\/pre>\r\n\r\n\r\n\r\n<p>Restart the Apache web server for the changes to take effect:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">systemctl restart apache2<\/pre>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id=\"h-step-7-test-and-verify-your-php-version\"><span class=\"ez-toc-section\" id=\"Step-7-Test-and-verify-your-PHP-version\"><\/span>Step 7: Test and verify your PHP version<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<p>We can test the PHP version, Apache PHP and PHP modules with a simple PHP info file. We can create a phpinfo.php file in the web server default directory and access it with your server IP address on your favorite browser.<br \/>In our example, we are using Apache web server so the default directory is located at \/var\/www\/html\/ .<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">nano \/var\/www\/html\/phpinfo.php<\/pre>\r\n\r\n\r\n\r\n<p>Add the following code to it:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">&lt;?php phpinfo(); ?&gt;<\/pre>\r\n\r\n\r\n\r\n<p>Open the \u2018phpinfo.php\u2019 file using a web browser:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">http:\/\/&lt;ip_address&gt;\/phpinfo.php or http:\/\/&lt;your_domain.com&gt;\/phpinfo.php<\/pre>\r\n\r\n\r\n\r\n<p>You should be able to view the current information about PHP on your server.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"933\" height=\"251\" class=\"wp-image-29221\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/php7.3.jpg\" alt=\"php7.3\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/php7.3.jpg 933w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/php7.3-150x40.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/php7.3-300x81.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/php7.3-768x207.jpg 768w\" sizes=\"(max-width: 933px) 100vw, 933px\" \/><\/figure>\r\n\r\n\r\n\r\n<p>Congratulations, you have successfully installed PHP 7.3 on an Ubuntu 16.04 server. For more detailed information about PHP 7.3, you can check the <a href=\"http:\/\/php.net\/ChangeLog-7.php#7.3.0\">official PHP documentation<\/a>.<\/p>\r\n\r\n\r\n<hr class=\"wp-block-separator\" \/>\r\n\r\n\r\n<p>Of course, you don\u2019t have to <strong>install PHP 7.3 on Ubuntu 16.04<\/strong>, if you use one of our\u00a0<a href=\"https:\/\/www.rosehosting.com\/php-hosting.html\" target=\"_blank\" rel=\"noreferrer noopener\">Managed PHP Hosting<\/a> services, in which case you can simply ask our expert system administrators to install PHP 7.3 on Ubuntu 16.04 for you, using the LAMP or LEMP stack or any other web hosting stack of your choice. They are available 24\u00d77 and will take care of your request immediately.<\/p>\r\n\r\n\r\n\r\n<div class=\"wp-block-image\">\r\n<figure class=\"alignright size-large is-resized\"><img decoding=\"async\" class=\"wp-image-38333\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/07\/ubuntu-16.04-install-php-7.3-1024x576.png?v=1627633907\" alt=\"ubuntu 16.04 install php 7.3\" width=\"228\" height=\"127\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/07\/ubuntu-16.04-install-php-7.3-1024x576.png 1024w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/07\/ubuntu-16.04-install-php-7.3-300x169.png 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/07\/ubuntu-16.04-install-php-7.3-150x84.png 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/07\/ubuntu-16.04-install-php-7.3-768x432.png 768w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/07\/ubuntu-16.04-install-php-7.3-1536x864.png 1536w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/07\/ubuntu-16.04-install-php-7.3-2048x1152.png 2048w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/07\/ubuntu-16.04-install-php-7.3-1320x743.png 1320w\" sizes=\"(max-width: 228px) 100vw, 228px\" \/><\/figure>\r\n<\/div>\r\n\r\n\r\n\r\n<p><span style=\"color: #ff0000;\"><strong>PS.<\/strong><\/span> If you liked this post, on how to install PHP 7.3 on an Ubuntu 16.04 server, please share it with your friends on social networks or simply leave a comment in the comments section. Thanks.<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will show you how to install PHP 7.3 on Ubuntu 16.04. PHP (Hypertext Preprocessor) is an &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Install PHP 7.3 on Ubuntu 16.04\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/#more-29220\" aria-label=\"Read more about How to Install PHP 7.3 on Ubuntu 16.04\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":29286,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,1698,1712],"tags":[50,59],"class_list":["post-29220","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-ubuntu","category-web-frameworks","tag-php","tag-ubuntu","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Install PHP 7.3 on Ubuntu 16.04 | RoseHosting<\/title>\n<meta name=\"description\" content=\"Looking to install PHP 7.3 on Ubuntu 16.04? Look at our detailed tutorial on setting up PHP on an Ubuntu 16.04 OS.\" \/>\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.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/\" \/>\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 7.3 on Ubuntu 16.04\" \/>\n<meta property=\"og:description\" content=\"How to Install PHP 7.3 on Ubuntu 16.04 | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2018-12-21T20:03:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-30T08:25:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/RH-742-php73-ubuntu.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-3-on-ubuntu-16-04\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-3-on-ubuntu-16-04\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Install PHP 7.3 on Ubuntu 16.04\",\"datePublished\":\"2018-12-21T20:03:11+00:00\",\"dateModified\":\"2022-12-30T08:25:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-3-on-ubuntu-16-04\\\/\"},\"wordCount\":886,\"commentCount\":10,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-3-on-ubuntu-16-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/RH-742-php73-ubuntu.jpg\",\"keywords\":[\"php\",\"ubuntu\"],\"articleSection\":[\"Tutorials\",\"Ubuntu\",\"Web Frameworks\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-3-on-ubuntu-16-04\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-3-on-ubuntu-16-04\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-3-on-ubuntu-16-04\\\/\",\"name\":\"How to Install PHP 7.3 on Ubuntu 16.04 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-3-on-ubuntu-16-04\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-3-on-ubuntu-16-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/RH-742-php73-ubuntu.jpg\",\"datePublished\":\"2018-12-21T20:03:11+00:00\",\"dateModified\":\"2022-12-30T08:25:58+00:00\",\"description\":\"Looking to install PHP 7.3 on Ubuntu 16.04? Look at our detailed tutorial on setting up PHP on an Ubuntu 16.04 OS.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-3-on-ubuntu-16-04\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-3-on-ubuntu-16-04\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-3-on-ubuntu-16-04\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/RH-742-php73-ubuntu.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/RH-742-php73-ubuntu.jpg\",\"width\":742,\"height\":372},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-php-7-3-on-ubuntu-16-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install PHP 7.3 on Ubuntu 16.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Install PHP 7.3 on Ubuntu 16.04 | RoseHosting","description":"Looking to install PHP 7.3 on Ubuntu 16.04? Look at our detailed tutorial on setting up PHP on an Ubuntu 16.04 OS.","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.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/","og_locale":"en_US","og_type":"article","og_title":"How to Install PHP 7.3 on Ubuntu 16.04","og_description":"How to Install PHP 7.3 on Ubuntu 16.04 | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2018-12-21T20:03:11+00:00","article_modified_time":"2022-12-30T08:25:58+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/RH-742-php73-ubuntu.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Install PHP 7.3 on Ubuntu 16.04","datePublished":"2018-12-21T20:03:11+00:00","dateModified":"2022-12-30T08:25:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/"},"wordCount":886,"commentCount":10,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/RH-742-php73-ubuntu.jpg","keywords":["php","ubuntu"],"articleSection":["Tutorials","Ubuntu","Web Frameworks"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/","name":"How to Install PHP 7.3 on Ubuntu 16.04 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/RH-742-php73-ubuntu.jpg","datePublished":"2018-12-21T20:03:11+00:00","dateModified":"2022-12-30T08:25:58+00:00","description":"Looking to install PHP 7.3 on Ubuntu 16.04? Look at our detailed tutorial on setting up PHP on an Ubuntu 16.04 OS.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/RH-742-php73-ubuntu.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/12\/RH-742-php73-ubuntu.jpg","width":742,"height":372},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-php-7-3-on-ubuntu-16-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install PHP 7.3 on Ubuntu 16.04"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/29220","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=29220"}],"version-history":[{"count":7,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/29220\/revisions"}],"predecessor-version":[{"id":44599,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/29220\/revisions\/44599"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/29286"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=29220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=29220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=29220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}