Magento Simple CMD

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

=====================magento install =============== :-

composer create-project --repository-url=https://repo.magento.com/ magento/project-


enterprise-edition=2.4.6 M246

1)
-----------------------------------------------------------------------------------
-------------------
composer create-project --repository-url=https://repo.magento.com/ magento/project-
community-edition Project_2 2.4.6
-----------------------------------------------------------------------------------
--------------------

mysql -u root -p
password : root

create database Magento_246_new;

3)
-----------------------------------------------------------------------------------
-----------------
sudo php bin/magento setup:install --base-url=http://127.0.0.1/php81/Project_2/pub/
--db-host=localhost --db-name=Project_2 --db-user=root --db-password=root@123 --
admin-firstname=admin --admin-lastname=admin --admin-email=admin@gmail.com --admin-
user=admin --admin-password=admin123 --language=en_US --currency=USD --
timezone=America/Chicago --use-rewrites=1 --search-engine=elasticsearch7 --
elasticsearch-host=localhost --elasticsearch-port=9200

-----------------------------------------------------------------------------------
-------------------------
sudo chmod -R 777 app/ generated/ var/ pub/
bin/magento sampledata:deploy

Public Key: 7c018006799466c681ad507e27904677


Private Key: 289077c86e811661a8f7751828485d3a
----------------------------------------
sudo chmod -R 777 *
-----------------
=>generate admin authentication error

bin/magento module:disable Magento_TwoFactorAuth


app/etc/config.ph
'Magento_TwoFactorAuth' => 0,
------------------------------------------------
app/etc/config.php
admin link to get from env.php file app/etc/env
'backend' => [
'frontName' => 'admin_lmnv9m'
"admin_lmnv9m"this name is use for admin url of the site
------------------------------------------------

sudo php bin/magento setup:upgrade


sudo php bin/magento setup:di:compile
sudo php bin/magento setup:static-content:deploy -f
sudo php bin/magento indexer:reindex
sudo php bin/magento cache:flush
sudo chmod -R 777 app/ generated/ var/ pub/

--------------------------------------------------------

php bin/magento s:up


php bin/magento s:d:c
php bin/magento s:s:d -f
php bin/magento i:rei
php bin/magento c:f
chmod -R 777 app/ generated/ var/ pub/

bin/magento deploy:mode:set developer

--------------------------
php bin/magento cron:run

-----------------
bin/magento deploy:mode:set developer
--------------------------------------------------------------------
$writer = new \Zend_Log_Writer_Stream(BP . '/var/log/custom.log');
$logger = new \Zend_Log();
$logger->addWriter($writer);

$logger->info('----------------- get FGSDFGSDSDFSDFS


--------------- ');
$logger->info(print_r($abc->toHtml(),true));

--------------------------------------------------------
sudo service elasticesearch start
to display product

You might also like