System Requirements
This document provides a detailed overview of the server software and hardware requirements for running Moodle 4.x/5.x. Meeting these requirements ensures optimal performance and stability for your learning management system.
PHP Requirements
Moodle requires PHP 8.1 as the minimum version. The recommended versions and their support status are as follows:
- PHP 8.1: Minimum required for Moodle 4.1+
- PHP 8.2: Recommended for Moodle 4.3+, fully supported
- PHP 8.3: Supported from Moodle 4.5+
Required PHP Extensions
The following PHP extensions must be installed and enabled:
iconv— Character set conversionmbstring— Multibyte string handlingcurl— URL transfer library (for web services, repositories)openssl— SSL/TLS supporttokenizer— PHP code tokenizationxmlrpc— XML-RPC support (deprecated in PHP 8.0, may be external)soap— SOAP web servicesctype— Character type checkingzip— ZIP archive handlinggd— Image processingsimplexml— XML parsingspl— Standard PHP Librarypcre— Regular expressionsdom— Document Object Modelxml— XML parsingintl— Internationalization functionsjson— JSON encoding/decodingsodium— Modern cryptography (required from Moodle 4.2+)exif— Image metadata reading (recommended)fileinfo— File type detection (recommended)opcache— Bytecode caching (strongly recommended for performance)
Recommended PHP Configuration (php.ini)
memory_limit = 512M
post_max_size = 128M
upload_max_filesize = 128M
max_execution_time = 300
max_input_vars = 5000
opcache.enable = 1
opcache.memory_consumption = 256
opcache.max_accelerated_files = 10000
opcache.revalidate_freq = 60
Database Requirements
Moodle supports the following database management systems:
- MySQL: Version 8.0 or higher. Must use InnoDB storage engine with
utf8mb4character set and Barracuda file format. - MariaDB: Version 10.6.7 or higher. Same requirements as MySQL regarding InnoDB and character set.
- PostgreSQL: Version 14 or higher. This is considered the best-performing database option for large Moodle installations.
- Microsoft SQL Server: Version 2017 or higher (with Full-Text Search enabled).
- Oracle Database: Version 19c or higher. Requires additional configuration and is the least commonly used option.
MySQL/MariaDB Configuration
[mysqld]
default_storage_engine = innodb
innodb_file_per_table = 1
innodb_buffer_pool_size = 1G
innodb_log_file_size = 256M
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
max_allowed_packet = 64M
Web Server Requirements
- Apache: Version 2.4 or higher with
mod_rewriteenabled. Moodle works well with Apache and .htaccess support. - Nginx: Version 1.18 or higher. Requires manual configuration for URL rewriting since Nginx does not support .htaccess files.
- IIS: Version 10 or higher on Windows Server. Requires URL Rewrite module.
Hardware Requirements
Hardware requirements vary significantly based on the number of concurrent users:
- Small sites (up to 100 users): 2 CPU cores, 4GB RAM, 50GB storage
- Medium sites (100-1000 users): 4 CPU cores, 8GB RAM, 200GB storage
- Large sites (1000-10000 users): 8+ CPU cores, 16-32GB RAM, 500GB+ storage, consider separating database and web servers
- Very large sites (10000+ users): Load-balanced web servers, dedicated database cluster, shared storage (NFS/S3), Redis/Memcached for caching
Browser Requirements
Moodle 4.x supports the following browsers:
- Google Chrome (latest two versions)
- Mozilla Firefox (latest two versions)
- Apple Safari (latest two versions)
- Microsoft Edge (Chromium-based, latest two versions)
Internet Explorer is no longer supported as of Moodle 4.0. Mobile browsers on iOS and Android are supported through the Moodle app or responsive web design.
Disk Space Considerations
- Moodle code: Approximately 200-300MB
- Moodle data directory: Highly variable; depends on uploaded content, backups, and cache files. Plan for at least 10GB initially and monitor growth.
- Database: Typically 1-10GB for small/medium sites, but can grow to 50GB+ for large, long-running installations