Install Moodle on localhost (localhost/moodle & install.php)
Install Moodle LMS locally: open http://localhost/moodle and localhost/moodle/install.php, configure moodledata and the database, and fix common installer errors.
Searches for localhost/moodle, http://localhost/moodle, or localhost/moodle/install.php usually mean installing or opening Moodle (open-source LMS) on your machine.
Default URLs
| Stage | URL | Notes |
|---|---|---|
| Site / login | http://localhost/moodle | After extracting to htdocs/moodle/ |
| Installer | http://localhost/moodle/install.php | First install or incomplete config |
| Site admin | http://localhost/moodle/admin | After install |
| DB upgrade | http://localhost/moodle/admin/index.php | After code upgrades |
Related queries: localhost moodle, moodle localhost.
You need PHP + a database (XAMPP, WAMP, MAMP) and can create the DB in phpMyAdmin.
Prerequisites
- PHP 8.0+ (see Moodle requirements)
- MySQL/MariaDB or PostgreSQL
- Extensions such as
intl,zip,gd,soap(installer lists missing ones) moodledata: writable by the web server, not web-accessible
Install steps
- Download a stable build from download.moodle.org
- Extract to
htdocs/moodle/(orwww/moodle/on WAMP) - Create a data directory outside the web root, e.g.
C:\moodledataor/var/moodledata - Create database
moodle_local(utf8mb4) in phpMyAdmin - Open http://localhost/moodle — or go straight to http://localhost/moodle/install.php
- Complete the wizard (wwwroot, absolute data path, DB settings, admin account)
Key wizard fields
| Field | Example |
|---|---|
| Web address (wwwroot) | http://localhost/moodle |
| Data directory | Absolute path to moodledata |
| Database host | localhost |
Common paths
| Path | Purpose |
|---|---|
/moodle | Home / login |
/moodle/install.php | Installer |
/moodle/admin | Administration |
/moodle/course | Courses |
Troubleshooting
404 on localhost/moodle — folder name, Apache running, MAMP port (:8888).
install.php / data directory not writable — fix OS permissions; keep moodledata out of htdocs.
Missing PHP extensions — enable in php.ini, restart Apache.
DB connection failed — MySQL running; credentials match phpMyAdmin.
Also see Chamilo.
Summary
Main entry: http://localhost/moodle. First-time setup uses /moodle/install.php. Prepare PHP, a database, and a separate moodledata directory.