Urgent.News

What's breaking now, across thousands of outlets.

Tech

The 5 things that actually break in a Moodle 5.1 5.2 upgrade

Every "mysterious" Moodle 5.2 upgrade failure I've debugged has come down to the same five things. Not ten, not fifty. Five. If your site broke after upgrading from 5.1, check these before you start touching the database. 1. The web root isn't pointing at public This is one of the most common causes of Moodle 5.x upgrade problems. Since Moodle 5.1, the web-accessible code lives under public/ . If…

Moodle 5.2 upgrades often fail due to five specific issues. Before attempting a database-level fix, check these common causes:

1. The web root must point to the 'public' directory. Since Moodle 5.1, web-accessible code resides under public/. A misconfigured vhost pointing to the parent directory can cause 404 errors, security check failures, and other strange issues. Adjust the DocumentRoot directive or use a symlink or location alias if you're on cPanel or shared hosting. If your host lacks support, that's a hosting limitation, not a Moodle issue.

2. The router must forward requests to r.php. Moodle 5.1+ routes non-file requests through r.php. If this isn't configured correctly, you'll encounter 404s, missing assets, and router errors in the environment check. Make sure FallbackResource is set to /r.php and try_files $uri $uri / /r.php $is_args$args. Occasionally, PHP-FPM may handle the missing path before Apache can fall back to r.php, requiring separate debugging.

3. Composer dependencies must be present. Moodle 5.1+ requires a vendor/ directory. If missing, Composer errors will appear during startup. Run composer install --no-dev --classmap-authoritative from the Moodle root, not public. If you don't have shell access, build the release elsewhere and upload the complete codebase, including vendor/, to the server.

4. A plugin might still use old class names. For instance, a Class Mustache_Engine not found error indicates that an outdated plugin or theme is calling the older class name. After a core upgrade, this could happen if the plugin isn't compatible with Moodle 5.2. Update or remove the problematic plugin on a staging site and ensure compatibility with the upgraded Moodle version. Avoid relying on a clean file copy as proof of plugin compatibility; verify each non-core plugin against your target Moodle version.

5. Caches must be cleared after a clean upgrade. Many "this feature is broken" reports are simply due to stale caches. Examples include the file picker refusing to load. Run php admin/cli/upgrade.php followed by php admin/tool/purgesitesup/clear-all-caches. For production environments, use the CLI to bypass potential browser, proxy, and timeout issues with the web upgrader on larger sites.

By checking these five factors first, many Moodle 5.2 upgrade problems become more manageable. Always back up your code, moodledata, and database before upgrading, and test the upgrade on a copy of your site before implementing changes in production. For a comprehensive guide, including server requirements, clean code replacement process, symptom-to-cause table, and rollback guidance, refer to the Moodle 5.1 to 5.2 Upgrade Guide.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Kubernetes Architecture Explained: The core components that run your cluster

You have containerized your application with Docker and you need to run 100 copies across 20 servers, restart the containers when they crash, scale up or increase resources at users spike, plan…

  • Kubernetes divides cluster into control plane and worker nodes
  • Control plane manages overall state, makes global decisions
  • Worker nodes ensure pods run, provide runtime environment

★ The iPhone 4 ‘Antennagate’ Press Conference Q&A — Finally

I don’t know what truck this video fell off the back of, why it took 16 years, or how it came into the hands of “Sir Mix-A-Lot Rare Music”, but I’m sure glad it did.

  • Apple held emergency press conference on July 16, 2010, to address 'Antennagate' issue.
  • Steve Jobs presented 30-minute speech, including COO Tim Cook and hardware chief Bob Mansfield.
  • Q&A session lasted 47 minutes, showcasing Jobs' thoughtful approach to handling the controversy.

App Report: Tiny delights

Sometimes, it’s the little things in life, as this week’s crop of intriguing apps proves. None of our entries promise anything revolutionary — just control over one aspect or another of your Mac that…

More from Wednesday 23 September →