Skip to content

Instantly share code, notes, and snippets.

@Stepa4man
Last active September 25, 2018 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Stepa4man/73271e06e34af7fcfc622d1955e1ca53 to your computer and use it in GitHub Desktop.
Save Stepa4man/73271e06e34af7fcfc622d1955e1ca53 to your computer and use it in GitHub Desktop.
Reinstall project
#!/bin/sh
echo Please provide url name:
read name
echo Please provide db name:
read dbname
rm -f ./app/etc/config.php ./app/etc/env.php ./pub/static/deployed_version.txt;
rm -rf ./generated/code/ ./generated/metadata/ ./var/page_cache \
./pub/static/frontend/ ./pub/static/adminhtml/ ./var/cache ./var/view_preprocessed/;
php bin/magento setup:install \
--base-url=http://$name.loc/ \
--base-url-secure=https://$name.loc/ \
--db-host=127.0.0.1 \
--db-user=root \
--db-name=$dbname \
--admin-firstname=Test \
--admin-lastname=Dev \
--admin-email=devops.magento@gmail.com \
--admin-user=admin \
--admin-password=admin123 \
--backend-frontname=admin \
--language=de_DE \
--currency=EUR \
--timezone=Europe/Berlin \
--session-save=db \
--use-secure-admin=0 \
--use-secure=0 \
--cleanup-database \
--use-rewrites=1 &&
php bin/magento config:set 'admin/startup/menu_item_id' 'Magento_Config::system_config';
php bin/magento config:set 'admin/security/session_lifetime' 31536000;
php bin/magento deploy:mode:set developer;
php bin/magento ind:reind;
php bin/magento cache:disable &&
php bin/magento cache:enable config;
php bin/magento cache:clean;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment