🎓
Hosting

Moodle hosting requirements: PHP, database, disk and cron

18.11.2026
← All articles

Moodle is the most widely used open-source learning platform, running courses for schools, training centres, universities and corporate programmes. It is not a simple brochure site: every student login opens a session, course files are served constantly, quiz answers are saved in real time and background tasks run all day. Checking that a plan "has PHP and MySQL" is not enough. Here is what hosting has to provide for Moodle to run reliably.

PHP version and required extensions

Each Moodle release has its own minimum PHP version, and it rises over time. The current 4.x branch needs PHP 8.1 or newer, and later major versions may ask for something newer still. Check the requirements table on the official release notes before installing, and make sure your hosting lets you pick that version. Never switch PHP on a live site without a backup and a quick test first.

The installer also checks extensions. You will typically need intl, mbstring, iconv, curl, openssl, sodium, gd, zip, xml, soap, and either mysqli or pgsql depending on your database.

php.ini settings: max_input_vars is the one people forget

Moodle settings pages and large quizzes submit a huge number of form fields at once. By default PHP accepts only 1000 and silently drops the rest, so settings fail to save or the gradebook is written partially. That is why the installer requires max_input_vars of at least 5000. Upload limits should also allow teachers to add videos and large PDFs.

memory_limit = 256M
max_input_vars = 5000
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 120
opcache.enable = 1

In ISPmanager most of these values can be changed in the site's PHP settings; if one is locked on your plan, open a ticket from the sayt.uz cabinet. OPcache must be enabled, otherwise PHP recompiles the code on every page view and the site slows down noticeably.

Database: MariaDB, MySQL or PostgreSQL

Moodle officially supports MariaDB, MySQL and PostgreSQL, and on shared hosting MySQL or MariaDB is perfectly adequate for small and medium platforms. Create the database with utf8mb4 encoding and InnoDB tables, or forum posts containing emoji will fail to save. The log table grows with every user action, so configure automatic deletion of old log entries from the start.

The moodledata directory and disk space

Course files, student submissions and caches live in a separate moodledata directory, which must sit outside the web root so nobody can download submissions through a browser. Its location is set in config.php:

$CFG->wwwroot  = 'https://lms.example.uz';
$CFG->dataroot = '/var/www/moodledata';
$CFG->dbtype   = 'mariadb';

Plan disk space with course backups in mind, as weekly automated backups of video-heavy courses can outgrow moodledata itself. A private school in Tashkent with 300 pupils, where teachers upload a short video for each lesson, can easily collect tens of gigabytes in one school year. Hosting videos on an external video service and embedding them saves a lot of space.

Cron must run every minute

Forum email notifications, grade recalculation, session cleanup, backups and reports all depend on cron, and Moodle recommends running it every minute. When teachers say notifications never arrive, a missing cron job is the usual cause.

* * * * * /usr/bin/php /var/www/example.uz/admin/cli/cron.php > /dev/null 2>&1

Add it in the ISPmanager scheduler and point it at the same PHP version the site uses.

Quiz day load: when shared hosting is not enough

The heaviest moment is a quiz taken by many students at once. On a normal day twenty or thirty users are easy for shared hosting, but when two hundred students open an exam within a minute and save every answer, PHP processes and database connections spike. If that exceeds plan limits, pages slow down or answers fail to save. A school or training centre with dozens of concurrent users does fine on well-tuned shared hosting; a university or online course platform with hundreds of simultaneous test-takers is safer on a VPS, where you control PHP-FPM workers, database caching and session storage such as Redis. Run a trial quiz with a few teachers before the real exam.

Security and updates

Moodle holds personal data such as names and grades, so serve it only over HTTPS; a free, automatically renewed Let's Encrypt certificate on sayt.uz hosting is enough. Install security releases promptly, and before every upgrade back up the code, moodledata and the database, since those copies are your only way back after a failed upgrade. Remove plugins you no longer use.

Related articles

🧭 Self-Hosting a Vector Database: Qdrant and pgvector 🧭 Portainer: Managing Docker from Your Browser 💾 How to Restore a Site and Database from Backup in ISPmanager 🤝 Reseller hosting in Uzbekistan: hosting client sites the organised way
🌐 Language
🇺🇿 O'zbek 🇺🇿 Ўзбек 🇷🇺 Русский 🇬🇧 English ✓