Skip to content
Follow
Windows

How to Install Drupal Locally with XAMPP on Windows 11

Richard
Written by
Richard
Jan 31, 2026 Updated Sep 15, 2026 4 min read
How to Install Drupal Locally with XAMPP on Windows 11
How to Install Drupal Locally with XAMPP on Windows 11

Installing Drupal locally on Windows 11 with XAMPP lets you build and test websites on your PC without an internet connection. Drupal is a free content management system (software used to build and manage websites), and XAMPP is a tool that turns your computer into a local web server.

Advertisement

This setup takes about 15 minutes to complete and gives you a private space to try out new themes, test modules, and build custom designs before you publish your site online.

⚡ Quick Answer

Install XAMPP, create a Drupal database via its shell or phpMyAdmin, and download Drupal files into a htdocs/drupal folder. Restart Apache, then access http://localhost in your browser to complete the Drupal setup.

Advertisement

What is XAMPP?

XAMPP is a free software package for Drupal XAMPP Windows setups that lets you run websites on your Windows 11 computer without an internet connection. It bundles Apache for showing web pages, MariaDB for storing data, and PHP so you can test your Drupal site locally.

  • Apache (the web server that displays your website)
  • MariaDB (a database that stores your website’s information)
  • PHP (the programming language that Drupal uses)

With XAMPP, you can run Drupal and other websites without needing an internet connection.

Step 1Install XAMPP

Don’t have XAMPP yet? Follow this guide first:

How to Install XAMPP on Windows 11

Advertisement

Step 2Create a Database for Drupal

Creating a database for Drupal XAMPP Windows requires opening the XAMPP Control Panel, launching the built-in command shell, and running database creation commands. This gives your local Drupal site the database storage it needs to save all your website content and user information.

What you'll do:

  1. Open the XAMPP Control Panel.
  2. Click the Shell button on the left side. A command window will open.
  3. Type this command and press Enter to open the database tool:

    mysql -u root
  4. Type these commands one at a time. Press Enter after each one. Replace your_password_here with a password you choose. Remember this password!

    CREATE DATABASE drupaldb CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;


    ⚠️WarningCREATE USER 'drupaldbuser'@'localhost' IDENTIFIED BY 'your_password_here';

    CREATE USER 'drupaldbuser'@'localhost' IDENTIFIED BY 'your_password_here';

    Advertisement

    GRANT ALL ON drupaldb.* TO 'drupaldbuser'@'localhost';


    FLUSH PRIVILEGES;


    exit

XAMPP Shell Button
XAMPP Shell Button

Advertisement
💡TipIf you don't want to use the command line, you can create the database using phpMyAdmin instead.

If you don't want to use the command line, you can create the database using phpMyAdmin instead. Click the Admin button next to MySQL in the XAMPP Control Panel.

Step 3Download and Prepare Drupal

Preparing Drupal for your Drupal XAMPP Windows environment involves downloading the official source files and placing them inside the main server directory. You extract the downloaded files into a dedicated folder so the local Apache web server can read and run your Drupal site.

  1. Open your C:\xampp\htdocs folder on your computer.
  2. Create a new folder called drupal inside the htdocs folder. This is where your Drupal files will go.
  3. Download the latest Drupal version from here: Drupal Downloads
  4. Extract the Drupal files you downloaded directly into the drupal folder.
Drupal folder inside XAMPP htdocs
Drupal folder inside XAMPP htdocs

Step 4Change Apache's Default Page to Your Drupal Site

Changing Apache's default page for your Drupal XAMPP Windows setup makes your Drupal site load automatically whenever you visit the local server. You edit the main index file in your server directory to redirect traffic straight to your Drupal installation files.

Advertisement

What you'll do:

  1. Go to C:\xampp\htdocs and open the index.html file with a text editor like Notepad.
  2. Replace everything in the file with this code:

    <?php

      if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {

        $uri = 'https://';

      } else {

        $uri = 'http://';

      }

      $uri .= $_SERVER['HTTP_HOST'];

      header('Location: '.$uri.'/drupal/');

      exit;

    ?>

    Something is wrong with the XAMPP installation :-(

  3. Save the file.

Step 5Restart Apache

What happens when you do this? Apache will apply the changes you just made.

What you'll do:

Advertisement
  1. Go back to the XAMPP Control Panel.
  2. Stop Apache by clicking the Stop button.
  3. Start Apache again by clicking the Start button.

Step 6Start Drupal Installation

Starting the Drupal installation in your Drupal XAMPP Windows environment requires opening your web browser and going to http://localhost to launch the online setup wizard. You then follow the on-screen prompts to choose your language, set up your database connection, and finish building your site.

  1. Open your web browser and go to: http://localhost
  2. You should see the Drupal setup page.
  3. Choose your language and click Save and continue.
  4. Select the installation type (usually "Standard" works fine) and continue.
  5. Enter the database information you created earlier:
    • Database name: drupaldb
    • Username: drupaldbuser
    • Password: (the password you chose in Step 2)
    • Database host: leave this as localhost
  6. Continue and fill in your website's name.
  7. Create an admin username and password for yourself.
  8. Finish the setup. You now have your own Drupal site running locally!
Drupal choose language step
Drupal choose language step

Drupal installation profile step
Drupal installation profile step

Drupal database entry step
Drupal database entry step

Advertisement
Drupal site configuration step
Drupal site configuration step

Drupal setup complete
Drupal setup complete

Summary

  • Install XAMPP on your Windows 11 computer.
  • Create a database and user for Drupal using XAMPP's Shell or phpMyAdmin.
  • Download Drupal and put the files in a drupal folder inside htdocs.
  • Change the default page to redirect to Drupal.
  • Restart Apache to apply the changes.
  • Open your browser at http://localhost to complete Drupal setup.

Summarising the Drupal XAMPP Windows process helps ensure all essential steps are complete, from installing XAMPP and creating your database to placing the core files in the server folder and running the web installer. Reviewing these key checkpoints ensures your local website runs correctly.

Does Drupal run on Windows?

It is recommended to use Linux or a similar operating system for hosting Drupal websites. Windows is only supported for development environments. Running Drupal directly on Windows in a production environment is not supported.

Is XAMPP available for Windows?

XAMPP is a very easy to install Apache Distribution for Linux, Solaris, Windows, and Mac OS X.

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

Advertisement

📚 Related Tutorials

How to Install XAMPP on Windows 11
Windows How to Install XAMPP on Windows 11
Installing Joomla Locally with XAMPP on Windows 11
CMS Installing Joomla Locally with XAMPP on Windows 11
How to Start, Stop, and Restart Services in Windows 11
Windows How to Start, Stop, and Restart Services in Windows 11
Set Up WordPress Locally Using XAMPP on Windows 11
CMS Set Up WordPress Locally Using XAMPP on Windows 11

1 Comment

Leave a Comment

Your email address will not be published. Required fields are marked *