Skip to content

Instantly share code, notes, and snippets.

@zeloc
Created August 16, 2018 08:21
Show Gist options
  • Save zeloc/e3a99fec856ebabc3c4dad1690fe5b7f to your computer and use it in GitHub Desktop.
Save zeloc/e3a99fec856ebabc3c4dad1690fe5b7f to your computer and use it in GitHub Desktop.
clean caches and setup
#!/usr/bin/env bash
cd /var/www/vhosts/partyshowroom/production/htdocs/
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 di compile'
php /var/www/vhosts/partyshowroom/production/htdocs/bin/magento setup:di:compile
echo 'Running static content deploy'
php /var/www/vhosts/partyshowroom/production/htdocs/bin/magento setup:static-content:deploy en_US en_GB
echo 'Initialise complete'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment