Setting up Moodle 2.2 on a new Windows server using Wamp

I just finished setting up a brand new Windows 2003 virtual server with WAMP to run Moodle 2.2. WAMP automatically installed all the software I needed:

  • Apache 2.2.29
  • PHP 5.3.10
  • MySQL 5.5.2
  • phpMyAdmin (for managing the Moodle database)

Downloading Moodle

I downloaded the latest Moodle 2.2 build (30 MB) from the official Moodle website, making sure to get the core software and not the bundled WAMP package.

Following the official installation instructions, I extracted the downloaded folder and placed it in the web server’s root directory (c:\wamp\www\), creating the directory “c:\wamp\www\moodle.” The unzipped Moodle folder was 112 MB and took about 5 minutes to copy.

Database Setup

Before starting the Moodle installation, I used phpMyAdmin to:

  1. Create a new database for Moodle
  2. Create a database user for Moodle
  3. Grant necessary permissions to the new user account

These steps are essential prerequisites for installing Moodle. Refer to the Moodle documentation for detailed instructions.

Running the Moodle Installation

Next, I accessed the localhost homepage (WAMP homepage), where I saw the Moodle project folder listed.

Clicking the Moodle folder initiated the installation, which asked for database schema name, username, and password.

The next screen, “Installation Moodle 2.2.2+ Server Checks,” highlighted environment settings that required updates.

Addressing Unicode Compliance

The first issue was my database not being Unicode compliant. To fix this, I followed the instructions on these pages:

I executed the provided script in phpMyAdmin:

  1. Selected my empty Moodle database
  2. Navigated to the “SQL” tab
  3. Pasted and ran the following script, replacing “mydatabasename” with my actual database name:
1
ALTER DATABASE mydatabasename charset=utf8;

After running the script, I returned to the Moodle installation page, refreshed the browser, and the Unicode compliance check was gone.

Configuring PHP Extensions

The next step involved enabling necessary PHP extensions. Before editing, I confirmed the correct php.ini file location (C:\wamp\bin\apache\Apache2.2.21\bin) using the phpinfo() link on the WAMP homepage.

Important Lessons Learned:

  1. Always back up the php.ini file before making changes. This allows for easy recovery if any issues occur.
  2. Activate PHP extensions one by one and restart the Apache service after each change. This helps isolate any problematic extensions and simplifies troubleshooting.

Initially, I activated all commented extensions at once, causing Apache to fail on restart (indicated by a yellow WAMP tray icon). By systematically activating extensions one by one, I identified and left the “intl” extension commented out, resolving the issue.

Completing the Installation

With extensions configured, the Moodle installation presented a “Continue” button. The process then created numerous tables within my database, which took a few minutes.

Finally, the installation asked for a site name and required creating an admin account (username and password).

After completion, my new Moodle 2.2 instance was up and running on the Windows server.

Licensed under CC BY-NC-SA 4.0
Last updated on Mar 31, 2024 08:10 +0100