Menu

How to Install Moodle 5 on Ubuntu 24.04 (Nginx, PHP 8.3 and PostgreSQL)
πŸ“°

How to Install Moodle 5 on Ubuntu 24.04 (Nginx, PHP 8.3 and PostgreSQL)

#devto#dev#moodle#sudo#nginx
Reading 0:00
15s threshold

Moodle is the most widely used open-source learning platform, and Moodle 5 changed how it is installed. Since Moodle 5.1 , the code is split into a web-facing public/ directory and private files above it, third-party libraries come from Composer , and the web server must be configured for Moodle's router . Most Moodle tutorials online predate all three changes.

This guide installs Moodle 5.1 or 5.2 on Ubuntu 24.04 LTS with Nginx, PHP 8.3 and PostgreSQL 16 β€” all from Ubuntu's own archive, no third-party repositories needed β€” and covers the parts that decide whether Moodle runs well: moodledata , file permissions, max_input_vars , cron and HTTPS.

In short: install Nginx, PHP 8.3-FPM with Moodle's extensions and PostgreSQL; clone the Moodle stable branch and run composer install --no-dev --classmap-authoritative ; create moodledata outside the web root; point Nginx's root at Moodle's public/ directory with a fallback to r.php ; finish the installer; set $CFG->routerconfigured = true; ; and run Moodle's cron…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.