Enable and apply a default 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.

edX provides some default themes that you can find in the installdir/apps/edx/edx-platform/themes/ directory. To enable and apply a default theme for edX, follow the steps in the sequence shown:

Enable a default theme

  • To enable a default theme for LMS, open the installdir/apps/edx/conf/lms.env.json file and edit the “COMPREHENSIVE_THEME_DIRS” and the “ENABLE_COMPREHENSIVE_THEMING” variables to make them look like this:

  • To enable a default theme for CMS, open the installdir/apps/edx/conf/cms.env.json file and perform the same changes described above.

Apply a default theme

  • Access the Django administration console. Check the Django Admin Console instructions for more information.
  • Browse to “Theming -> Site themes -> Add site theme”.
  • From the “Site menu”, select the site you want to apply a theme to.
  • Enter the identifier of the theme (same as its directory name) and click on “Save”. In the example below, the selected default theme is “red-theme”.

    Add site and theme

    The theme will be enabled for the specified site as it is shown below:

    Theme enabled

Build assets for a custom theme

  • If you enabled the custom theme for LMS, update LMS assets:

    $ sudo installdir/apps/edx/bin/edxapp-update-assets-lms
  • If you enabled the custom theme for CMS, update CMS assets:

    $ sudo installdir/apps/edx/bin/edxapp-update-assets-cms
  • Restart the Apache server:

    $ sudo installdir/ restart apache
Last modification April 8, 2020