Notes regarding my local Drupal development environment on Ubuntu 20.04 LTS with WSL 2 on Windows

April 17, 2021

I’ve been working on getting my local Windows development up and running. Here’s some brief documentation of the steps I’ve followed.

Get WSL and Ubuntu installed

Install WSL on Windows 10 [https://docs.microsoft.com/en-us/windows/wsl/install-win10]

I was running Ubuntu 18.04 LTS from a while ago, so I updated to Ubuntu 20.04 LTS as the Linux distribution. If you’re just starting out, I recommend jumping right to Ubuntu 20.04. I also chose to run WSL 2, which is covered in the link above.

Install Drupal web server dependencies

Update all the things

apt update && apt upgrade && apt-get dist-upgrade

Install some utilities we’ll need

apt install git bash-completion tasksel

Install LAMP server

tasksel install lamp-server

Install additional PHP dependencies

apt install php7.4-curl php7.4-gd php7.4-mbstring php7.4-xml

Secure MySQL

mysql_secure_installation

Enable apache rewrite and restart:

a2enmod rewrite && service apache2 restart

Updating from Ubuntu 18.04 to Ubuntu 20.04

If this is something you need to do, here’s how I did it:

Note: Run all these steps as root: sudo -u root -s

Update all the things

apt update && apt upgrade && apt-get dist-upgrade

Update to Ubuntu 20.04 LTS

do-release-upgrade -d

Profile picture

Written by Jeff Beeman Goodjer, Sun Devil, Acquian, Drupalist. He/him. Doogiemac on most things. You should follow them on Twitter