Created
August 16, 2018 08:19
-
-
Save zeloc/b7b9a97555cccaa97deda9c66f18f14d to your computer and use it in GitHub Desktop.
magento 2 initalisation
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
#!/usr/bin/env bash | |
cd /var/www/vhosts/partyshowroom/production/htdocs/ | |
echo 'Turning off static signing' | |
mysql -uroot -proot -Dparty_local<<<"UPDATE party_local.core_config_data SET value=0 WHERE path='dev/static/sign'" | |
composer install | |
echo 'Clearing magento cache...' | |
rm -rf /var/www/vhosts/partyshowroom/production/htdocs/var/cache/* | |
echo 'Clearing page cache...' | |
rm -rf /var/www/vhosts/partyshowroom/production/htdocs/var/page_cache/* | |
echo 'Setting developer mode' | |
php /var/www/vhosts/partyshowroom/production/htdocs/bin/magento deploy:mode:set developer | |
echo 'Restarting Varnish service' | |
sudo /etc/init.d/varnish restart | |
echo 'Clear generation files...' | |
rm -rf /var/www/vhosts/partyshowroom/production/htdocs/var/generation/* | |
echo 'Clear view preprocessed...' | |
rm -rf /var/www/vhosts/partyshowroom/production/htdocs/var/view_preprocessed/* | |
echo 'Clear Static files...' | |
rm -rf /var/www/vhosts/partyshowroom/production/htdocs/pub/static/* | |
echo 'Upgrading modules...' | |
php /var/www/vhosts/partyshowroom/production/htdocs/bin/magento setup:upgrade | |
echo 'Running static content deploy' | |
php /var/www/vhosts/partyshowroom/production/htdocs/bin/magento setup:static-content:deploy en_GB | |
echo 'Running di compile' | |
php /var/www/vhosts/partyshowroom/production/htdocs/bin/magento setup:di:compile | |
echo 'setting user' | |
php /var/www/vhosts/partyshowroom/production/htdocs/bin/magento admin:user:create --admin-user="admin" --admin-password="test123456" --admin-email="[email protected]" --admin-firstname="test" --admin-lastname="user" | |
echo 'Initialise complete' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment