Menu Close
    Searching for an experienced Magento 2 Development Company ?

    Installing Magento 2.4

    Hi, Magento 2.4 has been launched on 28th July 2020. You can read the release notes from here. While installing Magento 2.4 I faced some issues here I am going to explain that. Most people install Magento using the web UI, but now in Magento 2.4, you can only install it via CLI. You can check its server requirements from here. Magento 2.4 is recommended to install on PHP 7.4 even it can be installed on 7.3 but it is not recommended, also apache 2.4 which is the same as the old version, and now you have to upgrade your MySQL version to the latest MySQL 8.

    Note:

    But even after upgrading above and all the PHP required extensions, you need to configure and install elastic search 7.6.x on your system, or any other server to install Magento 2.4 because elastic search is now the default search engine for Magento frontend, so now you cannot install Magento without the elastic search.

    Lets see step by step how to install Magento 2.4 from CLI:

    # first check if elastic server is installed 
    # using curl elastic-server-ip:port
    # for example
    curl localhost:9200
    # will output server info if started otherwise start the server
    
    # now download Magento2.4 using composer
    mkdir DIRECTORY_WHERE_YOU_WANT_TO_INSTALL
    cd DIRECTORY_WHERE_YOU_WANT_TO_INSTALL
    composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition:2.4.0 .
    # after downloading Magento now use below command to install it 
    php bin/magento setup:install --base-url=http://your-host/m2.4/ \
    --db-host=db-host --db-name=db-name --db-user=db-user --db-password=db-password \
    --admin-firstname=Magento --admin-lastname=User [email protected] \
    --admin-user=admin --admin-password=admin123 --language=en_US \
    --currency=USD --timezone=America/Chicago --use-rewrites=1 \
    --search-engine=elasticsearch7 --elasticsearch-host=elastic-host \
    --elasticsearch-port=elastic-port --backend-frontname=admin
    # now your magento is ready for development

    Another thing to note Magento 2.4 is not installable on Windows or Mac, it is now only supported in Linux distributions such as CentOS, Ubuntu, Debian and similar.

    Another issue that you will face, after installation is done, you will not be able to login Magento admin panel because in Magento2.4 two-factor authentication is installed and it will not let you log in until you provide the correct email and configure SMTP so that Magento can send an email, in that case, the only solution I found is to disable the two-factor authentication module:

    php bin/magento module:disable Magento_TwoFactorAuth

    . . .
    Discuss on Helpdesk

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    3 comments

  • Noury Micron
    Hello Ashutosh Srivastava

    We are in the process of planning for an eCommerce project with Magento 2.4 “magento community edition open source” for building up the e-commerce project.

    But we are really confused with:
    1- which Web server to proceed Nginx or Apache?
    2-which SQL Server to proceed MariaDB or MySQL?

    Thanks and Best regards,
    Noury

    • ashutosh srivastava (Moderator)
      Hi,
      I will suggest nginx with PHP-FPM and for database MariaDB as it has larger connection pool.
      Thanks
      • ashutosh srivastava (Moderator)
        Mariadb is not fully supported in community edition it only uses mysql specific features and not all the mysql features are supported in mariaDB, so its better to use mysql in community edition magento.
  • Back to Top