Installing a Magento 2 theme on aMiSTACX

This article is not meant to replace the theme author’s instructions; however, it is a handy supplement when things go wrong.

We use these same steps when working with our customers, and 99.9% of the time this process works without issue.

First, it is important to note that we are doing a manual theme install from the command line [CLI] using an SSH client, Putty, as per our stack instructions.

Second, these instructions assume you have already SFTP’d the theme to the proper directory path on Magento as per the author’s instructions.

Next we follow the set of commands:

cd /var/www/magento

Note: New stacks have a script called amistacx.sh. Make it “x” executable, and run it via sudo ./amistacx.sh to save time.

sudo php bin/magento maintenance:enable
sudo php bin/magento cache:flush
sudo php bin/magento cache:disable
sudo chown -R www-data:www-data /var/www/magento

sudo php bin/magento setup:upgrade
sudo chown -R www-data:www-data /var/www/magento
[optional] sudo chmod -R u+rwX,go+rX,go-w /var/www/magento #Sets back to baseline
sudo php bin/magento setup:di:compile
sudo chown -R www-data:www-data /var/www/magento

[Not required in Developer Mode] sudo php bin/magento setup:static-content:deploy
sudo chown -R www-data:www-data /var/www/magento
sudo php bin/magento cache:enable
sudo php bin/magento maintenance:disable

After this is completed, you can log into the Magento admin console and select your newly installed theme.

Tip! Make sure you are installing a theme for the correct version of Magento!

Next >> Magento 2. Module Installs