Install a theme

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and MacOS) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). On OS X VMs, the installation directory is /opt/bitnami and OS X VM users can click the “Open Terminal” button to run commands. Learn more about the Bitnami stack environment and about OS X VMs.

NOTE: The Approach A sections referred to below do not apply to Bitnami native installers. Users of Bitnami native installers should refer only to the Approach B sections.

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.

      $ unzip
  • The unzipped theme folder should have the following folder structure:

  • Copy the content of the THEME/app subfolder in the Magento app folder, and the contents of the THEME/pub subfolder in the Magento pub folder:

    • Approach A (Bitnami installations using system packages):

        sudo cp -r ~/THEME/app/* installdir/magento/app/
        sudo cp -r ~/THEME/pub/* installdir/magento/pub/
    • Approach B (Self-contained Bitnami installations):

        sudo cp -r ~/THEME/app/* installdir/apps/magento/htdocs/app/
        sudo cp -r ~/THEME/pub/* installdir/apps/magento/htdocs/pub/

Redeploy static files

  • Run the following commands to upgrade, deploy the static files and clean the cache:

      $ sudo magento-cli setup:upgrade
      $ sudo magento-cli setup:static-content:deploy -f
      $ sudo magento-cli cache:clean
  • Change the owner and group of the newly added files to daemon:

    • Approach A (Bitnami installations using system packages):

        $ sudo chown -R daemon:daemon installdir/magento/
    • Approach B (Self-contained Bitnami installations):

        $ sudo chown -R daemon:daemon installdir/apps/magento/htdocs/

Enable the theme

  • Log into the Magento admin panel and go to “Content” > “Design” > “Configuration”.

  • Click on “Edit” in the “Default Store View”.

    Magento Go to theme edit page

  • Select your theme in the “Applied Theme” dropdown menu and click the “Save configuration” button.

    Select theme and save configuration

  • In the Magento Web Admin panel go to “System” -> “Cache Management” and click on “Flush Magento Cache”

    Flush Magento Cache

  • Watch the following video to learn how to install a Magento theme:

Last modification October 8, 2021