Install and Run Drupal 11 Locally – Beginner’s Setup Guide
In this step-by-step guide, we’ll show you how to install Drupal 11 on your local machine using XAMPP, Composer, and Drush. Perfect for beginners and developers setting up a modern CMS development environment.
🚀 Why Drupal 11?
- Open-source, flexible, and powerful CMS
- Ideal for enterprise-grade websites
- Improved UX, performance, and modern Symfony underpinnings
🧱 Prerequisites
- PHP 8.2 or later
- MySQL/MariaDB (XAMPP, WAMP, MAMP, or native)
- Composer (dependency manager for PHP)
📦 Step 1: Install Composer
Download and install Composer from:
https://getcomposer.org/download/
📁 Step 2: Create Drupal Project
Open terminal/command prompt and run:
composer create-project drupal/recommended-project my_drupal_site
It will create a project in my_drupal_site/ directory.
composer create-project drupal/recommended-project:^10 [project_name]
It will create a project in my_drupal_site/ directory.
🧰 Step 3: Start Local Server
Navigate into the project and start PHP’s built-in server:
cd my_drupal_site
php -S localhost:8888 -t web
Then visit: http://localhost:8888 in your browser.
🗄️ Step 4: Create Database
Use phpMyAdmin (via XAMPP/WAMP) to create a new database, e.g.,
drupal11_db
⚙️ Step 5: Drupal Installation Wizard
- Visit
http://localhost:8888 - Select language
- Choose “Standard” profile
- Enter database name, user (e.g.,
root), password (empty by default) - Complete site info and admin account
💡 Optional: Install Drush (Command Line Tool)
cd my_drupal_site
composer require drush/drush
Use Drush for tasks like:
./vendor/bin/drush cr # Clear cache
./vendor/bin/drush status # Site status
🧹 Bonus: Clean URLs with Virtual Host (XAMPP)
Add to httpd-vhosts.conf:
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/my_drupal_site/web"
ServerName drupal11.local
<Directory "C:/xampp/htdocs/my_drupal_site/web">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Then add to C:\Windows\System32\drivers\etc\hosts:
127.0.0.1 drupal11.local
Restart Apache and open: http://drupal11.local
✅ Conclusion
You’ve successfully installed Drupal 11 using Composer. This modern setup ensures better maintainability and easier upgrades. Now you can start building powerful and scalable websites using the latest Drupal framework!
