Windows installation using XAMPP
Note: You are currently viewing documentation for Moodle 2.0. Up-to-date documentation for the latest stable version is available here: Windows installation using XAMPP.
XAMPP is a fully functional web server package. It is built to test web based programs on a personal computer. It is not meant for online access via the web on a production server. This page describes how to install the XAMPP webserver package of progrmas and how to install a Moodle standard package on the server which was created.
- TIP: These guidelines are not intended for the Complete install packages for Windows from download.Moodle.org - although the troubleshooting part may help if you encounter problems. XAMPP is also used to create Moodle's complete install packages.
- 1 Overview
- 2 Preparation
- 3 Installing XAMPP
- 4 Create the MySQL database
- 5 Extract the downloaded Moodle files to the correct location
- 6 Summary of XAMPP and initial Moodle install
- 7 Troubleshooting
- 8 See also
Note: This guide uses XAMPP 1.5.1. An installation for 1.7.1 was similar.
This is a guide for installing XAMPP and Moodle on a computer using the Windows XP operating system.
An overview of the steps:
- Download the standard Moodle install package you wish to use
- Download the latest version of XAMPP from Apachefriends.org
- Install XAMPP
- Start XAMPP, which will start Apache and MySQL
- Confirm webserver is operating with your browser
- Unzip Moodle into the htdocs folder
- Use your browser to navigate to Moodle
- Install Moodle, perhaps pausing to update some configuration files
- Create Admin user and Front Page settings and you have done it.
- Download the standard version of Moodle you wish to install from Moodle.org Standard install packages.
- Go to apachefriends.org and download XAMPP for Windows. This example assumes that you have downloaded the “Installer” package. There are several XAMPP packages to download. Installer is about 1/2 the size of the same package as a zip file.
Allow yourself some time
- Say 45 minutes. The time will depend upon the speed of your computer, download connection and of course your familiarity with the process.
- Run the installer, eventually you will be presented with an option about where to install the package. We told it to install it in a new folder called C:\X_server which XAMPP will create.
- Continue with the installation, this will take a while!
- Eventually you will be presented with the option to install Apache, MySQL, Filezilla and Mercury as a service.
- It’s probably best to choose “No” for now. You can always enable these as services later.
- Next you’ll be asked if you want to start the XAMPP Control Panel.
- Click the “No” button.
Launch XAMPPThere are several ways to start your webserver.
1. On your Desktop, locate the shortcut XAMPP icon and double click to launch the Control Panel.
- When the XAMPP Control Panel has launched, click the “Start” buttons for Apache and MySQL (see below).
2. In the folder you installed XAMPP, look for the XAMPP_start, or XAMPP_restart icon.
- When XAMPP start has finished, both Apache and MySQL have been started.
3. In the folder you installed XAMPP, look for the Apache start and MySQL start icons
- When Apache and MySQL start icons are used, two black windows command window should remain open
- If all is well you will see something like this.
If Apache fails to run i.e. the "Running" text with the green background keeps disappearing) and you are using Skype - please review "Troubleshooting" at the end of these instructions.
Create the MySQL database
To create a MySQL database for your Moodle “site” we will use the phpMyAdmin utility included with XAMPP.
- To access this launch the web browser of your choice (Firefox is used in this example), type http://localhost in the address bar.
- The XAMPP default page wiil be displayed, click the link for your preferred language – we will be using English.
- From the menu on the left, click on “phpMyAdmin”
- When phpMy Admin has launched in your browser window, enter the name of your database in the “Create new database” field.
- From the "Collation" drop down list select "utf8_unicode_ci"
- Click the “Create” button to create the database.
You should see the database on the left with your moodle MySQL database name without files in it and/or a notice that it was created.
Extract the downloaded Moodle files to the correct location
Locate the zip file of the standard install package you downloaded from Moodle.org. The easiest method is to extract everything in the file to the htdocs folder that XAMPP just created. Most XP Windows operating systems come with an program that will recognize a zip file and ask you where you want to extract the files.
- Extract the Moodle files to htdocs. A default folder named “moodle” is created with all the Moodle folders and files within it.
It is a good practice to manually create the moodledata folder. In an standard default install, Moodle will look for it in the top most level of folders on your server, the same level as htdocs, apache, php and those folders.
You may have to change the permissions of the folder in some operating systems.
- For example, in Windows Vista, you will need to manually create your moodledata folder and assign it permissions. To do this right click on the moodledata folder, select properties and the "Security" tab.
- Another box will pop up. Select "Users" and give them "Modify" and "Write" permissions, along with whatever existed already.
Summary of XAMPP and initial Moodle install
You have now installed a webserver on your computer. You have at least two web based applications on it: XAMPP and Moodle. Your can use this webserver to install other webbased applications.
Next you need to get Moodle to install itself. You will use your favorite web browser to do this.
Start of a Moodle install
Other pages in MoodleDocs describe the install process. We will just cover the first few screens and then point you to other pages.
- In your web browser, type the path to the folder containing the Moodle files in te address bar – in this example it’s http://localhost/moodle.
- The initial install page is displayed.
- Choose your preferred language (English is used in this example) and click the “Next” button.
- A diagnostic report is displayed – hopefully it will look like this, if not you may need to address some issues.
- Click the “Next” button to continue.
- The paths for your Moodle installation are shown – accept these or amend as desired.
- Click the “Next” button to continue.
- In this screen we enter the database settings. The fields are populated with some suggested values.
- In this example the database created is “moodle153”. The “root” user will be used without a password.
- DO NOT USE THE “ROOT” USER WITHOUT A PASSWORD FOR PRODUCTION INSTALLATIONS AS THIS CREATES A SECURITY VULNERABILITY.
- TIP: Remember that in phpMyAdmin there was a screen to change the root password. Our instructions said to copy the root user to a user called admin. Probably bad security but we use our moodle admin password for the MySQL user called admin.
- When you have added or edited information on the page, click the “Next” button to continue.
- TIP: This information is creating and can later be edited in the htdocs/moodle/config.php file.
- Provided the Moodle folder is writable a message confirming the configuration has been completed will be displayed.
- Click the “ Continue” button to proceed.
The Moodle copyright / licence notices are displayed.
- Click the “Yes” button to continue, and you will be asked to create the admin user for your Moodle site, then be taken to the Front Page settings. Nice job.
- If you have previously created a Moodle install with the Bitnami installer you may find that Apache will not start. This is because Bitnami installs a service for Apache and MySQL. To disable these go to Control Panel > Administrative tools > Service to locate and disable these services.
- If XAMPP does not work when you launch your browser and you have Skype enabled it may be necessary to change the port settings in Skype.
- Locate "Options..." in Skype.
- Locate the "Connection" options.
- Remove the tick / check from the Checkbox.
- Click the "Save" button.
- You may need to re-start your computer for this to take effect.
Still having problems but do not have Skype installed?
- Check for another program which may be using port 80. IIS is commonly found to be the culprit.