Skip to content

Latest commit

 

History

History
110 lines (73 loc) · 3.13 KB

m24.md

File metadata and controls

110 lines (73 loc) · 3.13 KB

Install Magento 2.4

1.0 : Prerequisites need installed

1.1a Check Magento 2

    php bin/magento --version
    
    # url
    https://www.magereport.com/scan
    url/sowagar

1.1b Upgrade to latest Magento 2

    # composer require <product> <version> --no-update        
    composer require magento/product-community-edition 2.4.3 --no-update        
    # Or
    bin/magento maintenance:enable
    composer require magento/product-community-edition --no-update
    composer update        
    php bin/magento setup:upgrade
    php bin/magento setup:static-content:deploy -f
    php bin/magento maintenance:disable
    php bin/magento --version

1.2 Install php7x & Elasticsearch

  • First install PHP7x

  • First install Elasticsearch

  • Check Elasticsearch Status

      sudo service elasticsearch status
    
  • Removing ElasticSearch from @Magento 2.4" Yireo_RemoveSearch

      php bin/magento module:disable Magento_AdvancedSearch Magento_CatalogSearch Magento_Elasticsearch Magento_Elasticsearch Magento_Elasticsearch-6  Magento_Elasticsearch-7 Magento_InventoryCatalogCearch   Magento_Inventory-Elasticsearch Magento_Search  Elasticsearch_Elasticsearch
    

1.3 Install Magento CLI

    composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.4 magento24
    cd magento24
    find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
    find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
    chown -R :www-data .
    chmod u+x bin/magento

You must use the command line to install Magento.

This example assumes that the Magento install directory is named magento2ee, the db-host is on the same machine (localhost), and that the db-name, db-user, and db-password are all magento:

php bin/magento setup:install \
--base-url=http://www.magento24.lan \
--db-host=localhost \
--db-name=mag24db \
--db-user=matin \
--db-password=matin@123 \
--admin-firstname=Matin \
--admin-lastname=Admin \
--admin-email=admin@admin.com \
--admin-user=admin \
--admin-password=admin@123 \
--language=en_US \
--currency=USD \
--timezone=America/Chicago \
--use-rewrites=1

BDT::

php bin/magento setup:install \
--base-url=http://www.magento24.lan \
--db-host=localhost \
--db-name=mag24db \
--db-user=matin \
--db-password=matin@123 \
--admin-firstname=Matin \
--admin-lastname=Admin \
--admin-email=admin@admin.com \
--admin-user=admin \
--admin-password=admin@123 \
--language=en_US \
--currency=BDT \
--timezone=Asia/Dhaka \
--use-rewrites=1

admin issue

   php  bin/magento mo:di Magento_TwoFactorAuth

# Ref

- [Magento.com v2.4](https://devdocs.magento.com/guides/v2.4/install-gde/composer.html)