Hey all, I haven’t see this solution posted in the forum so I’m adding it in. While I was able to get Local to run on my WSL2 ubuntu instance, the links in the app UI to open Adminer, MailPit, and the Site Shell don’t work.
For MailPit, I was able to access it using sudo netstat -tulnp
to find out which port MailPit was using, and then just going to it manually in the browser. For instance, my site was hosted on localhost:10008 and mailpit was on localhost:10005.
For the site shell, I had to go digging around in the app.asar file to figure out where the shell config script was hiding, but eventually I found it in the following directory ~/.config/Local/ssh-entry
. In that directory will be 2 files for each site (a bat and sh) with a random siteID for the name. By running bash ~/.config/Local/ssh-entry/YOURSITEID.sh
you can load the Local ssh shell in your normal shell. From here, you can now access the mysql server and use the wp-cli.
For future convenience I added an alias to my ~/.bashrc
file, so I can run the script easily. For example, adding alias localsite="bash ~/.config/Local/ssh-entry/YOURSITEID.sh"
to the bottom of the file means that next time i open a terminal, i just have to type localsite
and it’ll pull up the Local shell.
Hopefully this saves someone else pulling out their hair all afternoon!
Also would love to know if anyone has figured out how to successfully connect to adminer - for now I’m just using an external sql connector (TablePlus)