{"id":5476,"date":"2021-05-14T08:09:00","date_gmt":"2021-05-14T08:09:00","guid":{"rendered":"https:\/\/www.magetop.com\/blog\/?p=5476"},"modified":"2025-02-11T08:55:27","modified_gmt":"2025-02-11T08:55:27","slug":"install-magento-2-4-7-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/","title":{"rendered":"How To Install Magento 2.4.7 On Ubuntu"},"content":{"rendered":"\n<p>Magento 2.4.7 has been released with hundreds of quality fixes and enhancements, enhancing GraphQL coverage for custom attributes and resolver caches. Please follow the post&nbsp;How To Install Magento 2.4.7 On Ubuntu to install it successfully.<\/p>\n\n\n\n<p>To start the installation, you should prepare yourself a VPS running Ubuntu operating system. In this post, we choose to use VPS provided by Vultr to bring speed and stability to Magento 2 website. If you have not used any VPS service, please click <a href=\"https:\/\/www.vultr.com\/?ref=8377863-6G\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">here<\/a> to sign up for an account and get $100 for free.<\/p>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">1. Notes before installation<\/h2>\n\n\n\n<p>These are the changes of Magento 2.4.7 compared to previous versions. We need to know these before installation.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Compatible PHP 8.3.<\/li>\n\n\n\n<li>Compatible Elasticsearch 8.11.<\/li>\n\n\n\n<li>Supports Varnish 7.4.<\/li>\n\n\n\n<li>Supports Redix 7.2.<\/li>\n\n\n\n<li>Supports RabbitMQ 3.13.<\/li>\n\n\n\n<li>Compatible with Composer 2.7.x.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">2. Install and Configure Apache<\/h2>\n\n\n\n<p>You can refer to the post&nbsp;<strong><a href=\"https:\/\/www.magetop.com\/blog\/install-apache-on-ubuntu-20-04\/\" target=\"_blank\" rel=\"noreferrer noopener\">How To Install Apache On Ubuntu 20.04<\/a><\/strong>&nbsp;to be able to install Apache 2.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. Install MySQL<\/h2>\n\n\n\n<p>Install MySQL using apt command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo apt install mysql-server\n<\/pre><\/div>\n\n\n<p>When prompted, typing&nbsp;<code>Y<\/code>&nbsp;to confirm installation and then press&nbsp;<code>ENTER<\/code>.<\/p>\n\n\n\n<p>When the installation is complete, run the following command to secure your MySQL. This command will remove some insecure default settings and block access to your database system.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo mysql_secure_installation\n<\/pre><\/div>\n\n\n<p>When prompted, press&nbsp;<code>Y<\/code>&nbsp;to setup validate password.<\/p>\n\n\n\n<p>Next, select a level of password validation. Enter your root password. The server will show the password strength for the root password you just entered and the server will ask if you want to continue with that password. If you accept, press&nbsp;<code>Y<\/code>.<\/p>\n\n\n\n<p>For the rest of the questions, press&nbsp;<code>Y<\/code>&nbsp;and press&nbsp;<code>ENTER<\/code>&nbsp;key at each prompt.<\/p>\n\n\n\n<p>When finished, Test login to MySQL with root user by the command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo mysql\n<\/pre><\/div>\n\n\n<p>You should see output like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\nWelcome to the MySQL monitor.  Commands end with ; or \\g.\nYour MySQL connection id is 807\nServer version: 8.0.23-0ubuntu0.20.04.1 (Ubuntu)\n \nCopyright (c) 2000, 2021, Oracle and\/or its affiliates.\n \nOracle is a registered trademark of Oracle Corporation and\/or its\naffiliates. Other names may be trademarks of their respective\nowners.\n \nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n \nmysql&gt; \n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"526\" data-attachment-id=\"9812\" data-permalink=\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/anh-man-hinh-2025-02-11-luc-09-52-45\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-09.52.45.png?fit=1482%2C974&amp;ssl=1\" data-orig-size=\"1482,974\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"A\u0309nh ma\u0300n hi\u0300nh 2025-02-11 lu\u0301c 09.52.45\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-09.52.45.png?fit=300%2C197&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-09.52.45.png?fit=800%2C526&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-09.52.45.png?resize=800%2C526&#038;ssl=1\" alt=\"MySQL Result\" class=\"wp-image-9812\" srcset=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-09.52.45.png?resize=1024%2C673&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-09.52.45.png?resize=300%2C197&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-09.52.45.png?resize=768%2C505&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-09.52.45.png?w=1482&amp;ssl=1 1482w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>Then, exit MySQL console by command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nexit\n<\/pre><\/div>\n\n\n<p>You can install phpmyadmin to easily manage the database with this post\u00a0<strong><a href=\"https:\/\/www.magetop.com\/blog\/how-to-install-phpmyadmin-on-ubuntu\/\">How To Install PhpMyAdmin On Ubuntu<\/a><\/strong>.<\/p>\n\n\n\n<p><strong>Configure Password Access for the MySQL Root Account<\/strong><\/p>\n\n\n\n<p>Login with root user.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo mysql\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nSELECT user,authentication_string,plugin,host FROM mysql.user;\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Note: Replace \u2018<code>your_secure_password<\/code>\u2018 with your password.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_secure_password';\n<\/pre><\/div>\n\n\n<p>Verify mysql.user table with the command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nSELECT user,authentication_string,plugin,host FROM mysql.user;\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nexit\n<\/pre><\/div>\n\n\n<p><strong>Create new MySQL user for Magento 2<\/strong><\/p>\n\n\n\n<p>Login with root user.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nmysql -u root -p\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nSELECT user,authentication_string,plugin,host FROM mysql.user;\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Note: Replace \u2018<code>your_secure_password<\/code>\u2018 with your password.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nCREATE USER 'magento2'@'localhost' IDENTIFIED BY 'your_secure_password';\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nALTER USER 'magento2'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_secure_password';\n<\/pre><\/div>\n\n\n<p>Grant all privileges to&nbsp;<code>magento2<\/code>&nbsp;users.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nGRANT ALL PRIVILEGES ON *.* TO 'magento2'@'localhost' WITH GRANT OPTION;\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nSELECT user,authentication_string,plugin,host FROM mysql.user;\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nexit\n<\/pre><\/div>\n\n\n<p><strong>Create Magento 2 database<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nmysql -u magento2 -p\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nCREATE DATABASE magento2;\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nexit\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">4. Install PHP 8.3<\/h2>\n\n\n\n<p>First, install all the necessary dependencies:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo apt install curl gpg gnupg2 software-properties-common ca-certificates apt-transport-https lsb-release\n<\/pre><\/div>\n\n\n<p>Add PHP repository to your system:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo add-apt-repository ppa:ondrej\/php\n<\/pre><\/div>\n\n\n<p>Update your APT repositories.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo apt update\n<\/pre><\/div>\n\n\n<p>Install PHP 8.3 with command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo apt install php8.3\n<\/pre><\/div>\n\n\n<p>And packages:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo apt install php8.3-{exif,bz2,intl,soap,cli,pdo,mysql,zip,gd,mbstring,curl,xml,bcmath,common,xmlrpc,gmp}\n<\/pre><\/div>\n\n\n<p>Next, verify your PHP version:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nphp -v\n<\/pre><\/div>\n\n\n<p>You should see output like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nPHP 8.3.16 (cli) (built: Jan 19 2025 13:45:36) (NTS)\nCopyright (c) The PHP Group\nZend Engine v4.3.16, Copyright (c) Zend Technologies\n    with Zend OPcache v8.3.16, Copyright (c), by Zend Technologies\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"529\" data-attachment-id=\"9813\" data-permalink=\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/anh-man-hinh-2025-02-11-luc-10-17-57\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-10.17.57.png?fit=1480%2C978&amp;ssl=1\" data-orig-size=\"1480,978\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"A\u0309nh ma\u0300n hi\u0300nh 2025-02-11 lu\u0301c 10.17.57\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-10.17.57.png?fit=300%2C198&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-10.17.57.png?fit=800%2C529&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-10.17.57.png?resize=800%2C529&#038;ssl=1\" alt=\"Check version php\" class=\"wp-image-9813\" srcset=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-10.17.57.png?resize=1024%2C677&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-10.17.57.png?resize=300%2C198&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-10.17.57.png?resize=768%2C508&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-10.17.57.png?w=1480&amp;ssl=1 1480w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>Edit the \/etc\/apache2\/mods-enabled\/dir.conf file.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo nano \/etc\/apache2\/mods-enabled\/dir.conf\n<\/pre><\/div>\n\n\n<p>Modify the index.php file order to the top listed in the DirectoryIndex.<\/p>\n\n\n\n<p>The dir.conf file after modifying will look like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\n&lt;IfModule mod_dir.c&gt;\n        DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm\n&lt;\/IfModule&gt;\n \n# vim: syntax=apache ts=4 sw=4 sts=4 sr noet\n<\/pre><\/div>\n\n\n<p>Enable&nbsp;<code>mbstring<\/code>&nbsp;extension.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo phpenmod mbstring\n<\/pre><\/div>\n\n\n<p>Enable the Apache rewrite module.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo a2enmod rewrite\n<\/pre><\/div>\n\n\n<p>Reload Apache for the changes to take effect.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo systemctl reload apache2\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">5. Install Elasticsearch<\/h2>\n\n\n\n<p>Before installing Elasticsearch, we need install necessary packages.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo apt install dirmngr ca-certificates software-properties-common apt-transport-https lsb-core curl wget -y\n<\/pre><\/div>\n\n\n<p>Install Elasticsearch.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\nwget -q https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearch -O- | sudo gpg --dearmor -o \/usr\/share\/keyrings\/elasticsearch-keyring.gpg\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\necho &quot;deb &#x5B;signed-by=\/usr\/share\/keyrings\/elasticsearch-keyring.gpg] https:\/\/artifacts.elastic.co\/packages\/8.x\/apt stable main&quot; | sudo tee \/etc\/apt\/sources.list.d\/elastic-8.x.list\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo apt update\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo apt-get install elasticsearch=8.11.0\n<\/pre><\/div>\n\n\n<p><strong>Configure Elasticsearch<\/strong><\/p>\n\n\n\n<p>To configure Elasticsearch, we will edit its main configuration file <code>elasticsearch.yml<\/code><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo nano \/etc\/elasticsearch\/elasticsearch.yml\n<\/pre><\/div>\n\n\n<p>Find the line that specifies <code>network.host<\/code> and <code>http.port<\/code>, uncomment it, and replace its value like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# ---------------------------------- Network -----------------------------------\n#\n# By default Elasticsearch is only accessible on localhost. Set a different\n# address here to expose this node on the network:\n#\nnetwork.host: localhost\n#\n# By default Elasticsearch listens for HTTP traffic on the first free port it\n# finds starting at 9200. Set a specific HTTP port here:\n#\nhttp.port: 9200\n#\n# For more information, consult the network module documentation.\n#\n<\/pre><\/div>\n\n\n<p>Run the commands below to secure Elasticsearch<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo ufw allow from anywhere to any port 9200 \n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo ufw enable \n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo ufw status \n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo systemctl status elasticsearch\n<\/pre><\/div>\n\n\n<p>Start and enable Elasticsearch.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo systemctl start elasticsearch\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo systemctl enable elasticsearch\n<\/pre><\/div>\n\n\n<p>Verify Elasticsearch proxy with port 9200 by command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\ncurl -X GET 'http:\/\/localhost:9200'\n<\/pre><\/div>\n\n\n<p>If the installation is successful you will receive a response similar below:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n{\n  &quot;name&quot; : &quot;ubuntu&quot;,\n  &quot;cluster_name&quot; : &quot;elasticsearch&quot;,\n  &quot;cluster_uuid&quot; : &quot;3UwkdtxPTiaFR5z2iDdq8A&quot;,\n  &quot;version&quot; : {\n    &quot;number&quot; : &quot;8.11.0&quot;,\n    &quot;build_flavor&quot; : &quot;default&quot;,\n    &quot;build_type&quot; : &quot;deb&quot;,\n    &quot;build_hash&quot; : &quot;d9ec3fa628c7b0ba3d25692e277ba26814820b20&quot;,\n    &quot;build_date&quot; : &quot;2023-11-04T10:04:57.184859352Z&quot;,\n    &quot;build_snapshot&quot; : false,\n    &quot;lucene_version&quot; : &quot;9.8.0&quot;,\n    &quot;minimum_wire_compatibility_version&quot; : &quot;7.17.0&quot;,\n    &quot;minimum_index_compatibility_version&quot; : &quot;7.0.0&quot;\n  },\n  &quot;tagline&quot; : &quot;You Know, for Search&quot;\n}\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"527\" data-attachment-id=\"9814\" data-permalink=\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/anh-man-hinh-2025-02-11-luc-11-18-54\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-11.18.54.png?fit=1480%2C974&amp;ssl=1\" data-orig-size=\"1480,974\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"A\u0309nh ma\u0300n hi\u0300nh 2025-02-11 lu\u0301c 11.18.54\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-11.18.54.png?fit=300%2C197&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-11.18.54.png?fit=800%2C527&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-11.18.54.png?resize=800%2C527&#038;ssl=1\" alt=\"Elasticsearch Result\" class=\"wp-image-9814\" srcset=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-11.18.54.png?resize=1024%2C674&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-11.18.54.png?resize=300%2C197&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-11.18.54.png?resize=768%2C505&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-11.18.54.png?w=1480&amp;ssl=1 1480w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>If the response has the error below:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncurl: (52) Empty reply from server\n<\/pre><\/div>\n\n\n<p>Edit its main configuration file <code>elasticsearch.yml<\/code> and find the line that specifies <code>xpack.security.enabled<\/code> and replace to <code>false<\/code>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# Enable security features\nxpack.security.enabled: false\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">6. Install Composer 2<\/h2>\n\n\n\n<p>Move back to the root directory.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncd ~\n<\/pre><\/div>\n\n\n<p>Downloading and installing composer.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\ncurl -sS https:\/\/getcomposer.org\/installer -o composer-setup.php\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\nsudo php composer-setup.php --install-dir=\/usr\/bin --filename=composer\n<\/pre><\/div>\n\n\n<p>You should see output like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\nAll settings correct for using Composer\nDownloading...\n \nComposer (version 2.8.5) successfully installed to: \/usr\/bin\/composer\nUse it: php \/usr\/bin\/composer\n<\/pre><\/div>\n\n\n<p>If your installation version is greater than Magento&#8217;s requirement, use this command to downgrade the version:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n sudo composer self-update &lt;--your-version-required--&gt;\n<\/pre><\/div>\n\n\n<p>Check Composer 2 is installed in Ubuntu?<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncomposer\n<\/pre><\/div>\n\n\n<p>If installed, you should see output like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\n    ______\n  \/ ____\/___  ____ ___  ____  ____  ________  _____\n \/ \/   \/ __ \\\/ __ `__ \\\/ __ \\\/ __ \\\/ ___\/ _ \\\/ ___\/\n\/ \/___\/ \/_\/ \/ \/ \/ \/ \/ \/ \/_\/ \/ \/_\/ (__  )  __\/ \/\n\\____\/\\____\/_\/ \/_\/ \/_\/ .___\/\\____\/____\/\\___\/_\/\n                    \/_\/\nComposer version 2.7.9 2024-09-04 14:43:28\n\nUsage:\n  command &#x5B;options] &#x5B;arguments]\n\n\nUsage:\n  command &#x5B;options] &#x5B;arguments]\n \nOptions:\n  -h, --help                     Display this help message\n  -q, --quiet                    Do not output any message\n  -V, --version                  Display this application version\n      --ansi                     Force ANSI output\n      --no-ansi                  Disable ANSI output\n...\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"528\" data-attachment-id=\"9815\" data-permalink=\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/anh-man-hinh-2025-02-11-luc-12-28-04\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.28.04.png?fit=1478%2C976&amp;ssl=1\" data-orig-size=\"1478,976\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"A\u0309nh ma\u0300n hi\u0300nh 2025-02-11 lu\u0301c 12.28.04\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.28.04.png?fit=300%2C198&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.28.04.png?fit=800%2C528&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.28.04.png?resize=800%2C528&#038;ssl=1\" alt=\"Install Composer 2\" class=\"wp-image-9815\" srcset=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.28.04.png?resize=1024%2C676&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.28.04.png?resize=300%2C198&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.28.04.png?resize=768%2C507&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.28.04.png?w=1478&amp;ssl=1 1478w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">7. Download Magento 2.4.7<\/h2>\n\n\n\n<p>Go to&nbsp;<code>html<\/code>&nbsp;folder by command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncd \/var\/www\/html\n<\/pre><\/div>\n\n\n<p>Create a new Composer project using the Magento Open Source or Magento Commerce metapackage.<\/p>\n\n\n\n<p><strong>Magento Open Source<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\ncomposer create-project --repository-url=https:\/\/repo.magento.com\/ magento\/project-community-edition &lt;install-directory-name&gt;\n<\/pre><\/div>\n\n\n<p>For example:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\ncomposer create-project --repository-url=https:\/\/repo.magento.com\/ magento\/project-community-edition magento2\n<\/pre><\/div>\n\n\n<p>Download Magento 2 with the specified version.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\ncomposer create-project --repository-url=https:\/\/repo.magento.com\/ magento\/project-community-edition=&lt;magento-version&gt; &lt;install-directory-name&gt;\n<\/pre><\/div>\n\n\n<p>For example:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\ncomposer create-project --repository-url=https:\/\/repo.magento.com\/ magento\/project-community-edition=2.4.7 magento2\n<\/pre><\/div>\n\n\n<p><strong>Magento Commerce<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\ncomposer create-project --repository-url=https:\/\/repo.magento.com\/ magento\/project-enterprise-edition &lt;install-directory-name&gt;\n<\/pre><\/div>\n\n\n<p>Download Magento 2 with the specified version.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\ncomposer create-project --repository-url=https:\/\/repo.magento.com\/ magento\/project-enterprise-edition=&lt;magento-version&gt; &lt;install-directory-name&gt;\n<\/pre><\/div>\n\n\n<p><strong>Set file permissions<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncd \/var\/www\/html\/&lt;magento install directory&gt;\nfind var generated vendor pub\/static pub\/media app\/etc -type f -exec chmod g+w {} +\nfind var generated vendor pub\/static pub\/media app\/etc -type d -exec chmod g+ws {} +\nchown -R :www-data .\nchmod u+x bin\/magento\nsudo chmod -R 777 var\/ pub\/static generated\/ app\/etc pub\/media\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">8. Install Magento 2.4.7<\/h2>\n\n\n\n<p>Go to Magento 2 install directory.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncd \/var\/www\/html\/&lt;magento install directory&gt;\n<\/pre><\/div>\n\n\n<p>You must use the command line to install Magento.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\nphp bin\/magento setup:install \\\n--base-url=&lt;your-domain&gt; \\\n--db-host=localhost \\\n--db-name=magento2 \\\n--db-user=magento2 \\\n--db-password=&lt;your-db-password-of-magento2-user&gt; \\\n--admin-firstname=Admin \\\n--admin-lastname=Admin \\\n--admin-email=admin@admin.com \\\n--admin-user=admin \\\n--admin-password=&lt;your-admin-password&gt; \\\n--language=en_US \\\n--currency=USD \\\n--timezone=America\/Chicago \\\n--use-rewrites=1\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"526\" data-attachment-id=\"9816\" data-permalink=\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/anh-man-hinh-2025-02-11-luc-11-35-27\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-11.35.27.png?fit=1484%2C976&amp;ssl=1\" data-orig-size=\"1484,976\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"A\u0309nh ma\u0300n hi\u0300nh 2025-02-11 lu\u0301c 11.35.27\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-11.35.27.png?fit=300%2C197&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-11.35.27.png?fit=800%2C526&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-11.35.27.png?resize=800%2C526&#038;ssl=1\" alt=\"Run command to install magento 2.4.7\" class=\"wp-image-9816\" srcset=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-11.35.27.png?resize=1024%2C673&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-11.35.27.png?resize=300%2C197&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-11.35.27.png?resize=768%2C505&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-11.35.27.png?w=1484&amp;ssl=1 1484w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>Wait until the installation is successful.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">9. Change DocumentRoot To Pub<\/h2>\n\n\n\n<p>You can read detailed documentation from Magento&nbsp;<a href=\"https:\/\/devdocs.magento.com\/guides\/v2.4\/install-gde\/tutorials\/change-docroot-to-pub.html\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">here<\/a>.<\/p>\n\n\n\n<p>If you append a directory name to your server\u2019s hostname or IP address to create the base URL when you installed Magento (for example http:\/\/&lt;your-ip&gt;\/magento2 or http:\/\/&lt;your-sever-hostname&gt;\/magento2), you\u2019ll need to remove it.<\/p>\n\n\n\n<p><strong>Edit your virtual host file<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\nsudo nano \/etc\/apache2\/sites-available\/000-default.conf\n<\/pre><\/div>\n\n\n<p>Add the path to your Magento&nbsp;<code>pub\/<\/code>&nbsp;directory to the&nbsp;<code>DocumentRoot<\/code>&nbsp;directive:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\n&lt;VirtualHost *:80&gt;\n \n        ServerAdmin webmaster@localhost\n        DocumentRoot \/var\/www\/html\/magento2\/pub\n \n        ErrorLog ${APACHE_LOG_DIR}\/error.log\n        CustomLog ${APACHE_LOG_DIR}\/access.log combined\n \n        &lt;Directory &quot;\/var\/www\/html&quot;&gt;\n                    AllowOverride all\n        &lt;\/Directory&gt;\n&lt;\/VirtualHost&gt;\n<\/pre><\/div>\n\n\n<p>Restart Apache for the changes to take effect:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo systemctl restart apache2\n<\/pre><\/div>\n\n\n<p><strong>Update your base URL<\/strong><\/p>\n\n\n\n<p>Login with magento2 user.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nmysql -u magento2 -p\n<\/pre><\/div>\n\n\n<p>Specify the Magento database you created when you installed Magento:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nuse magento2\n<\/pre><\/div>\n\n\n<p>Update the base URL:<\/p>\n\n\n\n<p>For IP:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\nUPDATE core_config_data SET value='http:\/\/&lt;your-ip&gt;' WHERE path='web\/unsecure\/base_url';\n<\/pre><\/div>\n\n\n<p>For Server\u2019s Hostname:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\nUPDATE core_config_data SET value='http:\/\/&lt;your-server-hostname&gt;' WHERE path='web\/unsecure\/base_url';\n<\/pre><\/div>\n\n\n<p><strong>Update the env.php file<\/strong><\/p>\n\n\n\n<p>Go to env.php file.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\nsudo nano \/var\/www\/html\/magento2\/app\/etc\/env.php\n<\/pre><\/div>\n\n\n<p>The node below needs to be in the file, check it out:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; title: ; notranslate\" title=\"\">\n'directories' =&gt; &#x5B;\n    'document_root_is_pub' =&gt; true\n]\n<\/pre><\/div>\n\n\n<p><strong>Switch modes<\/strong><\/p>\n\n\n\n<p>Go to Magento 2 install directory.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncd \/var\/www\/html\/magento2\n<\/pre><\/div>\n\n\n<p>Switch to&nbsp;<code>production<\/code>&nbsp;mode.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nphp bin\/magento deploy:mode:set production\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nphp bin\/magento cache:flush\n<\/pre><\/div>\n\n\n<p>Refresh your browser and verify that the storefront displays properly.<\/p>\n\n\n\n<p>Switch to&nbsp;<code>developer<\/code>&nbsp;mode.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nphp bin\/magento deploy:mode:set developer\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nphp bin\/magento cache:flush\n<\/pre><\/div>\n\n\n<p>Refresh your browser and verify that the storefront displays properly.<\/p>\n\n\n\n<p><strong>Verify the storefront<\/strong><\/p>\n\n\n\n<p>If you see the storefront showing a 500 internal server error, please fix set permissions for the Magento 2 file according to the post:&nbsp;<strong><a href=\"https:\/\/www.magetop.com\/blog\/fix-magento-2-500-internal-server-error\/\" target=\"_blank\" rel=\"noreferrer noopener\">How To Fix Magento 2 500 Internal Server Error<\/a><\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">10. Grant Permission To Folders<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nchmod -R 777 var\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nchmod -R 777 pub\/static\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nchmod -R 777 generated\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nchmod -R 777 generated\/\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">11. See Your Results<\/h2>\n\n\n\n<p>Don\u2019t forget to run the following commands:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nphp bin\/magento s:up\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nphp bin\/magento s:s:d -f\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nphp bin\/magento c:f\n<\/pre><\/div>\n\n\n<p>If you have problems with the Admin Page: \u201cFailed to send the message. Please contact the administrator\u201d.<\/p>\n\n\n\n<p>You need to disable the Two-Factor Authorization module using the following command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nphp bin\/magento module:disable Magento_AdminAdobeImsTwoFactorAuth Magento_TwoFactorAuth\n<\/pre><\/div>\n\n\n<p>So we have successfully installed Magento 2.4.7 on Ubuntu. Here are the results:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"355\" data-attachment-id=\"6604\" data-permalink=\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/magento242-storefront\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/07\/Magento242-Storefront.png?fit=1903%2C844&amp;ssl=1\" data-orig-size=\"1903,844\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Magento242-Storefront\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/07\/Magento242-Storefront.png?fit=300%2C133&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/07\/Magento242-Storefront.png?fit=800%2C355&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/07\/Magento242-Storefront.png?resize=800%2C355&#038;ssl=1\" alt=\"Magento 2.4.7 Storefront\" class=\"wp-image-6604\" srcset=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/07\/Magento242-Storefront.png?w=1903&amp;ssl=1 1903w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/07\/Magento242-Storefront.png?resize=300%2C133&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/07\/Magento242-Storefront.png?resize=1024%2C454&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/07\/Magento242-Storefront.png?resize=768%2C341&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/07\/Magento242-Storefront.png?resize=1536%2C681&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/07\/Magento242-Storefront.png?w=1600&amp;ssl=1 1600w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"460\" data-attachment-id=\"9811\" data-permalink=\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/anh-man-hinh-2025-02-11-luc-12-50-28\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.50.28.png?fit=2740%2C1574&amp;ssl=1\" data-orig-size=\"2740,1574\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"A\u0309nh ma\u0300n hi\u0300nh 2025-02-11 lu\u0301c 12.50.28\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.50.28.png?fit=300%2C172&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.50.28.png?fit=800%2C459&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.50.28.png?resize=800%2C460&#038;ssl=1\" alt=\"Magento 2.4.7 Admin Panel\" class=\"wp-image-9811\" srcset=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.50.28.png?w=2740&amp;ssl=1 2740w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.50.28.png?resize=300%2C172&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.50.28.png?resize=1024%2C588&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.50.28.png?resize=768%2C441&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.50.28.png?resize=1536%2C882&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.50.28.png?resize=2048%2C1176&amp;ssl=1 2048w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.50.28.png?w=1600&amp;ssl=1 1600w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/Anh-man-hinh-2025-02-11-luc-12.50.28.png?w=2400&amp;ssl=1 2400w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>This is the end of the&nbsp;<strong>How To Install Magento 2.4.7 On Ubuntu<\/strong>.<\/p>\n\n\n\n<p>Follow us for the more helpful posts!<\/p>\n\n\n\n<p>We hope this is a useful post for you.<\/p>\n\n\n\n<p>Thank you for reading!<\/p>\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>Magento 2.4.7 has been released with hundreds of quality fixes and enhancements, enhancing GraphQL coverage for custom attributes and resolver caches. Please follow the post\u00a0How To Install Magento 2.4.7 On Ubuntu to install it successfully.<\/p>\n","protected":false},"author":106,"featured_media":9803,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2],"tags":[2203,2202,107,2200,2201],"class_list":["post-5476","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-magento-2-tutorials","tag-how-to-install-magento-2-4-7-on-ubuntu","tag-install-magento-2-4-7","tag-magento-2-tutorials","tag-magento-2-4-7","tag-magento-2-4-7-on-ubuntu"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Install Magento 2.4.7 On Ubuntu - Magetop Blog<\/title>\n<meta name=\"description\" content=\"Please follow the post\u00a0How To Install Magento 2.4.7 On Ubuntu\u00a0to be able to install it successfully. Magento 2.4.7 has been released\" \/>\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.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/\" \/>\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.4.7 On Ubuntu - Magetop Blog\" \/>\n<meta property=\"og:description\" content=\"Please follow the post\u00a0How To Install Magento 2.4.7 On Ubuntu\u00a0to be able to install it successfully. Magento 2.4.7 has been released\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/\" \/>\n<meta property=\"og:site_name\" content=\"Magetop Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/MagetopStore\" \/>\n<meta property=\"article:published_time\" content=\"2021-05-14T08:09:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-11T08:55:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Install-Magento-2.4.7-On-Ubuntu.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1355\" \/>\n\t<meta property=\"og:image:height\" content=\"753\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Aaron LX\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@MagetopStore\" \/>\n<meta name=\"twitter:site\" content=\"@MagetopStore\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Aaron LX\" \/>\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.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/\"},\"author\":{\"name\":\"Aaron LX\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/b8770690a02cc53a273d6b7205229ff7\"},\"headline\":\"How To Install Magento 2.4.7 On Ubuntu\",\"datePublished\":\"2021-05-14T08:09:00+00:00\",\"dateModified\":\"2025-02-11T08:55:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/\"},\"wordCount\":940,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Install-Magento-2.4.7-On-Ubuntu.png?fit=1355%2C753&ssl=1\",\"keywords\":[\"How To Install Magento 2.4.7 On Ubuntu\",\"Install Magento 2.4.7\",\"magento 2 tutorials\",\"Magento 2.4.7\",\"Magento 2.4.7 On Ubuntu\"],\"articleSection\":[\"Magento 2 Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/\",\"url\":\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/\",\"name\":\"How To Install Magento 2.4.7 On Ubuntu - Magetop Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Install-Magento-2.4.7-On-Ubuntu.png?fit=1355%2C753&ssl=1\",\"datePublished\":\"2021-05-14T08:09:00+00:00\",\"dateModified\":\"2025-02-11T08:55:27+00:00\",\"description\":\"Please follow the post\u00a0How To Install Magento 2.4.7 On Ubuntu\u00a0to be able to install it successfully. Magento 2.4.7 has been released\",\"breadcrumb\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Install-Magento-2.4.7-On-Ubuntu.png?fit=1355%2C753&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Install-Magento-2.4.7-On-Ubuntu.png?fit=1355%2C753&ssl=1\",\"width\":1355,\"height\":753,\"caption\":\"How To Install Magento 2.4.7 On Ubuntu\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.magetop.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Install Magento 2.4.7 On Ubuntu\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#website\",\"url\":\"https:\/\/www.magetop.com\/blog\/\",\"name\":\"Magetop Blog\",\"description\":\"Exploring Magento Tips, Tricks, and Trends\",\"publisher\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.magetop.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#organization\",\"name\":\"Magetop.com\",\"url\":\"https:\/\/www.magetop.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1\",\"width\":475,\"height\":475,\"caption\":\"Magetop.com\"},\"image\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/MagetopStore\",\"https:\/\/x.com\/MagetopStore\",\"https:\/\/www.linkedin.com\/company\/magetop\",\"https:\/\/www.pinterest.com\/magetop\",\"https:\/\/www.youtube.com\/channel\/UCXoiJsz88OfPmwa8QpUkwOA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/b8770690a02cc53a273d6b7205229ff7\",\"name\":\"Aaron LX\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/11\/475315059_122137709240563546_260104055231757176_n.jpg?fit=96%2C96&#038;ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/11\/475315059_122137709240563546_260104055231757176_n.jpg?fit=96%2C96&#038;ssl=1\",\"caption\":\"Aaron LX\"},\"description\":\"Aaron is a passionate writer, crazy about shopping, eCommerce and trends. Besides his outstanding research skills and a positive mind, Aaron eagerly shares his experience with the readers.\",\"url\":\"https:\/\/www.magetop.com\/blog\/author\/aaron-lx\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Install Magento 2.4.7 On Ubuntu - Magetop Blog","description":"Please follow the post\u00a0How To Install Magento 2.4.7 On Ubuntu\u00a0to be able to install it successfully. Magento 2.4.7 has been released","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.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/","og_locale":"en_US","og_type":"article","og_title":"How To Install Magento 2.4.7 On Ubuntu - Magetop Blog","og_description":"Please follow the post\u00a0How To Install Magento 2.4.7 On Ubuntu\u00a0to be able to install it successfully. Magento 2.4.7 has been released","og_url":"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/","og_site_name":"Magetop Blog","article_publisher":"https:\/\/www.facebook.com\/MagetopStore","article_published_time":"2021-05-14T08:09:00+00:00","article_modified_time":"2025-02-11T08:55:27+00:00","og_image":[{"width":1355,"height":753,"url":"https:\/\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Install-Magento-2.4.7-On-Ubuntu.png","type":"image\/png"}],"author":"Aaron LX","twitter_card":"summary_large_image","twitter_creator":"@MagetopStore","twitter_site":"@MagetopStore","twitter_misc":{"Written by":"Aaron LX","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/#article","isPartOf":{"@id":"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/"},"author":{"name":"Aaron LX","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/b8770690a02cc53a273d6b7205229ff7"},"headline":"How To Install Magento 2.4.7 On Ubuntu","datePublished":"2021-05-14T08:09:00+00:00","dateModified":"2025-02-11T08:55:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/"},"wordCount":940,"commentCount":3,"publisher":{"@id":"https:\/\/www.magetop.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Install-Magento-2.4.7-On-Ubuntu.png?fit=1355%2C753&ssl=1","keywords":["How To Install Magento 2.4.7 On Ubuntu","Install Magento 2.4.7","magento 2 tutorials","Magento 2.4.7","Magento 2.4.7 On Ubuntu"],"articleSection":["Magento 2 Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/","url":"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/","name":"How To Install Magento 2.4.7 On Ubuntu - Magetop Blog","isPartOf":{"@id":"https:\/\/www.magetop.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/#primaryimage"},"image":{"@id":"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Install-Magento-2.4.7-On-Ubuntu.png?fit=1355%2C753&ssl=1","datePublished":"2021-05-14T08:09:00+00:00","dateModified":"2025-02-11T08:55:27+00:00","description":"Please follow the post\u00a0How To Install Magento 2.4.7 On Ubuntu\u00a0to be able to install it successfully. Magento 2.4.7 has been released","breadcrumb":{"@id":"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/#primaryimage","url":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Install-Magento-2.4.7-On-Ubuntu.png?fit=1355%2C753&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Install-Magento-2.4.7-On-Ubuntu.png?fit=1355%2C753&ssl=1","width":1355,"height":753,"caption":"How To Install Magento 2.4.7 On Ubuntu"},{"@type":"BreadcrumbList","@id":"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-ubuntu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.magetop.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How To Install Magento 2.4.7 On Ubuntu"}]},{"@type":"WebSite","@id":"https:\/\/www.magetop.com\/blog\/#website","url":"https:\/\/www.magetop.com\/blog\/","name":"Magetop Blog","description":"Exploring Magento Tips, Tricks, and Trends","publisher":{"@id":"https:\/\/www.magetop.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.magetop.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.magetop.com\/blog\/#organization","name":"Magetop.com","url":"https:\/\/www.magetop.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1","width":475,"height":475,"caption":"Magetop.com"},"image":{"@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/MagetopStore","https:\/\/x.com\/MagetopStore","https:\/\/www.linkedin.com\/company\/magetop","https:\/\/www.pinterest.com\/magetop","https:\/\/www.youtube.com\/channel\/UCXoiJsz88OfPmwa8QpUkwOA"]},{"@type":"Person","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/b8770690a02cc53a273d6b7205229ff7","name":"Aaron LX","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/11\/475315059_122137709240563546_260104055231757176_n.jpg?fit=96%2C96&#038;ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/11\/475315059_122137709240563546_260104055231757176_n.jpg?fit=96%2C96&#038;ssl=1","caption":"Aaron LX"},"description":"Aaron is a passionate writer, crazy about shopping, eCommerce and trends. Besides his outstanding research skills and a positive mind, Aaron eagerly shares his experience with the readers.","url":"https:\/\/www.magetop.com\/blog\/author\/aaron-lx\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/05\/How-To-Install-Magento-2.4.7-On-Ubuntu.png?fit=1355%2C753&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/paOdw5-1qk","jetpack-related-posts":[{"id":7066,"url":"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-on-xampp\/","url_meta":{"origin":5476,"position":0},"title":"How To Install Magento 2.4.7 On XAMPP","author":"Aaron LX","date":"August 4, 2021","format":false,"excerpt":"Magento 2.4.7 came out with a lot of improvements and useful features, especially a few tweaks to improve security. This makes it difficult to install on localhost. But after a period of research, we can install it successfully, follow the posts How to install Magento 2.4.2 On XAMPP to be\u2026","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"How To Install Magento 2 On XAMPP","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/08\/How-To-Install-Magento-2-On-XAMPP.png?fit=1200%2C667&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/08\/How-To-Install-Magento-2-On-XAMPP.png?fit=1200%2C667&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/08\/How-To-Install-Magento-2-On-XAMPP.png?fit=1200%2C667&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/08\/How-To-Install-Magento-2-On-XAMPP.png?fit=1200%2C667&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/08\/How-To-Install-Magento-2-On-XAMPP.png?fit=1200%2C667&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":11551,"url":"https:\/\/www.magetop.com\/blog\/install-magento-2-4-7-laragon\/","url_meta":{"origin":5476,"position":1},"title":"How to Install Magento 2.4.7 on Laragon (Windows 11 Guide)","author":"Aaron LX","date":"March 23, 2026","format":false,"excerpt":"Setting up a local development environment for Magento 2 can often feel like a daunting task, especially on Windows. However, using Laragon makes this process significantly smoother. In this comprehensive guide, we will walk you through the exact steps to install Magento 2.4.7 on Laragon running on Windows 11. By\u2026","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"How To Install Magento 2 On XAMPP","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/How-To-Install-Magento-2-On-XAMPP.png?fit=1200%2C667&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/How-To-Install-Magento-2-On-XAMPP.png?fit=1200%2C667&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/How-To-Install-Magento-2-On-XAMPP.png?fit=1200%2C667&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/How-To-Install-Magento-2-On-XAMPP.png?fit=1200%2C667&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/How-To-Install-Magento-2-On-XAMPP.png?fit=1200%2C667&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":11204,"url":"https:\/\/www.magetop.com\/blog\/fix-magento-2-failed-to-open-stream-error\/","url_meta":{"origin":5476,"position":2},"title":"Fix Failed to Open Stream Error in PluginListGenerator.php in Magento 2","author":"Aaron LX","date":"February 1, 2026","format":false,"excerpt":"When installing or compiling Magento 2, especially on XAMPP environments, you may encounter a \u201cFailed to open stream\u201d error related to PluginListGenerator.php. This issue has been observed in multiple Magento 2 versions, including Magento 2.4.7, and commonly occurs during dependency injection compilation. The error is caused by an invalid cache\u2026","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"Fix Failed to Open Stream Error in PluginListGenerator.php in Magento 2","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/02\/Fix-Failed-to-Open-Stream-Error-in-PluginListGenerator.php-in-Magento-2.png?fit=1200%2C667&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/02\/Fix-Failed-to-Open-Stream-Error-in-PluginListGenerator.php-in-Magento-2.png?fit=1200%2C667&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/02\/Fix-Failed-to-Open-Stream-Error-in-PluginListGenerator.php-in-Magento-2.png?fit=1200%2C667&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/02\/Fix-Failed-to-Open-Stream-Error-in-PluginListGenerator.php-in-Magento-2.png?fit=1200%2C667&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/02\/Fix-Failed-to-Open-Stream-Error-in-PluginListGenerator.php-in-Magento-2.png?fit=1200%2C667&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":11590,"url":"https:\/\/www.magetop.com\/blog\/magento-polyshell-vulnerability-protection\/","url_meta":{"origin":5476,"position":3},"title":"Magento PolyShell Vulnerability: How to Protect Your Store","author":"Aaron LX","date":"March 26, 2026","format":false,"excerpt":"Security is a never-ending battle in the eCommerce world. Recently, a critical new threat discovered by Sansec has put the community on high alert. The Magento PolyShell vulnerability is currently one of the most severe attack vectors targeting Adobe Commerce and Magento Open Source platforms. If you are running a\u2026","rel":"","context":"In &quot;Magento 2 Knowledge Base&quot;","block_context":{"text":"Magento 2 Knowledge Base","link":"https:\/\/www.magetop.com\/blog\/magento-2-knowledge-base\/"},"img":{"alt_text":"Magento PolyShell Vulnerability How to Protect Your Store","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/Magento-PolyShell-Vulnerability-How-to-Protect-Your-Store-scaled.png?fit=1200%2C662&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/Magento-PolyShell-Vulnerability-How-to-Protect-Your-Store-scaled.png?fit=1200%2C662&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/Magento-PolyShell-Vulnerability-How-to-Protect-Your-Store-scaled.png?fit=1200%2C662&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/Magento-PolyShell-Vulnerability-How-to-Protect-Your-Store-scaled.png?fit=1200%2C662&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/Magento-PolyShell-Vulnerability-How-to-Protect-Your-Store-scaled.png?fit=1200%2C662&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":11593,"url":"https:\/\/www.magetop.com\/blog\/magento-2-mailpit-setup-laragon\/","url_meta":{"origin":5476,"position":4},"title":"Magento 2 Mailpit Setup: A Quick Guide for Laragon","author":"Aaron LX","date":"March 27, 2026","format":false,"excerpt":"When developing an eCommerce store locally, testing your email flow is an absolute must. Whether it is customer registration, order confirmations, or password resets, you need to ensure these system emails are working correctly.Fortunately, if you use Laragon, you do not need to configure a real SMTP server like Gmail\u2026","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"Magento 2 Mailpit Setup A Quick Guide for Laragon","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/Magento-2-Mailpit-Setup-A-Quick-Guide-for-Laragon-Final-scaled.png?fit=1200%2C662&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/Magento-2-Mailpit-Setup-A-Quick-Guide-for-Laragon-Final-scaled.png?fit=1200%2C662&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/Magento-2-Mailpit-Setup-A-Quick-Guide-for-Laragon-Final-scaled.png?fit=1200%2C662&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/Magento-2-Mailpit-Setup-A-Quick-Guide-for-Laragon-Final-scaled.png?fit=1200%2C662&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2026\/03\/Magento-2-Mailpit-Setup-A-Quick-Guide-for-Laragon-Final-scaled.png?fit=1200%2C662&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":10777,"url":"https:\/\/www.magetop.com\/blog\/how-to-install-new-relic-apm-on-ubuntu\/","url_meta":{"origin":5476,"position":5},"title":"How To Install New Relic APM On Ubuntu","author":"Aaron LX","date":"October 16, 2025","format":false,"excerpt":"New Relic APM on Ubuntu helps Magento 2 developers and store owners monitor performance, track slow transactions, and optimize PHP applications in real time. In this guide, you\u2019ll learn how to install New Relic APM on Ubuntu using the official package repository for a clean and reliable setup. Steps To\u2026","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"How To Install New Relic APM On Ubuntu","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/10\/How-To-Install-New-Relic-APM-On-Ubuntu.png?fit=1200%2C667&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/10\/How-To-Install-New-Relic-APM-On-Ubuntu.png?fit=1200%2C667&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/10\/How-To-Install-New-Relic-APM-On-Ubuntu.png?fit=1200%2C667&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/10\/How-To-Install-New-Relic-APM-On-Ubuntu.png?fit=1200%2C667&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/10\/How-To-Install-New-Relic-APM-On-Ubuntu.png?fit=1200%2C667&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts\/5476","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/users\/106"}],"replies":[{"embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/comments?post=5476"}],"version-history":[{"count":14,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts\/5476\/revisions"}],"predecessor-version":[{"id":9829,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts\/5476\/revisions\/9829"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/media\/9803"}],"wp:attachment":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/media?parent=5476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/categories?post=5476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/tags?post=5476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}