{"id":1368,"date":"2021-03-01T05:34:56","date_gmt":"2021-03-01T11:34:56","guid":{"rendered":"https:\/\/linuxhostsupport.com\/blog\/?p=1368"},"modified":"2021-03-01T05:34:56","modified_gmt":"2021-03-01T11:34:56","slug":"how-to-install-magento-2-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-magento-2-on-ubuntu-20-04\/","title":{"rendered":"How to Install Magento 2 on Ubuntu 20.04"},"content":{"rendered":"<div id=\"linux-1528299382\" class=\"linux-before-1st-paragraph linux-entity-placement\" style=\"margin-top: 15px;margin-bottom: 15px;\"><a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting\/?mtm_campaign=blogs&#038;mtm_source=lhs&#038;mtm_medium=blog&#038;mtm_content=managed-vps&#038;mtm_cid=1339&#038;mtm_placement=inline\" aria-label=\"Untitled\"><img src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322.jpg\" alt=\"\"  srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322.jpg 728w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322-300x37.jpg 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" width=\"728\" height=\"90\"  style=\"display: inline-block;\" \/><\/a><\/div><p>In this guide, we will show you how to install Magento 2 with LEMP stack on an Ubuntu 20.04 VPS.<\/p>\n<p>Magento is one of the most popular open-source e-commerce platforms available, thanks to its customizability and flexibility. It is created using the Zend Framework and uses MySQL as its database management system. Magento provides online merchants with a very flexible shopping cart and it comes with a rich set of features.<\/p>\n<p><strong>Installing Magento 2 on Ubuntu 20.04<\/strong>\u00a0should take less than 10 minutes to complete. Let\u2019s get started with the tutorial.<\/p>\n<p><!--more--><\/p>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>An Ubuntu 20.04 VPS with root access enabled, or a user with or a user with Sudo privileges is also required<\/li>\n<li>2GB of RAM or higher<\/li>\n<li>MySQL 5.6 or 5.7 version, (or MariaDB &gt;= 10.0, or higher, Percona 5.7, or any other binary-compatible MySQL database server)<\/li>\n<li>nginx, or Apache webserver with mod_rewrite module enabled<\/li>\n<li>PHP 7.3 with bcmath, ctype, curl, dom, gd, hash, iconv, intl, libxml, mbstring, openssl, pdo_mysql, simplexml, soap, xsl and zip extensions enabled. Also, for performance reasons, it is a good idea to install and enable the opcache extension.<\/li>\n<li>A valid domain name for accessing the Magento 2 website. Also, a valid SSL certificate is required for accessing the website using HTTPS.<\/li>\n<\/ul>\n<h2><span id=\"Step-1-Log-in-and-Update-Packages\" class=\"ez-toc-section\"><\/span>Step 1: Login and Update the OS Packages<\/h2>\n<p>First, we\u2019re going to need to log into our server using SSH. You can do that by entering this command:<\/p>\n<pre>ssh root@IP_Address -p Port_number<\/pre>\n<p>Replace \u201croot\u201d with a user that has sudo privileges if necessary. Additionally, replace \u201cIP_Address\u201d and \u201cPort_Number\u201d with your server\u2019s respective IP address and SSH port number.<\/p>\n<p>Once you are logged in, you should update all of your Ubuntu OS packages to their latest available versions.<\/p>\n<pre>apt-get update \r\napt-get upgrade<\/pre>\n<p>Once all the OS packages are up-to-date, restart your server if required to apply the configuration changes.<\/p>\n<h2><span id=\"Step-2-Install-Apache-and-PHP\" class=\"ez-toc-section\"><\/span>Step 2: Install LEMP<\/h2>\n<p>LEMP is an acronym that describes a Linux OS with an installed Nginx web server, i.e. LEMP consists of Linux, Nginx, MySQL, and PHP.<\/p>\n<h3>Install Nginx<\/h3>\n<p>If there is an Apache web server installed on the server, stop the Apache service and disable it to start on server boot:<\/p>\n<pre>systemctl stop apache2\r\nsystemctl disable apache2<\/pre>\n<p>Install Nginx with the following command:<\/p>\n<pre>apt-get install nginx<\/pre>\n<h3>Install MySQL<\/h3>\n<p>Install the MySQL database server which will be used for storing the data of your Magento website, such as products, categories, customers, and orders.<br \/>\nFor the purposes of this tutorial, we will install and use MariaDB. You can also install and use the MySQL 5.7 version. Please note, MySQL 8 version is not supported yet. To install the MariaDB database server, enter the following command:<\/p>\n<pre>apt install mariadb-server<\/pre>\n<p>Enable the MariaDB service to start on server boot:<\/p>\n<pre>systemctl enable mariadb.service<\/pre>\n<h3>Install PHP 7.3<\/h3>\n<p>By default, Ubuntu 20.04 ships with PHP version 7.4. But, Magento 2.3 does not support PHP 7.4. So, we will need to remove PHP 7.4 version, install PHP 7.3 version and all the respective PHP extensions.<br \/>\nRemove the PHP 7.4 version:<\/p>\n<pre>apt-get remove php7.4 php7.4-common<\/pre>\n<p>Add PPA for\u00a0PHP 7.3<em>:<\/em><\/p>\n<pre>add-apt-repository ppa:ondrej\/php<\/pre>\n<p>Next, update the OS package list and install PHP 7.3 with the following command:<\/p>\n<pre>apt-get update\r\napt-get install php7.3<\/pre>\n<p>Install all the required PHP extensions with the following command:<\/p>\n<pre>apt-get install php7.3-bcmath php7.3-common php7.3-curl php7.3-fpm php7.3-gd php7.3-intl php7.3-mbstring php7.3-mysql php7.3-soap php7.3-xml php7.3-xsl php7.3-zip\r\n<\/pre>\n<p>Once the PHP extensions have been installed on the server, install few other OS packages required for the Magento 2 installation:<\/p>\n<pre>apt-get install git curl software-properties-common<\/pre>\n<p>Next, open the main PHP configuration file <code>\/etc\/php\/7.3\/fpm\/php.ini<\/code> and change the following PHP settings:<\/p>\n<pre>nano \/etc\/php\/7.3\/fpm\/php.ini<\/pre>\n<p>Change the following settings:<\/p>\n<pre>memory_limit = 256M\r\nupload_max_filesize = 128M\r\nzlib.output_compression = On\r\nmax_execution_time = 600\r\nmax_input_time = 900\r\ndate.timezone = America\/Chicago<\/pre>\n<p>Save and close the PHP configuration file.<\/p>\n<h2>Step 3: Create a Database for Magento 2<\/h2>\n<p>Next, we will create our MySQL user and database for our Magento 2 website. Log in to your MySQL server with the following command and enter your MySQL root password when prompted:<\/p>\n<pre>mysql -u root -p<\/pre>\n<p>To create a new database for our Magento 2 instance, run the following commands:<\/p>\n<pre>mysql&gt; set global log_bin_trust_function_creators=1;\r\nmysql&gt; CREATE USER 'magento'@'localhost' IDENTIFIED WITH mysql_native_password BY 'strongPassword';\r\nmysql&gt; create database magentodb;\r\nmysql&gt; GRANT ALL PRIVILEGES ON magentodb.* TO 'magento'@'localhost';\r\nmysql&gt; flush privileges;\r\nmysql&gt; quit<\/pre>\n<h2>Step 4: Install Magento 2<\/h2>\n<p>We can now proceed with the Magento 2 installation. At the time of writing this article, the latest stable version of Magento is version 2.3.5.<br \/>\nFirst, go to the GitHub repository and download the latest version of Magento with the following command:<\/p>\n<pre>mkdir -p \/var\/www\/magento2\/\r\ncd \/var\/www\/magento2\/\r\ngit clone https:\/\/github.com\/magento\/magento2.git \/var\/www\/magento2\/<\/pre>\n<p>Next, check the latest version of Magento 2 with the following command:<\/p>\n<pre>git checkout $(git describe --tags $(git rev-list --tags --max-count=1))<\/pre>\n<p>Next, we will need to install Composer to install all necessary Magento components. You can install Composer by just running the following command:<\/p>\n<pre>curl -sS https:\/\/getcomposer.org\/installer | php -- --install-dir=\/usr\/bin --filename=composer<\/pre>\n<pre>cd \/var\/www\/magento2\r\ncomposer install\r\nbin\/magento setup:install --base-url=http:\/\/yourdomain.com\/ --db-host=localhost --db-name=magentodb --db-user=magento --db-password=strongPassword --admin-firstname=FirstName --admin-lastname=LastName --admin-email=your@emailaddress.com --admin-user=magentoadmin --admin-password=strong-password --language=en_US --currency=USD --timezone=America\/Chicago --use-rewrites=1\r\n<\/pre>\n<p>Do not forget to replace the domain name, database password, admin username, password, and admin email address accordingly.<br \/>\nOnce the installation is complete, you should receive the following output:<br \/>\n[Progress: 699 \/ 701]<br \/>\nPost-installation file permissions check&#8230;<br \/>\nFor security, remove write permissions from these directories: &#8216;\/var\/www\/magento2\/app\/etc&#8217;<br \/>\n[Progress: 700 \/ 701]<br \/>\nWrite installation date&#8230;<br \/>\n[Progress: 701 \/ 701]<br \/>\n[SUCCESS]: Magento installation complete.<br \/>\n[SUCCESS]: Magento Admin URI: \/admin_1k4pc0<br \/>\nNothing to import.<\/p>\n<p>Remember the &#8216;Magento Admin URI&#8217;. You will need this info later when you need to log in to the Magento backend.<\/p>\n<p>Change the ownership of the\u00a0<code>magento2<\/code>\u00a0directory to\u00a0<code>www-data<\/code>\u00a0with the following command:<\/p>\n<pre>chown -R www-data:www-data \/var\/www\/magento2\/<\/pre>\n<h2>Step 5: Create nginx Configuration File<\/h2>\n<p>upstream fastcgi_backend {<br \/>\nserver unix:\/run\/php\/php7.3-fpm.sock;<br \/>\n}<\/p>\n<p>server {<br \/>\nserver_name yourdomain.com;<br \/>\nlisten 80;<br \/>\nset $MAGE_ROOT \/var\/www\/magento2;<br \/>\nset $MAGE_MODE developer; # or production<\/p>\n<p>access_log \/var\/log\/nginx\/magento2-access.log;<br \/>\nerror_log \/var\/log\/nginx\/magento2-error.log;<\/p>\n<p>include \/var\/www\/magento2\/nginx.conf.sample;<br \/>\n}<\/p>\n<p>Remove the default nginx configuration file, if is not being used:<\/p>\n<pre>rm -f \/etc\/nginx\/sites-enabled\/default<\/pre>\n<p>Enable the newly created nginx configuration file, then test the nginx configuration and make sure that there are no errors:<\/p>\n<pre>ln -s \/etc\/nginx\/sites-available\/magento2 \/etc\/nginx\/sites-enabled\/magento2<\/pre>\n<pre>nginx -t\r\nnginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\r\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful<\/pre>\n<h2>Step 6: Install SSL Certificate<\/h2>\n<p>Add PPA for certbot<\/p>\n<pre>add-apt-repository ppa:certbot\/certbot\r\napt-get update\r\napt-get install certbot python3-certbot-nginx<\/pre>\n<p>Install a new SSL certificate on your domain name:<\/p>\n<pre>certbot --nginx -d <code>yourdomain.com<\/code> -d <code>www.yourdomain.com<\/code><\/pre>\n<p>Please select &#8216;2&#8217; and choose to redirect HTTP traffic to HTTPS:<br \/>\n&#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211;<br \/>\n1: No redirect &#8211; Make no further changes to the webserver configuration.<br \/>\n2: Redirect &#8211; Make all requests redirect to secure HTTPS access. Choose this for<br \/>\nnew sites, or if you&#8217;re confident your site works on HTTPS. You can undo this<br \/>\nchange by editing your web server&#8217;s configuration.<br \/>\n&#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211; &#8211;<br \/>\nSelect the appropriate number [1-2] then [enter] (press &#8216;c&#8217; to cancel): 2<\/p>\n<p>Use the following Magento 2 CLI commands to update the Magento <code>base-url<\/code>\u00a0and the\u00a0<code>base-url-secure<\/code> values:<\/p>\n<pre>cd \/var\/www\/magento2\/<\/pre>\n<pre>php bin\/magento setup:store-config:set --base-url=\"<code>https:\/\/yourdomain.com\/<\/code>\"<\/pre>\n<pre>php bin\/magento setup:store-config:set --base-url-secure=\"<code>https:\/\/yourdomain.com\/<\/code>\"<\/pre>\n<p>Edit the nginx configuration file and enable HTTP\/2:<\/p>\n<pre>nano \/etc\/nginx\/sites-enabled\/magento2<\/pre>\n<p>Replace:<\/p>\n<pre>listen 443 ssl;<\/pre>\n<p>With:<\/p>\n<pre>listen 443 ssl http2;<\/pre>\n<p>Restart the Nginx service for the changes to take effect:<\/p>\n<pre>systemctl restart cron.service<\/pre>\n<h2>Step 7: Install Cron Job<\/h2>\n<p>Magento requires a cron job configuration for many important system functions, so create the following cron job:<\/p>\n<pre>crontab -u www-data -e<\/pre>\n<pre>* * * * * \/usr\/bin\/php \/var\/www\/magento2\/bin\/magento cron:run | grep -v \"Ran jobs by schedule\" &gt;&gt; \/var\/www\/magento2\/var\/log\/magento.cron.log<\/pre>\n<p>Restart the cron service:<\/p>\n<pre>systemctl restart cron.service<\/pre>\n<p>That is it. Magento 2 has been successfully installed on your server.<\/p>\n<p>You can access the Magento front-end at <code>http:\/\/yourdomain.com<\/code> :<br \/>\n<img decoding=\"async\" class=\"alignright size-full wp-image-1369\" src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/03\/how-to-install-magento-2-on-ubuntu-20.04.png\" alt=\"how to install magento 2 on ubuntu 20.04\" width=\"1345\" height=\"603\" srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/03\/how-to-install-magento-2-on-ubuntu-20.04.png 1345w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/03\/how-to-install-magento-2-on-ubuntu-20.04-300x134.png 300w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/03\/how-to-install-magento-2-on-ubuntu-20.04-1024x459.png 1024w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/03\/how-to-install-magento-2-on-ubuntu-20.04-768x344.png 768w\" sizes=\"(max-width: 1345px) 100vw, 1345px\" \/><br \/>\nLog in to the Magento 2 back-end at <code>http:\/\/yourdomain.com\/Magento Admin URI<\/code>, and configure Magento according to your needs, install extensions, add products, categories etc.<\/p>\n<p><img decoding=\"async\" class=\"size-large wp-image-32598 aligncenter\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/05\/magento2-back-end-1024x502.png\" alt=\"magento2 back-end\" width=\"1024\" height=\"502\" \/><\/p>\n<hr \/>\n<p>Of course, you don\u2019t have to install Magento 2 with LEMP stack on Ubuntu 20.04, if you use one of our <a href=\"https:\/\/linuxhostsupport.com\/monthly-server-management.html\">Monthly Server Maintenance<\/a> services, in which case you can simply ask our expert system administrators to install Magento 2 on Ubuntu 20.04 for you, using the 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>\n<p><strong>PS.<\/strong> If you liked this post, on how to install Magento 2 with LEMP stack on Ubuntu 20.04, please share it with your friends on the social networks using the buttons below or simply leave a comment in the comments section. Thanks.<\/p><div id=\"linux-1694057286\" class=\"linux-after-8th-paragraph linux-entity-placement\" style=\"margin-top: 15px;margin-bottom: 15px;\"><a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting\/?mtm_campaign=blogs&#038;mtm_source=lhs&#038;mtm_medium=blog&#038;mtm_content=managed-vps&#038;mtm_cid=1340&#038;mtm_placement=inline\" aria-label=\"Untitled\"><img src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622.jpg\" alt=\"\"  srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622.jpg 728w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622-300x37.jpg 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" width=\"728\" height=\"90\"  style=\"display: inline-block;\" \/><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we will show you how to install Magento 2 with LEMP stack on an Ubuntu 20.04 VPS. Magento is one of the most popular open-source e-commerce platforms available, thanks to its customizability and flexibility. It is created using the Zend Framework and uses MySQL as its database management system. Magento provides online [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1370,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[178,20],"class_list":["post-1368","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-magento","tag-ubuntu"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install Magento 2 on Ubuntu 20.04 | LinuxHostSupport<\/title>\n<meta name=\"description\" content=\"In this guide, we will show you how to install Magento 2 with LEMP stack on an Ubuntu 20.04 VPS. Magento is one of the most popular open-source e-commerce\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-magento-2-on-ubuntu-20-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 Magento 2 on Ubuntu 20.04 | LinuxHostSupport\" \/>\n<meta property=\"og:description\" content=\"In this guide, we will show you how to install Magento 2 with LEMP stack on an Ubuntu 20.04 VPS. Magento is one of the most popular open-source e-commerce\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-magento-2-on-ubuntu-20-04\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxHostSupport\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/linuxhostsupport\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-01T11:34:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/03\/how-to-install-magento-2-on-ubuntu-20.04.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"750\" \/>\n\t<meta property=\"og:image:height\" content=\"410\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@lnxhostsupport\" \/>\n<meta name=\"twitter:site\" content=\"@lnxhostsupport\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-magento-2-on-ubuntu-20-04\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-magento-2-on-ubuntu-20-04\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#\\\/schema\\\/person\\\/53a9571ea078cdf350137a1e97423cfb\"},\"headline\":\"How to Install Magento 2 on Ubuntu 20.04\",\"datePublished\":\"2021-03-01T11:34:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-magento-2-on-ubuntu-20-04\\\/\"},\"wordCount\":1217,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-magento-2-on-ubuntu-20-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/how-to-install-magento-2-on-ubuntu-20.04.jpg\",\"keywords\":[\"Magento\",\"ubuntu\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-magento-2-on-ubuntu-20-04\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-magento-2-on-ubuntu-20-04\\\/\",\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-magento-2-on-ubuntu-20-04\\\/\",\"name\":\"How to Install Magento 2 on Ubuntu 20.04 | LinuxHostSupport\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-magento-2-on-ubuntu-20-04\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-magento-2-on-ubuntu-20-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/how-to-install-magento-2-on-ubuntu-20.04.jpg\",\"datePublished\":\"2021-03-01T11:34:56+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#\\\/schema\\\/person\\\/53a9571ea078cdf350137a1e97423cfb\"},\"description\":\"In this guide, we will show you how to install Magento 2 with LEMP stack on an Ubuntu 20.04 VPS. Magento is one of the most popular open-source e-commerce\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-magento-2-on-ubuntu-20-04\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-magento-2-on-ubuntu-20-04\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-magento-2-on-ubuntu-20-04\\\/#primaryimage\",\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/how-to-install-magento-2-on-ubuntu-20.04.jpg\",\"contentUrl\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/how-to-install-magento-2-on-ubuntu-20.04.jpg\",\"width\":750,\"height\":410,\"caption\":\"how to install magento 2 on ubuntu 20.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-magento-2-on-ubuntu-20-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Magento 2 on Ubuntu 20.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/\",\"name\":\"LinuxHostSupport\",\"description\":\"Linux Tutorials and Guides\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#\\\/schema\\\/person\\\/53a9571ea078cdf350137a1e97423cfb\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/author\\\/r0s3admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Magento 2 on Ubuntu 20.04 | LinuxHostSupport","description":"In this guide, we will show you how to install Magento 2 with LEMP stack on an Ubuntu 20.04 VPS. Magento is one of the most popular open-source e-commerce","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:\/\/linuxhostsupport.com\/blog\/how-to-install-magento-2-on-ubuntu-20-04\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Magento 2 on Ubuntu 20.04 | LinuxHostSupport","og_description":"In this guide, we will show you how to install Magento 2 with LEMP stack on an Ubuntu 20.04 VPS. Magento is one of the most popular open-source e-commerce","og_url":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-magento-2-on-ubuntu-20-04\/","og_site_name":"LinuxHostSupport","article_publisher":"https:\/\/www.facebook.com\/linuxhostsupport","article_published_time":"2021-03-01T11:34:56+00:00","og_image":[{"width":750,"height":410,"url":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/03\/how-to-install-magento-2-on-ubuntu-20.04.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@lnxhostsupport","twitter_site":"@lnxhostsupport","twitter_misc":{"Written by":"admin","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-magento-2-on-ubuntu-20-04\/#article","isPartOf":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-magento-2-on-ubuntu-20-04\/"},"author":{"name":"admin","@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb"},"headline":"How to Install Magento 2 on Ubuntu 20.04","datePublished":"2021-03-01T11:34:56+00:00","mainEntityOfPage":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-magento-2-on-ubuntu-20-04\/"},"wordCount":1217,"commentCount":0,"image":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-magento-2-on-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/03\/how-to-install-magento-2-on-ubuntu-20.04.jpg","keywords":["Magento","ubuntu"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linuxhostsupport.com\/blog\/how-to-install-magento-2-on-ubuntu-20-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-magento-2-on-ubuntu-20-04\/","url":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-magento-2-on-ubuntu-20-04\/","name":"How to Install Magento 2 on Ubuntu 20.04 | LinuxHostSupport","isPartOf":{"@id":"https:\/\/linuxhostsupport.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-magento-2-on-ubuntu-20-04\/#primaryimage"},"image":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-magento-2-on-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/03\/how-to-install-magento-2-on-ubuntu-20.04.jpg","datePublished":"2021-03-01T11:34:56+00:00","author":{"@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb"},"description":"In this guide, we will show you how to install Magento 2 with LEMP stack on an Ubuntu 20.04 VPS. Magento is one of the most popular open-source e-commerce","breadcrumb":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-magento-2-on-ubuntu-20-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxhostsupport.com\/blog\/how-to-install-magento-2-on-ubuntu-20-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-magento-2-on-ubuntu-20-04\/#primaryimage","url":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/03\/how-to-install-magento-2-on-ubuntu-20.04.jpg","contentUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/03\/how-to-install-magento-2-on-ubuntu-20.04.jpg","width":750,"height":410,"caption":"how to install magento 2 on ubuntu 20.04"},{"@type":"BreadcrumbList","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-magento-2-on-ubuntu-20-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linuxhostsupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install Magento 2 on Ubuntu 20.04"}]},{"@type":"WebSite","@id":"https:\/\/linuxhostsupport.com\/blog\/#website","url":"https:\/\/linuxhostsupport.com\/blog\/","name":"LinuxHostSupport","description":"Linux Tutorials and Guides","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linuxhostsupport.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/linuxhostsupport.com\/blog\/author\/r0s3admin\/"}]}},"_links":{"self":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/1368","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/comments?post=1368"}],"version-history":[{"count":1,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/1368\/revisions"}],"predecessor-version":[{"id":1371,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/1368\/revisions\/1371"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/media\/1370"}],"wp:attachment":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/media?parent=1368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/categories?post=1368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/tags?post=1368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}