When a Moodle theme change does not appear, the cause is usually one of four layers: Moodle’s generated caches, a server or CDN cache, the browser cache, or the wrong theme/file being edited. Clearing everything repeatedly can hide the real cause, so work from Moodle outward.
Start with Moodle’s purge tool
- Sign in as an administrator.
- Go to Site administration > Development > Purge all caches.
- Select Purge all caches and wait for the process to finish.
- Reload the affected page.
Purging removes generated data so Moodle can rebuild it. The first requests may be slower while caches warm again. It does not delete courses, users or uploaded learning files.
Use the CLI when the interface is unavailable
php public/admin/cli/purge_caches.php
For pre-5.1 layouts, the path may be admin/cli/purge_caches.php. Run it with the correct PHP binary and service account. The CLI is especially useful after code deployment or when a broken theme prevents normal administration.
Hard-refresh the browser
After server-side caches are purged, test in a private window or perform a hard refresh. If only one browser or user sees the old design, local cached CSS, JavaScript or a service worker may be involved. Browser testing cannot replace the Moodle purge, because both layers can hold stale assets.
Check external cache layers
If the site uses a reverse proxy, CDN, hosting cache or page-cache plugin, purge the relevant URL there too. Confirm that authenticated Moodle pages are not cached as anonymous public pages. Over-broad full-page caching can create privacy and session problems, not just stale design.
Confirm the active theme and file
Open Site administration > Appearance > Themes > Theme selector and verify the theme for the affected device. Check whether a course or category forces another theme. Confirm that your deployment changed the active theme directory on the correct server or cluster node.
SCSS changes still do not appear
- Check SCSS syntax and imported file paths.
- Confirm the preset or raw SCSS field being compiled.
- Review PHP/web-server logs for compilation errors.
- On a cluster, deploy the same code and clear local caches on every node.
- Make sure file ownership allows Moodle to rebuild generated assets.
Mustache template changes do not appear
Confirm the override path and component name. An override must mirror the component template in the theme’s templates directory. A misspelled filename can be ignored without producing the visual result you expected. Purge caches after correcting the file.
JavaScript changes do not appear
Moodle uses built/minified JavaScript in production. Editing a source module without rebuilding its production artifact may do nothing. Follow the plugin or theme’s build process, deploy the generated files and purge caches. Do not leave developer-oriented cache disabling enabled on production.
Theme designer mode
Theme designer mode can make development changes easier to observe, but it reduces performance. Use it only in a development environment and turn it off after testing. A production site should serve compiled and cached assets.
A precise troubleshooting order
- Confirm the active site, theme and file.
- Validate the change and build required assets.
- Purge Moodle caches.
- Clear proxy/CDN cache for the affected asset.
- Test with a private browser session.
- Compare cluster nodes and deployment versions.
- Inspect network responses and server logs.
Final advice
Cache is a performance feature, not the enemy. Fix the deployment path and purge only when content genuinely changed. If you need a maintained starting point instead of a fragile custom override, review Themes Almond Moodle themes.
Source check: Verified against Moodle’s CLI cache commands, cache usage and developer guidance on making changes appear.
2 Replies to “How to Clear Moodle Cache and Fix Theme Changes Not Showing”