Last active
November 25, 2019 02:19
-
-
Save iamdylanngo/7113fcbfded57b783ba5c6bc6c4fd3c1 to your computer and use it in GitHub Desktop.
Install magento 2 with command line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install magento 2 with command line | |
| php bin/magento setup:install \ | |
| --backend-frontname=admin \ | |
| --db-host=localhost \ | |
| --db-name=magento \ | |
| --db-user=magento \ | |
| --db-password=magento \ | |
| --base-url=http://magento2.docker/ \ | |
| --admin-firstname=Admin \ | |
| --admin-lastname=Admin \ | |
| --admin-email=admin@gmail.com \ | |
| --admin-user=admin \ | |
| --admin-password=admin@123 \ | |
| --language=en_US \ | |
| --currency=USD \ | |
| --timezone=America/New_York \ | |
| --use-rewrites=1 | |
| # Update URL | |
| php bin/magento setup:store-config:set --base-url="http://www.domain2.net/" | |
| php bin/magento setup:store-config:set --base-url-secure="https://www.domain2.net/" | |
| UPDATE core_config_data | |
| SET value = 'http://stg.magento.local/' | |
| WHERE path IN ('web/secure/base_url', 'web/unsecure/base_url'); | |
| UPDATE core_config_data | |
| SET value = REPLACE(value, 'http://www.domain1.net/', 'http://www.domain2.net/') | |
| WHERE path = 'design/head/includes'; | |
| # Create volume | |
| sudo docker volume create -d local-persist -o mountpoint=$projectdir --name=$volume | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment