Still struggling with your LMS? Let's talk about how we can make your life easier with one of our experts.
Here's an updated and fully rewritten version of Lambda Solutions' Moodle™ Installation & Setup Guide (originally published March 10, 2023) — now refreshed for mid‑2025 with modern best practices and enriched with internal cross‑links to Lambda’s relevant guides.
Planning System Capacity
Ensure adequate hardware depending on expected users, data volume, and content. For large installations, consult our Managed Moodle Cloud Hosting services.
(See Lambda’s guide: “Managed Moodle Cloud Hosting”) (Lambda Solutions)
Software Requirements
PHP 8.1+ (extensions: intl, mbstring, XML, cURL, zip, soap, gd, ldap)
MySQL/MariaDB (utf8mb4), PostgreSQL 14+, or MS SQL Server supported
Apache 2.4+ or Nginx recommended for production
(Moodle docs 2025 requirements) (Moodle Docs)
Set up on a supported OS (e.g., Ubuntu 24.04 LTS or AlmaLinux 9). Include firewall, SSL (Let’s Encrypt), and basic OS hardening.
Install and configure database, web server, and PHP with tuned parameters.
Download the Moodle 5.x LTS version (e.g., 5.0 or newer) from [moodle.org] or via Git:
git clone -b MOODLE_500_STABLE git://git.moodle.org/moodle.git
(Recommended for easier upgrades) (Moodle Docs)
Place Moodle code outside webroot and set permissions:
chown -R root /path/to/moodle
chmod -R 0755 /path/to/moodle
Create a moodledata
directory outside webroot and writable by the web server user only.
Restrict access (e.g., via .htaccess
if necessary).
(Critical security requirement) (Moodle Docs)
Create dedicated database and user (no privileged account usage). Take note of hostname, DB name, credentials, and collation settings.
Supported: MySQL/MariaDB (utf8mb4), PostgreSQL 14+, or MS SQL. (Moodle Docs)
Command-line installer is preferred for production setups:
cd /path/to/moodle/admin/cli
sudo -u www-data php install.php
Then lock code directory again.
Web installer is an option; ensure installation pages are not publicly accessible during setup. (Moodle Docs)
Schedule Moodle cron to run every minute (*/1 * * * * php /path/to/moodle/admin/cli/cron.php
) to ensure background tasks complete reliably.
Finalize admin account creation, site name, timezone, and default preferences.
Set up SMTP using trusted relay services (e.g. SendGrid, SendLayer) to ensure deliverability for activation and notification emails.
Walk through SMTP configuration in Moodle Admin → Server → Email settings.
(See Lambda’s post: “How To Install and Configure Moodle™”) (Moodle Docs, Scribd, sendlayer.com, Lambda Solutions)
Enforce HTTPS, enable SSL, and disable unnecessary PHP features.
Implement caching with Redis or Memcached for sessions and performance, plus PHP OPcache.
Regularly apply system and Moodle updates.
(See MoodleDocs performance recommendations) (Moodle Docs)
Automate backups of:
moodledata
Moodle code directory
Database
config.php
Store backups off‑site and across geographies for redundancy.
Upload users via CSV or connect with authentication methods (LDAP, SSO, email invites).
Install and manage plugins/themes via Moodle Plugins Directory.
Create and enroll users into courses manually, via self-registration, or bulk import.
(Detailed in Lambda’s Part 2 & 3 guides) (Lambda Solutions, 452853.fs1.hubspotusercontent-na1.net, Scribd)
Use Git branch switching (e.g. MOODLE_500_STABLE
) or Moodle’s built‑in upgrader.
Review plugin compatibility and apply security patches.
(Moodle upgrading best practices) (Moodle Docs)
For development/test environments, enable Moodle Developer Mode and use Docker or Moodle Development Kit (MDK).
Consider deployment via containers in AWS using ECS/Fargate with shared EFS storage and Redis caching for production scalability.
(See AWS + Moodle serverless tutorial) (Amazon Web Services, Inc.)
Managed Moodle Cloud Hosting – auto-handled hosting, backups, scaling (referenced in System Capacity & Backups).
How to Install Moodle™ (blog post, Sept 2023) – detailed email & SMTP setup → linked in Email config. (Lambda Solutions)
Part 2 & Part 3 Guides in Lambda’s Moodle Setup series (uploading users & creating courses/quizzes) → linked in Post‑installation section. (Lambda Solutions)
Phase | Key Actions (Updated for 2025) |
---|---|
Planning & Requirements | Moodle 5.x LTS, PHP 8.1+, PostgreSQL 14+, Nginx preferred |
Server Setup | Harden OS, install LEMP/LAMP stack, enforce SSL |
Download & File Setup | Git-based download, secure permissions |
Data Directory | moodledata outside webroot, restricted access |
DB Setup | Dedicated user, proper collation |
Installation | CLI installer preferred; Web UI option |
Cron & Config | Cron job every minute; final UI setup |
Email Configuration | SMTP via trusted providers; ensure deliverability |
Security & Performance | HTTPS, Redis/Memcached, OPcache |
Backups | Full automated backups of DB, code, data directory |
Post‑Install Management | Bulk CSV user import, plugin & theme management, course setup |
Upgrades & Plugin Audit | Git branches or upgrade wizard; plugin compatibility checks |
Advanced Deployment | Docker/MDK for dev; AWS container orchestration for large-scale setups |
Go to Site Administration > Users > Accounts > Add a new user.
Fill out required fields (username, password, email, etc.).
Click Create user.
Go to Site Administration > Users > Accounts > Upload users.
Upload a CSV file formatted like:
username,password,firstname,lastname,email
jsmith,Passw0rd1,John,Smith,jsmith@example.com
Configure upload settings (password policy, update existing users, etc.).
Click Upload users and confirm.
Go to Site Administration > Courses > Add a new course.
Enter course full name, short name, and category.
Set course format (e.g., topics or weekly).
Configure start date, course summary, and appearance.
Click Save and display.
Go to the course > Participants > Enroll users.
Select users from the list.
Assign role (typically Student).
Click Enroll users.
Prepare a CSV with the following format:
username,course1,role1
jsmith,course101,student
Go to Site Administration > Users > Upload users.
Upload CSV and set default role.
Process upload and review confirmation.
Go to the course > Turn editing on.
Click Add an activity or resource and select Quiz.
Enter the quiz name and description.
Set timing, attempt limits, grading, and layout.
Click Save and display.
Click Edit quiz > Add > + a new question.
Choose question type (e.g., multiple choice, true/false).
Enter question content, answers, and feedback.
Click Save changes. Repeat to add more questions.
For ongoing support, visit Lambda Learning or explore our Moodle Training & Hosting Services.