Moodle theme development: why a brand theme is harder than a logo swap
A brand theme for Moodle is a set of changes to how the platform is built and styled, not a logo and a colour swap. You can make Moodle look like your institution or company by creating a child theme that inherits from a core theme, overrides the templates and SCSS you need, and leaves the rest of core alone. That approach keeps the work contained, but only if the team treats the child theme as a maintained codebase that must survive every upgrade. The rest of this section explains why the work touches more layers than it first appears to.
Theme work reaches several layers at once. Branding lives in SCSS and configuration, but layout depends on Mustache templates and the renderers behind them, navigation and course pages expose markup that other features depend on, and accessibility checks apply to every colour, focus state and menu you change. A change to the primary colour can break contrast on a button, and a template override can silently drop a landmark or a label that screen reader users rely on. Each override is a point where a later core release can conflict with your work, so the list of overridden files should be recorded and reviewed at every upgrade.
The 5.x releases make this harder. From Moodle 5.1, the web server document root must point to the /public directory, so theme assets and paths that worked under the old layout need to be checked against the new one. Moodle 5.3 removes the Classic theme from core, so a site that used Classic as its base or fallback must choose a new parent theme and re-test its styling. Navigation has also been moving toward React, which changes how menu customization is done compared with older Mustache-only templates. Before you estimate effort, confirm with your target Moodle version which templates and navigation elements still render through Mustache and which are React components, and check the parent theme you plan to inherit from.
Which theme parts you will build, override and maintain
A Moodle theme is several parts that load together, and each one fails in its own way when customized. Decide early which parts you inherit from the parent theme and which you replace, because copied files stop receiving upstream fixes. Confirm the parent theme and the template set available in your specific Moodle release before you start.
Theme configuration and parent theme
The theme's version.php and config.php declare its name, its component and the parent theme it inherits from. A child theme overrides only what it changes and receives upstream layout and bug fixes for everything else. The common failure is copying a whole parent theme into a new folder, which freezes its code at the copy date and turns every core upgrade into a manual merge. Confirm which parent themes ship in your release, and whether the Classic theme is still available to you, since Moodle 5.3 removes it from core.
Mustache templates and renderers
Mustache templates in the theme's templates folder control the HTML for blocks, activity pages and many core components, and a renderer class can change the output logic behind them. Override a single template by placing a file with the same component and name in your theme, not by editing core. Breakage usually appears after an upgrade, when a copied template no longer receives new data fields or accessibility markup that core added. Keep a list of every overridden template so you can diff it on each release.
SCSS and style settings
Brand colors, fonts, spacing and layout live in SCSS and in the theme's admin settings, which feed variables into the compiled stylesheet. Set brand values through settings and variables first, and write custom rules in a small, separate SCSS file. Common breakage includes selectors tied to generated class names, hard-coded colors that ignore the contrast settings, and changes that never get recompiled after a cache purge. Check contrast ratios on every page type, not only the login and dashboard pages.
Language strings and icons
Language strings let you change labels and wording without touching templates, using the theme's language pack and the site's string overrides. Icons are mapped through the theme's icon system, so swapping an icon set affects every component that calls it. The usual problem is a copied template still containing hard-coded English text or a removed icon key, which shows raw identifiers or blank buttons in other languages. Test with at least one non-English language pack that your learners will use.
JavaScript modules
Moodle loads JavaScript as AMD modules, and a theme can add or replace modules that run on its pages, such as navigation or drawer behavior. Newer navigation and parts of the interface are built in React, so a theme change that targets older jQuery-style hooks may stop working without an error. Confirm which components in your release are React-based and which are AMD, and test keyboard operation and screen reader announcements after every script change. Avoid replacing core modules unless you have a documented reason to maintain them.
Child theme, full fork or plugin-based changes: which path fits
This table compares four ways to brand a Moodle site: a child theme, a full fork of a core theme, a theme built from scratch, and configuration with a small plugin. Read each row against your branding scope and your upgrade capacity, since the operational cost of each path comes mostly from how much core template code you end up owning.
| Path | When it fits | Upgrade effort and ownership of core changes |
|---|---|---|
| Child theme | Brand needs colors, fonts, logo, layout tweaks and a few template overrides on top of a supported core theme | Low to moderate. Core updates flow through; you own only the overridden templates and SCSS, which must be re-checked each release |
| Full fork of a core theme | Layout or navigation changes are too deep for a child theme and you accept owning the whole theme's code | High. You own every line, must merge each core theme change by hand and retest the full theme on every Moodle release |
| Theme built from scratch | Institution needs a distinct design system, a different page structure or a theme that does not depend on a core parent | Highest. You own the complete front end, accessibility testing, browser testing and all upgrade work, with no inherited fixes |
| Configuration plus small plugin | Branding is mostly settings and you need extra blocks, footer content or landing features that the theme does not provide | Low. Settings survive upgrades; the plugin follows Moodle plugin compatibility checks and needs its own test cycle |
| Accessibility work | Any path, when the brand changes color contrast, focus states or navigation structure | Every change to templates or styles needs re-testing with assistive technology, so keep the testing scope tied to the number of overrides |
| Testing scope per release | Use this to size regression testing before choosing a path | Child theme: templates and overrides only. Fork or scratch theme: full course, admin and mobile-facing pages |
| Ownership of template changes | Decide who signs off on overriding a core template before work starts | Each override should have a named owner, a reason and a review step at every Moodle upgrade |
| Questions to confirm with the implementer | Ask before accepting a quote | Which core theme the child theme inherits from, how overrides are listed and tested, and who maintains the code after go-live |
How to build a Moodle theme in sequence, with a check at each step
This sequence takes a brand theme from a confirmed Moodle version to a documented, packaged child theme that can be reviewed and maintained. Each step ends with a check so problems surface before the next layer of work begins.
Confirm the target Moodle version and requirements
Start by fixing the Moodle version your production site runs or will run, then record its PHP, database and web server requirements. Moodle 5.1 requires 64-bit PHP 8.2 or later, and Moodle 5.3 requires 64-bit PHP 8.3 or later, so the theme must be built against the version you will actually operate. Ask your platform or hosting team to confirm the exact versions in production. The check: a written version sheet that matches the production server and the supported database versions in the release notes.
Set up a development environment that matches production
Build a non-public copy of the site with the same Moodle version, PHP version, database engine and web server configuration as production. Use the same theme settings and a sanitized sample of courses and users so that layout issues show up with realistic content. Developers can run the stack locally or on a staging server in your infrastructure. The check: the staging site loads the default theme with no errors in the logs, and the version and PHP values on the site information page match production.
Create the child theme and its configuration
Create a child theme that inherits from a supported parent theme rather than editing the parent directly, so brand changes stay separate from core. Set the parent in the theme's version file, add the required language strings and settings file, and register the theme in the site's theme list. Keep the theme in version control from the first commit. The check: the child theme appears in the theme selector, the site loads with it enabled, and a diff of the child folder shows only the files you intended to create.
Add SCSS variables before custom rules
Set brand colors, fonts, spacing and logo sizing through the SCSS variables and theme settings that the parent exposes, and write custom rules only where those variables cannot reach. This keeps the styling close to what Moodle's own components expect and reduces conflicts at upgrade time. Have a designer or front-end developer sign off the palette before rules are written. The check: a compiled CSS build with no errors, and a visual comparison of the login page, course page and dashboard against the approved design.
Override only the templates the brand requires
Copy a Moodle template into the child theme only when a required change cannot be made with settings or SCSS, such as a header layout or a course card. Keep a short list of each override with the reason it exists, because every copied template must be reviewed when Moodle changes it in a later release. Ask your developers to log each override in the theme documentation. The check: a diff of each overridden template against the parent version shows only the intended changes, and the list of overrides matches the approved design.
Handle the /public document root
From Moodle 5.1, the web server document root must point to the /public directory instead of the main Moodle folder, so the theme's web-facing assets and the web server configuration must be updated together. Confirm the web server rule with your platform team, and make sure theme files are served from the correct path after the change. Otherwise the site can show directory listings or errors. The check: the site loads over HTTP and HTTPS, theme CSS and images return successfully, and no directory listing appears when the root path is requested.
Verify accessibility and responsive layout
Test the theme with keyboard navigation, screen readers and common zoom levels, and check color contrast on text, buttons and focus states. Then review the layout on phone, tablet and desktop widths. Run the checks on the main student and teacher pages, including the dashboard, course page, activity pages, grader report and the navigation drawer. Record defects and fix them in the theme before packaging. Your accessibility lead should sign off the results. The check: a browser pass on the main student and teacher pages with a written list of findings, all of which are either fixed or accepted in writing.
Package and document the theme
Package the theme with a version number, a changelog, install and upgrade notes, and a list of overridden templates and their reasons. Include the supported Moodle versions and the steps to rebuild SCSS and purge caches. Store the package in your own repository and hand over a short runbook for administrators. The check: a clean install of the package on a fresh staging site succeeds, the cache rebuild completes without errors, and the documentation lets someone who did not write the theme repeat the install.
How theme work differs between Moodle 4.5, 5.1 and 5.3
Moodle 4.5 is a long-term support release from 7 October 2024, with security support until 4 October 2027. A theme built for this line can keep the core theme structure and its templates, which makes it the lowest-change option for a site that needs branding at launch and a later move. The main work is keeping your child theme inheriting from a parent that still ships in core and keeping overrides narrow so they are easier to carry forward.
- Confirm the parent theme: Check the 4.5 release notes to confirm which core theme your child theme extends and that it is still bundled.
- Keep overrides small: Limit template overrides to the pages you must brand, so each one is a known item during the later move.
- Track the support window: Security support runs until 4 October 2027, so schedule the move to a later LTS well before that date.
- Separate brand from logic: Put colors, fonts and logos in SCSS settings and avoid copying core PHP into the theme.
Confirm the exact template paths in the 4.5 release notes before you copy any core file into your theme.
From Moodle 5.1, the web server document root must point to the new /public directory. Moodle 5.1 was released on 6 October 2025, with general support until 5 October 2026 and security support until 19 April 2027. For theme authors, this changes how the browser requests theme assets, so theme URLs, web server rules and deployment scripts need to be checked together. If the document root is not updated, the site may show directory listings or errors, which can look like a theme fault at first.
- Document root: Point the web server at the /public directory and confirm the site loads the theme without listing files.
- Asset paths: Confirm that theme CSS, JavaScript and images resolve after the change, and clear caches after each deployment.
- Deployment scripts: Update any build or copy steps that assumed theme files sit under the old root.
- Web server rules: Review rewrite and access rules alongside your theme compilation tests before go-live.
Check the 5.1 release notes for the exact asset and configuration changes that apply to your web server.
Moodle 5.3 removes the Classic theme from core. Any site whose theme inherits from Classic must be rebased onto a theme that remains in core, or onto a theme your team maintains, before the upgrade. Moodle 5.3 also requires 64-bit PHP 8.3 or later, PostgreSQL 17, MySQL 8.4, MariaDB 11.4 or SQL Server 2019 or later, and sites must run Moodle 4.4 or later to upgrade. Rebasing a theme is therefore one item in a larger upgrade plan, not a standalone task.
- Identify inheritance: Search your theme's parent setting and child theme files for Classic before the upgrade work starts.
- Rebase the styles: Move brand SCSS onto the new parent and retest every template that differs between the two.
- Check the platform stack: Confirm the PHP and database versions in the same plan, since they are separate from the theme work.
- Test on a restored copy: Run the rebased theme against a copy of production with real course pages, roles and mobile access.
Confirm which core theme replaces Classic and the template locations in the 5.3 release notes, because those details determine how much restyling is needed.
Navigation has moved to React in recent Moodle releases, which changes what a template override can do. An override of an older navigation template may no longer change the markup or behavior of the matching component, so brand changes to menus need to be planned against the supported extension points and the component code. Styling is usually the safer route for visual changes, but the release notes for your version decide which navigation parts can be customized and how far.
- Scope the menu changes: List every navigation change the brand needs, then sort each one into styling, settings or supported hooks.
- Test overrides after each upgrade: Overrides that worked on an earlier release may stop taking effect, so include menus in every upgrade test.
- Use CSS for visual changes: Colors, spacing and typography belong in SCSS, which depends less on component internals.
- Plan for plugin navigation: Custom menu items and plugins may render through different code paths, so test them as separate items.
Ask for the list of supported navigation customizations for your version before committing to a menu design.
What makes a theme project take longer or cost more
This table lists the factors that most change the effort of a Moodle theme project and how to keep each one contained. Read it before scoping, because the early decisions on target release, template overrides and accessibility level set most of the later work. Each driver is a choice the client can make on purpose.
| Driver | Why it changes effort | How to keep it down |
|---|---|---|
| Number of templates overridden | Each overridden Mustache template in a child theme must be re-checked after every Moodle release, and core template changes can break it. | Use SCSS variables and existing theme settings first, and override only the templates the brand truly needs. |
| Depth of navigation and React changes | Navigation and other parts of the interface now use React components, so changes there need JavaScript and React skills, not only templates and styles. | Limit custom navigation changes to layout and labels, and confirm which regions still use Mustache templates in the target release. |
| Number of languages and right-to-left layouts | Each language needs string checks and layout testing, and right-to-left support needs mirrored CSS and tested components. | Confirm the language list early, and use logical CSS properties where possible so right-to-left layouts need less rework. |
| Accessibility conformance target | A higher target requires more manual testing with keyboard and screen readers, plus fixes to colour contrast, focus states and headings. | Agree the conformance level and the pages in scope before design starts, and test the core pages first. |
| Number of devices and browsers | Each device class and browser version adds layout testing across the pages that students and teachers use most. | Fix a short list of supported browsers and screen sizes in the written scope. |
| Integration of an existing brand system | Brand tokens, fonts and components may come from a design system that needs mapping to Moodle SCSS variables and templates. | Ask for brand tokens in a machine-readable form and map them once to theme variables, rather than copying values into styles by hand. |
| Number of Moodle versions in use across environments | Each Moodle release can change templates, JavaScript and removed themes, so every environment needs its own compatibility checks. | Fix the target release early, pin the theme to it, and retire development branches for older versions where possible. |
How a child theme inherits from the parent and reaches the browser
The request starts with the child theme's own files: its configuration, Mustache templates, SCSS and language strings. Moodle resolves each file against the child first and falls back to the parent theme and then to core, so a file you do not override keeps coming from upstream. Compiled CSS and cached assets sit between that resolution and the browser, and a stale cache or a stylesheet that was not rebuilt after a change is the most common cause of a page that looks wrong. The points marked as upgrade risks are where a copied template or a forked stylesheet can drift from the release you move to, so check them first at every upgrade.
Moodle resolves a child theme file against its parent and core before compiled assets reach the browser.
Theme security: what custom CSS, JavaScript and assets can expose
A Moodle theme runs in every learner's browser and is often edited by people outside the core development team, so it is a real attack surface. The cards below cover the places where brand customization can leak data, load untrusted code or let the wrong administrator change what every user sees. Each one names the control to put in place and what to check during build and review.
Custom JavaScript runs for every user
Any JavaScript added through the theme or site settings executes for every learner, instructor and administrator, including on pages that handle grades and personal data. Treat each script as production code: keep it in the theme's source tree, review it in the same way as PHP, and limit it to presentation tasks. Check that it does not read or post form fields, tokens or session data, and that it does not add new network calls without a documented reason.
Third-party fonts, scripts and trackers
Brand kits often pull fonts, icon sets or analytics pixels from external content delivery networks, and each external request sends visitor IP addresses and referrers to a third party. Host fonts and images on the site's own infrastructure, remove tracking pixels from the header and footer templates, and record every external origin in the theme's documentation. Confirm with your privacy team whether any remaining external request needs a disclosure.
Who can edit theme settings and CSS
Theme settings, custom CSS and footer HTML are controlled by Moodle capabilities, and a role that can change them can inject markup that runs for all users. Review which roles hold the theme configuration capabilities, keep that set small, and route changes through the theme repository rather than the admin screen where possible. Record who approved each change so an unexpected edit can be traced.
Unescaped output in templates
Custom Mustache templates and renderer overrides that print user-supplied or course-supplied text without escaping can enable cross-site scripting. Moodle's template engine escapes variables by default, so review any triple-brace output and any override that builds HTML strings in PHP. Use the code review and static checks your team already runs, and include a test with a script-tag course name in the theme's verification checklist.
Uploaded logos and files in moodledata
Logos, favicons and background images uploaded through theme settings are stored under the Moodle data directory and served through the file system. Restrict who can upload, accept only expected image types, and confirm that the data directory is not served directly by the web server. Check how the file is served after upload so that an image upload cannot be used to deliver active content.
Theme code under review and version control
A theme that exists only as edits on a production server cannot be reviewed, rolled back or reproduced after an upgrade. Keep the child theme, SCSS sources and compiled output in version control, require review before merge, and build the compiled CSS in a pipeline rather than on the live site. Tie each release to a tag so that the same theme can be redeployed on a new Moodle version after testing.
Moodle source repositoryHow to test a theme before go-live and confirm it fails safely
Treat theme testing as a release gate with two goals: prove the theme meets your accessibility target on the flows people actually use, and prove that a broken theme can be removed without taking the site down. Start with automated accessibility checks on the login page, course page, activity pages, the gradebook and the course editor, then run manual passes using only the keyboard and at least one screen reader on the same flows. Automated tools catch missing labels and contrast failures but miss focus order, dynamic content announcements and confusing navigation, so the manual pass is not optional. Confirm your accessibility target, including the conformance level and the scope of pages, with your own compliance team before testing starts, because that decision defines what counts as a pass.
Next, cover the supported browser and device matrix your users actually run, and take visual regression snapshots of key pages at each breakpoint so unintended layout changes show up as diffs rather than as support tickets. Review every overridden template against its parent in a template-diff review, checking each change for intent, for accessibility impact and for whether a later core release would conflict with it. Then run a test upgrade to the next minor release on a copy of production, since core template and SCSS changes are the most likely to break at that step. Verify the upgrade against the requirements in the relevant release notes before you schedule it.
Fail-safe behavior needs its own tests. Deliberately break the child theme on a staging copy, for example with an invalid template or a SCSS compile error, and confirm the site falls back to the parent or a default theme as you expect. Then confirm that a cache purge from the administration interface recovers the site, and time how long that takes for your team. Finally, rehearse the rollback plan: switch the active theme back to the previous version, restore the saved configuration, and confirm the front end, login and key course pages all load for a test user. Record each result with the Moodle version, theme version and tester name, and keep that record with the go-live approval.
Questions buyers ask before they hire a Moodle theme partner
How much does a Moodle theme cost to build?
The cost depends on how much of Moodle's default look you change, how many layouts and templates you need, and how much accessibility testing you require. A light brand refresh through SCSS variables and a child theme costs far less than a theme that replaces page templates, the course page and the navigation. Ask for a fixed-scope quote that lists each template, each page type you expect to customize, the browsers and devices covered, and the accessibility checks included. Plan for a one-time build cost plus recurring work each time Moodle ships a release that touches the templates you changed.
How long does a Moodle theme project take?
Duration follows scope, the number of review rounds and how quickly the client returns feedback. A theme limited to colors, fonts, logo and a few layout tweaks moves faster than one that rebuilds course pages, dashboards and the mobile experience. Before work starts, agree the page list, the sign-off owners and the staging environment where reviews happen. Ask the partner to show the timeline as phases (design review, build, accessibility testing, staging sign-off, go-live) so each dependency on your team is visible.
Can our own developers build and maintain the theme in-house?
Yes, if your team has PHP and Moodle templating skills, Sass experience and capacity to test each Moodle release. The work involves a child theme that inherits from a supported parent, Mustache templates for output, SCSS compiled through Moodle's build process, and JavaScript where interactive pages need it. Ask yourself whether someone will own the theme after go-live, review the changes for each six-monthly major and two-monthly point release, and handle accessibility regressions. If those owners are not in place, a partner can build the theme and hand over documentation and a test plan.
What does the partner need from us to start?
The partner needs decisions and access more than design files alone. Provide brand assets such as logo files, color palette, typefaces and their licensing, plus any style guide. Name an accessibility target, such as the conformance level your institution or procurement requires, and say which assistive technologies matter to your users. Supply test accounts for each role (student, teacher, manager, administrator), a staging Moodle that matches production, and named sign-off owners for design, accessibility and content. Missing sign-off owners is one of the most common causes of delay.
Will a custom theme survive Moodle upgrades?
A child theme survives upgrades better than a copied core theme, because it inherits the parent's structure and only overrides what you changed. It still needs attention. When Moodle changes a template, renames a CSS class or alters a JavaScript module that your overrides depend on, the affected pages can break after an upgrade. Ask the partner how overrides are listed and documented, how they will be tested against each new release, and whether the upgrade test runs on a copy of your production data. Plan the upgrade test as a recurring cost, not a one-off task.
What is the difference between a Moodle theme and a Moodle plugin?
A theme controls how Moodle looks and how its pages are laid out. It works through templates, styles, layouts and some JavaScript. A plugin adds behavior or features, such as a new activity module, a block, a report, an enrolment method or an authentication method. Moodle documents more than 50 plugin types, and themes are one of them. The distinction matters for scope and ownership: a theme change should not alter grades, enrolments or data handling. If a brand requirement needs new functionality, such as a custom dashboard widget that reads data, that work belongs in a plugin and needs its own review.
Does a Moodle theme need to meet accessibility standards?
Often it must, and the theme is where many accessibility issues originate, including color contrast, focus order, heading structure, form labels and keyboard navigation. Name the target your institution or procurement requires before design starts, so contrast and layout decisions are made once rather than rechecked late. Ask the partner to test the theme with keyboard-only use, a screen reader and automated checks, and to report which findings are fixed and which remain in content you author. The partner can prepare the evidence, but only an independent assessor can issue an accessibility conformance audit.
How DeployOpen scopes, builds and hands over a Moodle theme
DeployOpen approaches Moodle theme development as a fixed-scope engagement inside your own infrastructure, with the scope agreed in writing before work starts. The work covers the brand layer, the accessibility checks and the documentation your administrators and theme maintainers need after go-live.
How we scope
- Agree the Moodle version, supported PHP and database versions, and the target release before any theme code is written
- Inventory brand assets, layout regions, and which pages and Moodle navigation elements the theme must change
- Confirm whether the theme is a child of an existing theme and record the customizations that must survive upgrades
How we build
- Build the theme as a child theme where possible, overriding templates and SCSS only where the design requires it
- Test templates and styles against accessibility checks and keyboard navigation, and record the results against the agreed scope
- Verify behavior across the core pages your learners and teachers use, on the browsers and devices your organization lists
How we hand over
- Deliver the theme code in your own version control, with a README covering installation, configuration and known limits
- Document each override, template and SCSS variable so future maintainers can see what changed from core
- Walk your administrators and developers through installation on a staging site and the upgrade checks they will repeat
How we support
- Offer ongoing theme support, upgrade testing and continuous testing as a retainer, scoped separately from the initial build
- Review theme compatibility when you plan a move to a new Moodle release, including the document root change introduced in 5.1
- Confirm support terms, response expectations and included releases in the written scope before engagement starts

