Install a theme
In order to install a custom theme for Magento you need to follow these steps:
IMPORTANT: Please note that the steps described below can be different per theme. Usually the steps are defined in the theme’s readme file.
Unzip and copy the content
Unzip the ZIP file in the home folder. Replace the THEME placeholder with the actual filename.
The unzipped theme folder should have the following folder structure:
|-THEME/ |-app |-pub
Copy the content of the “THEME/app” subfolder in the “installdir/apps/htdocs/app/” folder
sudo cp -r ~/THEME/app/* installdir/apps/htdocs/app/
Copy the content of the “THEME/pub” subfolder in the “installdir/apps/htdocs/pub/” folder:
sudo cp -r ~/THEME/pub/* installdir/apps/htdocs/pub/
Redeploy static files
Run the following commands to upgrade, deploy the static files and clean the cache:
sudo installdir/apps/htdocs/bin/magento-cli setup:upgrade sudo installdir/apps/htdocs/bin/magento-cli setup:static-content:deploy -f sudo installdir/apps/htdocs/bin/magento-cli cache:clean
Change the owner and group of the files in “installdir/apps/htdocs/” to “daemon” and restart Apache:
sudo chown -R daemon:daemon installdir/apps/htdocs/ sudo installdir/ctlscript.sh restart apache
Enable the theme
Log into the Magento admin panel and go to “Content” > “Design” > “Configuration”.
Click on “Edit” in the “Default Store View”.
Select your theme in the “Applied Theme” dropdown menu and click the “Save configuration” button.
In the Magento Web Admin panel go to “System” -> “Cache Management” and click on “Flush Magento Cache”
Watch the following video to learn how to install a Magento theme: