Quick install Drupal with XAMPP on Windows

Last updated on
5 October 2025

It is not recommended to use XAMPP for local Drupal development. Use a Docker-based solution such as DDEV or Lando instead.

This guide shows how you can install XAMPP on Windows to use as a development environment for Drupal.

Important Safety Notice

XAMPP should not be used for a web server that can be accessed from the Internet. The safe operation of the web server is not guaranteed with XAMPP! (1)

Step 1: Install XAMPP as a development environment

  1. Download XAMPP for Windows from Apache Friends and run the installer. If you have questions related to XAMPP, read their Windows FAQ.
  2. It is recommended to install XAMPP outside the Program Files folder, e.g. "C:\xampp\" or "D:\devel\xampp\", not "C:\Program Files\xampp\" or similar)(2). The rest of this guide assumes you used "C:\xampp\". 
  3. Test your XAMPP installation by opening a web browser and entering http://localhost/ in the address field. The XAMPP welcome page should appear.

Step 2: Get the Drupal source code and create databases

  1. Put the Drupal source code inside C:\xampp\htdocs\drupal. The procedure depends on which version of Drupal you are installing - read the install instructions (see legacy instructions for Drupal 7). Don't run the actual Drupal installer yet - follow the next steps in this guide first.
  2. You create databases using phpMyAdmin which you can access by typing http://localhost/phpmyadmin/ in the address field or clicking "phpMyAdmin" at the top right of the XAMPP welcome page.
    • Click on "Databases".
      • If you wish to use XAMPP to work with an existing local or remote Drupal site you must first create an empty database then use phpMyAdmin to import the database dump.
      • Or create a new database: Below "Create Database" type the name you wish to use for your Drupal database (e.g. "drupal"). Don't use "-" or "_" or spaces in the name and use only lowercase letters or numbers. Remember it! Click "Create".

Step 3: Change some values for the development system

The most common sources of installation errors are lack of available PHP memory and/or low maximum PHP execution time. I recommend only for a development system the following values instead of the default values. Do not use these values on a live web server!

  1. Backup C:\xampp\php\php.ini by copying it to C:\xampp\php\php.ini.ORIGINAL or some other name you can remember.
  2. Change the following lines in C:\xampp\php\php.ini:
    • max_execution_time = 600
    • max_input_time = 600
    • memory_limit = 512M
    • post_max_size = 64M
    • upload_max_filesize = 64M
    • mysql.connect_timeout = 600

    For Drupal 9, uncomment this line in the same file by removing the ; in the first column:

    • extension=gd
  3. Backup C:\xampp\mysql\bin\my.ini by copying it to C:\xampp\mysql\bin\my.ini.ORIGINAL or some other name you can remember. (3)
  4. Change the following lines in C:\xampp\mysql\bin\my.ini:
    • max_allowed_packet = 64M
      (You have to change this variable twice in the same file)
    • innodb_flush_log_at_trx_commit = 2

Step 4: Run the Drupal Installer

  1. Now restart both "Apache" and "MySQL" in the XAMPP Control Panel by clicking the "Start" button next to both.
  2. To start configuring Drupal, run the Drupal installer by entering http://localhost/drupal/ into your browser address field (where "drupal" is the name of the folder that you just created and copied/downloaded into).
  3. You might want to read the
  4. Running the Installer from the Drupal User Guide, or
    look at installations instructions again (Legacy instructions for Drupal 7).

Notes:

  1. XAMPP should be used only as a development server (look at the first section of https://www.apachefriends.org/about.html for details, or in German at FOCUS berichtet: XAMPP ist schuld am Hack der Bundespolizei)!
  2. If you have put the xampp folder directly in the root of a drive, you can copy it to the root of another drive, or connect a removable drive to another computer. If there the ports 8080 (or 80, if you didn't change it), 443 and 3306 are not used, you can start XAMPP without any problems and without any local configuration (e.g. on your laptop or from a USB drive, or on a client's Windows computer) but only if you have never run C:\xampp\setup_xampp.bat.
  3. In later versions this has changed to C:\XAMPP\xamppfiles\etc\my.cnf

Help improve this page

Page status: No known problems

You can: