Drag
How to Install Drupal on Windows Using DDEV? How to Install Drupal on Windows Using DDEV?
Sundew
Author Sundew
Date December 12th, 2024
Time to Read 4 min.
Technology

How to Install Drupal on Windows Using DDEV?

by Sundew

Setting up Drupal on Windows can be a seamless process with the right tools at your disposal. DDEV, a powerful and user-friendly local development environment, makes it easier than ever to install Drupal on Windows

This step-by-step approach provides a clear and professional roadmap to get your Drupal site up and running effortlessly. 

Let’s dive in and simplify your development journey!

What is Drupal?

Drupal is a powerful tool for building websites and applications. What makes it special is its flexibility and scalability. While you can use Drupal’s core features for easy content management and robust security, the ability to extend and customize it sets it apart.

Drupal is designed to be modular. This means you can add extra features with thousands of available modules, tailor the look of your site with various themes, or use pre-packaged distributions as a starting point. 

Whether you’re looking to integrate it with other services or build a unique digital framework, Drupal’s flexibility lets you create a tailored experience that meets your needs. It’s a go-to choice for anyone needing a robust, adaptable content management system.

DDEV: An Introduction

DDEV is an open-source platform designed to simplify the development, testing, and deployment of PHP-based web applications, including Drupal.

Drupal development with XAMPP vs Docker: Which is Better?

When setting up a local development environment, you can choose between Docker with Windows Subsystem for Linux (WSL) or XAMPP for Drupal installation on Windows. 

Here’s a quick comparison:

 

WSL with Docker

XAMPP

         Pros

Consistent across different environments

Simple and easy to install

Isolates applications and dependencies

Provides an all-in-one package with Apache, MySQL, PHP, and Perl

Great for complex, scalable projects

Quick setup for smaller projects

         Cons

Steeper learning curve

Less flexible and scalable

More setup time

Can lead to conflicts with multiple projects

 

To install Drupal on Windows, your choice depends on your needs: Docker with WSL2 offers unmatched flexibility and scalability, while XAMPP provides a simpler, faster setup for quick deployment.

 

Installing DDEV on Windows Using WSL2

Note:- Please Enable HypervisorPlatform and Windows Subsystem for Linux Options by visiting Turn Windows features on or off.

Step 1: Install WSL.

Step 2: Verify that you have an Ubuntu distro set as default by running
wsl.exe -l -v  .If you have WSL2 but not an Ubuntu distro, install one by running  wsl.exe --install Ubuntu       

Step 3: Verify that your Ubuntu default distro is WSL v2 using wsl -l -v 

Step 4: In an administrative PowerShell, run this PowerShell script by executing:

 

In the Windows Update settings, navigate to Advanced Options and activate the option to Receive updates for other Microsoft products. 

 

This ensures your system stays up-to-date with the latest features and security patches beyond Windows itself.

 

Additionally, it's a good idea to periodically run the command wsl.exe --update to manually check for and apply any updates to the Windows Subsystem for Linux (WSL).

 

Once set up, you can access your Ubuntu distribution using either the Ubuntu terminal app or the Windows Terminal. 

 

Your Ubuntu distribution should have DDEV and Docker fully operational, providing a seamless development environment on your Windows machine.

 

Step 5: Check ddev and docker are working or not using:

 

 

Drupal Installation on Windows Using DDEV

 

Step 1: Open terminal access WSL using the command:

 

Step 2: Create a folder and give that folder read and write permission using the sudo command:

For creating Drupal:

 

For checking permission:

 

Step 3: Once the folder is created and permission is set, then download Drupal.

To download Drupal Core, its libraries, and other dependencies, run this command:

 

Step 4: Now download one final component called Drush.

 

Step 5: After Drupal installation on Windows, launch your Drupal site by running the following command, which will automatically open it in a browser:

 

You will come across the default Drupal installation wizard.

 

 

Step 6: Checking Your Permissions (if asked for permissions)

During the process to install Drupal on Windows or upon loading the welcome page, you may encounter a warning related to the permission settings of the /sites/default directory and the settings.php file inside it.

 

After the installation, Drupal will attempt to adjust the permissions of the /sites/default directory to make it readable and executable for all groups (permission mode 555)

 

Additionally, the system will try to set the settings.php file to read-only (permission mode 444)

 

If this warning appears, it is crucial to manually apply the necessary permissions using the following chmod commands from your project’s root directory:

 

Failure to correct these permissions could expose your site to security vulnerabilities. Make sure to execute these commands to ensure your site remains secure.

 

 

With the above guide, it doesn’t have to be a daunting task to install Drupal on Windows using DDEV. By following these steps, you can set up a robust, local development environment that’s both efficient and reliable. Whether you’re a beginner or a seasoned developer, this approach will streamline your workflow and set the foundation for success. 

Email us or Talk to us at +91-98367-81929 or Simply Contact Us through the website.