๐Ÿ”Auto-DetectWPWordPressSHShopifyDRDrupalJOJoomlaMOMoodlePSPrestaShopHSHubSpotOCOpenCartGHGhost
tutorials

How to Find Which Moodle Theme a Site Is Using

Moodle names its active theme in two places on every page. Here is where to look, why the answer can change per course, and how to check as an admin.

TW
The Websites Detector Team
Published Nov 25, 20263 min read
๐Ÿ“–

Moodle is one of the most transparent platforms there is when it comes to themes. Every page names its active theme twice, in places that survive caching and minification. The only real complication is that Moodle lets the theme change from one part of a site to another โ€” so "which theme does this site use?" sometimes has more than one right answer.

Method 1: M.cfg

Moodle sets up a JavaScript configuration object called M.cfg near the top of every page. Open the source and search for M.cfg:

M.cfg = {"wwwroot":"https:\/\/sandbox.moodledemo.net", โ€ฆ ,"theme":"boost", โ€ฆ};

The theme value is the theme Moodle used to render that page. We checked this on Moodle's own public sandbox, which runs boost.

Method 2: the stylesheet URL

Moodle does not serve theme CSS from a static file. It builds one stylesheet per theme and serves it through a PHP script, with the theme name in the path:

<link rel="stylesheet" href="https://sandbox.moodledemo.net/theme/styles.php/boost/1795634042_1794458180/all">

The segment after styles.php/ is the theme. The numbers after it are cache revision stamps โ€” they change whenever an admin purges caches, which is a handy way to tell roughly when the site was last updated.

If the two methods disagree, trust M.cfg. It reflects the page you are on; a stylesheet can occasionally be left over from a previous configuration in a cached page.

The themes you will see most

ThemeWhat it is
boostDefault since Moodle 3.2; Bootstrap-based, the most common by far
classicMoodle's block-based layout, kept for sites that prefer the older design
moove, academi, edwiser, adaptable, snapPopular third-party themes

Many third-party themes are built as children of Boost. If a theme's source code or plugin page mentions "Boost child theme", it inherits Boost's layout and adds its own styling and settings on top.

Why the answer can change per page

Moodle can assign themes at several levels, and the most specific one wins:

  1. Site default โ€” set by the administrator.
  2. Category theme โ€” a whole course category can use a different theme.
  3. Course theme โ€” an individual course can override its category.
  4. User theme โ€” if allowed, a logged-in user can pick their own.
  5. Session/URL theme โ€” used for previews and some mobile setups.

Levels 2 to 4 only work if the administrator has enabled them (the allowcategorythemes, allowcoursethemes and allowuserthemes settings). Most sites leave them off. But if you see one theme on the front page and another inside a course, that is why โ€” and both answers are correct.

As a visitor you can only see the theme for the pages you can reach, usually the front page and login page. Those almost always show the site default.

Branding versus theme

A lot of Moodle sites look very different from stock Boost without changing theme at all. Boost's settings let administrators set a brand colour, a logo, a login background image and raw SCSS. So a site whose M.cfg says boost can still look entirely custom. If you are trying to reproduce a look, start with the Boost settings before shopping for a new theme.

As an administrator

Go to Site administration โ†’ Appearance โ†’ Themes. The current site theme is marked, and from there you can see category and course overrides if they are enabled.

From the command line, Moodle's CLI can read the setting directly:

php admin/cli/cfg.php --name=theme

Or in the database:

SELECT value FROM mdl_config WHERE name = 'theme';

Replace mdl_ with your table prefix if it differs.

The quick way

Paste the site URL into the Moodle theme detector, which reads M.cfg directly. For other platforms, our guide to identifying any CMS from its source code covers the equivalent markers.