To work on a new feature for the website, I prefer to work locally. This avoids internet delays and provides easy access to files. However, developing locally requires integrating various tools. For example, I use Visual Studio Code connected to GitHub. I want to test directly on the website by navigating to my local development site with a browser. Since everything runs on my work laptop, I also want the ability to quickly undo all changes and uninstall everything.
This blog explains how to set up the necessary components to develop a local WordPress website using Visual Studio Code. The WordPress website runs on a Linux system, so I use Windows Subsystem for Linux (WSL) to host the website and test all related Linux components.
Examples
Example of Microsoft Visual Studio Code, with integrated Ubuntu terminal, CoPilot to boost development, and a project folder that is connected to GitHub.

Example of Windows Terminal, WSL: Ubuntu and Midnight Commander

Example of local development website.

Setup
Check your Windows 11 configuration settings first. We need to activate Hyper-V, Windows Hypervisor, Virtual Machine Platform and Windows-subsystem for Linux.

Now go to the Microsoft app store and download your Ubuntu version of choice. After download, open the App, this will start the installation of Ubuntu. Installing takes a few minutes. Provide a username and password.

You can now start a Windows Terminal with Ubuntu.

Alternatively open a Power Shell (as Administrator) and install WSL manually.
wsl --install
What’s next
In the next blogs you can learn more about adding and configuring the necessary Apps to Ubuntu to get a similar setup as shown in the examples.
- Ubuntu Apps: Apache, Midnight Commander, and more
- WordPress database
- PHP
- Configure an Apache development website
- WordPress