If you want to build and test a website on your own Windows 11 computer, you can install Drupal — a popular website builder — without needing a live internet connection. This guide will show you how to set up Drupal using XAMPP, a free program that creates a web server on your computer.
What is XAMPP?
XAMPP is a free program that includes everything you need to run websites on your own PC. It combines:
- Apache (the web server that shows your website)
- MariaDB (a database to store your website’s data)
- PHP (the programming language Drupal uses)
With XAMPP, you can run Drupal and other websites without needing internet access.
Step 1: Install XAMPP
If you don’t have XAMPP on your computer yet, follow this guide first:
Step 2: Create a Database for Drupal
Drupal needs a place to save all your website info. That’s the database. Let’s create one:
- Open the XAMPP Control Panel.
- Click the Shell button on the left side to open a command window.
- Type this and press Enter to open the database tool:
mysql -u root
- Next, type these commands one by one, pressing Enter after each. Replace your_password_here with a password you choose (remember it!):
CREATE DATABASE drupaldb CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER 'drupaldbuser'@'localhost' IDENTIFIED BY 'your_password_here';
GRANT ALL ON drupaldb.* TO 'drupaldbuser'@'localhost';
FLUSH PRIVILEGES;
exit

Tip: If you prefer not to use the command line, you can create the database and user using phpMyAdmin by clicking the Admin button next to MySQL in the XAMPP Control Panel.
Step 3: Download and Prepare Drupal
- Go to your
C:xampphtdocsfolder on your PC. - Create a new folder named
drupalinsidehtdocs. This is where Drupal files will live. - Download the latest Drupal version from the official site: Drupal Downloads.
- Extract the Drupal files you downloaded directly into the
drupalfolder.

Step 4: Change Apache’s Default Page to Your Drupal Site
By default, XAMPP shows a dashboard page when you open your local server. We want it to go straight to Drupal instead.
- Go to
C:xampphtdocsand open theindex.htmlfile with a text editor (like Notepad). - Replace the content with this code to redirect visitors to the Drupal folder:
<?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 :-(
Save the file.
Step 5: Restart Apache
Go back to the XAMPP Control Panel, stop Apache, then start it again. This will apply the changes you made.
Step 6: Start Drupal Installation
- Open your web browser and go to:
http://localhost - You should see the Drupal setup page.
- Choose your language and click Save and continue.
- Select the installation profile (usually “Standard” is fine) and continue.
- Enter the database details you created earlier:
- Database name:
drupaldb - Username:
drupaldbuser - Password: (the password you chose)
- Database host: leave as
localhost
- Database name:
- Continue and fill in your website’s name and create an admin username and password.
- Finish the setup and you will have your own Drupal site running locally!





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
drupalfolder insidehtdocs. - Change the default page to redirect to Drupal.
- Restart Apache to apply changes.
- Open your browser at
http://localhostto complete Drupal setup.
Now you have Drupal running on your computer! You can build and test your website safely before going live.





Leave a Reply