Hey there!
So i’ve been searching for a way to use the php versions installed by LocalWP with composer.
After some research on different forums(like this one), the only approved answer i got was that local was using linux binaries (Where is PHP.exe?) (There is no such thing…Why did someone approved that).
I finally found it, there is 2 places where you can find your php.exe( and other ressources like nginx, appache, mariadb etc.)
- C:\Program Files (x86)\Local\resources\extraResources\lightning-services (If installed for all users. If not it is in App Data if i remembers,anyway this one is easy just click on you “Local” shortcut and do “Open File Folder” until you get trough the root Local folder)
There you will find the default ressources that comes already installed by local like:
-
php-7.3.5
-
mariadb-10.4.10
-
Etc…
but you wont find versions that wasn`t natively there like others post installed php versions(like 7.4.1).
- C:\Users\[your-user-name]\AppData\Roaming\Local\lightning-services
There you will find those versions:
-
php-7.4.1
-
apache-2.4.43
-
Etc…
So you can even add them to your path or use this for Composer.
I hope it can help you in some way!