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

StageURLNotes
Site / loginhttp://localhost/moodleAfter extracting to htdocs/moodle/
Installerhttp://localhost/moodle/install.phpFirst install or incomplete config
Site adminhttp://localhost/moodle/adminAfter install
DB upgradehttp://localhost/moodle/admin/index.phpAfter 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

  1. Download a stable build from download.moodle.org
  2. Extract to htdocs/moodle/ (or www/moodle/ on WAMP)
  3. Create a data directory outside the web root, e.g. C:\moodledata or /var/moodledata
  4. Create database moodle_local (utf8mb4) in phpMyAdmin
  5. Open http://localhost/moodle — or go straight to http://localhost/moodle/install.php
  6. Complete the wizard (wwwroot, absolute data path, DB settings, admin account)

Key wizard fields

FieldExample
Web address (wwwroot)http://localhost/moodle
Data directoryAbsolute path to moodledata
Database hostlocalhost

Common paths

PathPurpose
/moodleHome / login
/moodle/install.phpInstaller
/moodle/adminAdministration
/moodle/courseCourses

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.

访客计数:------ Best viewed in Netscape Navigator · 800×600 © LocalHost Run