
I can’t find any working guide to do it properly. I found (kinda) incomplete article (link below), but not fully working. So I created this article as my own guide/notes.
Please also check this: https://medium.com/@echernicky/setting-up-a-local-wp-wsl-ubuntu-environment-9e7bdc6e9dbd
Prerequisites
Before proceeding, ensure you have WSL2 (Windows Subsystem for Linux 2) and Ubuntu installed on your Windows 11 machine.
Install Required Dependencies
Once WSL2 and Ubuntu are set up, open your Ubuntu terminal and run the following commands to install the necessary dependencies for Local WP:
Install libtinfo5
and libncurses5
:
wget http://archive.ubuntu.com/ubuntu/pool/main/n/ncurses/libtinfo5_6.4-2_amd64.deb
sudo dpkg -i libtinfo5_6.4-2_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/n/ncurses/libncurses5_6.4-2_amd64.deb
sudo dpkg -i libncurses5_6.4-2_amd64.deb
Install other required libraries:
udo apt install libaio1
sudo apt install libnss3-tools
sudo apt install libasound2
sudo apt install libasound2-dev
sudo apt install libnuma1
sudo apt install policykit-1
sudo apt install libgbm-dev
Connect WSL/Ubuntu to your browser
sudo apt install xdg-utils
sudo apt install wslu
Add windows11 browser as browser in linux (check the path):
wslview -r $(wslpath -au ‘C:\Program Files\Google\Chrome\Application\chrome.exe’)
Install Local (check the version)
Download it here.
sudo dpkg -i local-9.2.5-linux.deb
Fix nginx capabilities
Find current nginx version:;
ls ~/.config/Local/lightning-services | grep nginx
Command:
sudo setcap cap_net_bind_service=+ep ~/.config/Local/lightning-services/{NGINX_VERSION}/bin/linux/sbin/nginx
Note: you’ll need to update hosts file in windows manually.
For Each Sites:
All sites will not be connected correctly to the socket, to do this, every time we create a site, we will need to update wp-config.php and add the Database Socket to the DB_HOST
setting. To do so, go to the “Database” tab of your site on Local, and copy the Socket path:


Other Setup:
Install WP-CLI
sudo apt install php php-mysql php-xml php-cli php-zip zip php-curl php-mbstring mysql-server
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
Updating Local
(basically simply download the latest version and install it + update caps for nginx)
wget https://cdn.localwp.com/releases-stable/XXXX/local-XXXX-linux.deb
sudo dpkg -i local-XXXX-linux.deb
sudo setcap cap_net_bind_service=+ep ~/.config/Local/lightning-services/{NGINX_VERSION}/bin/linux/sbin/nginx