Last active
June 13, 2017 19:33
-
-
Save okovalov/9d408e20463d0690b67e88ddaa1915de to your computer and use it in GitHub Desktop.
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
echo "Setting permissions 777 to ./var" | |
sudo find ./var/ -type d -exec chmod -R 777 {} \; | |
php bin/magento cache:clean; | |
php bin/magento setup:upgrade; | |
php bin/magento setup:di:compile; | |
php bin/magento indexer:reindex; | |
echo "Setting permissions 777 to ./pub" | |
sudo find ./pub/ -type d -exec chmod -R 777 {} \; | |
#echo "Setting permissions 755 to ./.htaccess" | |
#sudo find ./.htaccess -type f -exec chmod -R 755 {} \; | |
echo "Setting permissions 777 to ./var" | |
sudo find ./var/ -type d -exec chmod -R 777 {} \; | |
------------------------------- | |
Well, I never clear these things, magento's cache:flush should take care of necessary flushes. | |
---- | |
rm -Rf var/di/* | |
rm -Rf var/cache/* | |
rm -Rf var/session/* | |
rm -Rf pub/static/* | |
rm -Rf pub/generation/* | |
rm -Rf var/view_preprocessed/* | |
---- | |
Seems this clears more than necessary and was failing with error "Unable to retrieve deployment version of static files from the file system.". | |
--- | |
sudo -u apache php bin/magento cache:clean; | |
sudo -u apache php bin/magento setup:upgrade; | |
sudo -u apache php bin/magento setup:di:compile; | |
sudo -u apache php bin/magento indexer:reindex; | |
sudo -u apache php bin/magento setup:static-content:deploy | |
sudo -u apache php bin/magento setup:static-content:deploy en_CA | |
sudo -u apache php bin/magento setup:static-content:deploy fr_CA | |
sudo -u apache php bin/magento dev:source-theme:deploy | |
sudo -u apache php bin/magento dev:source-theme:deploy --locale="en_CA" | |
sudo -u apache php bin/magento dev:source-theme:deploy --locale="fr_CA" | |
--- | |
It takes a few minutes to run. | |
P.S. | |
setup:static-content:deploy Deploys static view files | |
dev:source-theme:deploy Collects and publishes source files for theme. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment