#How to start magento
- Docker
- curl
- unzip
-
Install magento with the automated onelinesetup script. Example of how to do it: https://courses.m.academy/courses/set-up-magento-2-development-environment-docker/lectures/8974570
-
To setup proper state of the magento app:
a. Download backup from https://drive.google.com/file/d/17H_i-BLjry-ZSSthbG65K-6DoqaWS9wU/view?usp=sharing
b. Prepare backup:
sudo apt-get install unzip unzip backup.zip current_folder=$(basename "$PWD") container_name="${current_folder}-app-1" docker cp ./backup $container_name:var/www/html/var/backups
c. Run command to rollback backup
bin/magento setup:rollback -c 1687872010_filesystem_code.tgz -m 1687872010_filesystem_media.tgz -d 1687872010_db.sql bin/magento setup:upgrade
c. Check
magento.test
andmagento.test/admin (with mynewuser1, mynewpassword1)
https://github.com/markshust/docker-magento
- To create user for https://magento.test/admin (you will also have to complete step below):
bin/magento admin:user:create \
--admin-user="mynewuser1" \
--admin-password="mynewpassword1" \
--admin-email="john@doe.com" \
--admin-firstname="MyName" \
--admin-lastname="MyLastName"
- To disable TFA:
bin/magento module:disable {Magento_AdminAdobeImsTwoFactorAuth,Magento_TwoFactorAuth}
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento indexer:reindex
bin/magento cache:flush
-
Links about how to move magento 2 to another PC https://stackoverflow.com/questions/16538560/how-to-bring-live-magento-site-to-localhost-without-effecting-live-site
-
To enable db backup
bin/magento config:set system/backup/functionality_enabled 1
- To backup magento 2
bin/magento setup:backup --code --media --db