Skip to content

Instantly share code, notes, and snippets.

@daniloaldm
Forked from hewersonfreitas/rebuild-magento-2-1.sh
Created January 21, 2020 21:21
Show Gist options
  • Save daniloaldm/c757058115f9f9567c2ceef6072806d0 to your computer and use it in GitHub Desktop.
Save daniloaldm/c757058115f9f9567c2ceef6072806d0 to your computer and use it in GitHub Desktop.
rebuild magento <=2.1
sudo chown -R www-data:www-data /var/www/html/{loja} &&
sudo rm -rf /var/www/html/{loja}/var/* &&
sudo rm -rf /var/www/html/{loja}/pub/static/* &&
sudo chmod -R 777 /var/www/html/{loja}/pub/static &&
php /var/www/html/{loja}/bin/magento setup:upgrade &&
php /var/www/html/{loja}/bin/magento setup:di:compile &&
php /var/www/html/{loja}/bin/magento setup:static-content:deploy pt_BR &&
chmod -R 777 /var/www/html/{loja}/var &&
chmod -R 777 /var/www/html/{loja}/pub &&
sudo chown -R www-data:www-data /var/www/html/{loja} &&
service varnish restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment