How to run a local Linux web server running in a Windows 11 window

local Linux web server in Windows
(Image credit: Future)

If you're building a website or programming web tools using PHP, MySQL or other common languages, it helps to have a test site you can run on your local PC. However, most web hosting services, including the best web hosting services, use Linux, not Windows as their hosting environments. But what if you have a Windows PC and want to build a site that's going to live on a Linux server?

We have good news. Using Windows 11 or 10's built-in Windows Subsystem for Linux (WSL) service, you can create a local Linux web server that you can use locally for testing and building a site. You simply run Linux in a window and then you can visit the website in your Windows-based web browser and edit the key HTML, PHP or other files in a Windows-based editor (ex: Notepad++, my fave). You can even navigate your Linux server's file system using Windows Explorer.

Latest Videos FromTom's Hardware
Avram Piltch
Managing Editor: Special Projects

Avram Piltch is Managing Editor: Special Projects. When he's not playing with the latest gadgets at work or putting on VR helmets at trade shows, you'll find him rooting his phone, taking apart his PC, or coding plugins. With his technical knowledge and passion for testing, Avram developed many real-world benchmarks, including our laptop battery test.