How to Install Moodle on XAMPP in Windows
Last update: 12-19-2024
Moodle is a powerful learning management system (LMS) used worldwide for online learning and training. Installing Moodle on your Windows system using XAMPP can seem daunting, but with this comprehensive guide, you'll have it up and running in no time. Below, we’ll walk you through the essential steps, from setting up XAMPP to configuring Moodle.
Step 1: Setting Up XAMPP
XAMPP is an open-source package that includes Apache, MariaDB, PHP, and Perl, making it ideal for hosting Moodle on your local machine.
Download and Install XAMPP
- Open your browser and search for "XAMPP download."
- Download the latest version suitable for your Windows system.
- Run the installer and ensure MySQL and phpMyAdmin are selected during the installation.
- Follow the prompts by clicking Next until the installation is complete.
- Once done, click Finish to close the installer.
Start XAMPP Services
- Launch the XAMPP Control Panel.
- Start the Apache and MySQL services by clicking the respective buttons.
Step 2: Updating MariaDB to the Latest Version
To ensure compatibility with the latest Moodle release, it's essential to have the updated version of MariaDB. For detailed instructions, refer to our guide on updating MariaDB on XAMPP.
Step 3: Installing Moodle
With XAMPP ready, you can now proceed to install Moodle.
Download Moodle
- Visit the Moodle download page.
- Download the latest stable version, such as Moodle 4.5.1, as a ZIP file.
Extract and Move Moodle
- Extract the downloaded ZIP file using a tool like WinRAR or 7-Zip.
- Move the extracted folder to the
C:\xampp\htdocs
directory.
Setup Moodle
- Open your browser and navigate to http://localhost/moodle.
- Follow the on-screen prompts by clicking Next to begin the installation.
- Confirm the default Moodle directory and specify a suitable Data directory for storing Moodle files.
Configure the Database
- Select MariaDB (native/MariaDB) as the database driver.
- Fill in the following details:
- Database Name: moodle
- Database User: root
- Password: Leave blank
- Tables Prefix: Leave as default
- Database Port: Leave blank
- Click Next to continue.
Accept Installation Conditions
- Carefully read and agree to Moodle’s installation terms and conditions.
- Click Continue to finalize the process.
Stay tuned for the next steps, where we’ll cover how to complete the Moodle setup, configure the admin account, and fine-tune your installation for optimal performance!
Step 4: Fixing Errors Before Installation
During the installation, some errors may occur. Follow these steps to resolve them and proceed smoothly.
Edit php.ini File
- Stop the Apache service in the XAMPP Control Panel.
- Click the Config button and select
php.ini
. - Uncomment the following lines by removing the semicolon (
;
): - Increase the
max_input_vars
setting: - Find
;max_input_vars
and set its value to5000
.
;extension=zip ;extension=gd ;extension=intl ;extension=sodium ;extension=soap
Add libsodium.dll
- Navigate to
C:\xampp\php
and locatelibsodium.dll
. - Copy the file to
C:\xampp\apache\bin
.
Reload Installation Page
- Restart the Apache service in the XAMPP Control Panel.
- Reload the Moodle installation page in your browser and click Continue.
Step 5: Finishing Moodle Installation
Complete Installation
- Wait for the installation process to complete.
- Click Continue when prompted.
Set Up Admin Account
- Enter the required details, including:
- Password
- First Name
- Last Name
- Email Address
- Click Update Profile.
Configure Site Details
- Enter the following details:
- Full Site Name
- Short Name for Site
- Support Email
Congratulations! Moodle is now successfully installed on your Windows system using XAMPP. You can start using Moodle to manage your learning needs.