Local provides a version of php, correct? Please help me....!

What issue or error are you experiencing?

I am having difficulty regarding php files being recognized in the editor I am using and it keeps saying I have to specify the path to the php executable (which I still have yet to find). I have tried researching other forums associated with my code editor, associated with wordpress, and just online in general and have come up with NOTHING useful or that has even come close to fixing the issue… So basically my code editor thinks php is not valid or does not exist or whatever (please forgive me for not knowing how to properly word some things for I am fairly new to all of this stuff) – and I thought that Local WP provided php and mysql…wouldn’t that mean if Local is open and running, that my editor should be able to detect that php exists when I have a folder open for a wp site created on Local? Or am I way off base with this?

What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

The code editor I am using is VS Code and I am using the most current version of Local. I have tried adding the Intelliphesense (not sure I spelled that correctly) and the Intellisense plugins, neither worked (the 1st one gives me errors when activated and I will attach a screenshot of this) - I have tried disabling the built-in php stuff, that didn’t work either - I have tried locating the php executable file in I don’t even know how many ways now, and always come up empty handed - I don’t even know what else I have done anymore…but I have done piles and piles of varius methods and suggestions, but here I am still looking (and I am runnin out of time).
Asking this forum is my last ditch effort to figure this out before I fail the class I am in rt now, so I hope someone out there can help… I will attach the errors I am recieving ----hopefully someone can guide me in the right direction… thank you in advance for your time…

System Details

  • Local Version: the most recent version

  • Operating System (OS) and OS version: windows 10 on an HP Probook

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)

local-lightning.log (655.4 KB)
php error 3
php error 4
php error 1
php error 2

Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

I know the images are showing vs code, but my problem always winds back to accessing php and supposedly php should be directly related to or within Local… i couldn’t get any answers anywhere else, so I am trying here as a last ditch effort…

Hi @katie09

Sharing my comment on a similar post here where the same error was popping up. If you try using our Xdebug + VS Code extension, that might help get you going. More details here:


I’m running VS Code on macOS and I have to do three things.

  1. Create a symbolic link so the php executable is in the path.

sudo ln -sf /Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-8.1.9+8/bin/darwin/bin/php /usr/local/bin/php

Or depending on which php version you are using.

sudo ln -sf /Users/Name/Library/Application\ Support/Local/lightning-services/php-8.2.8+0/bin/darwin/bin/php /usr/local/bin/php

  1. Tell VS Code where to find the the Local php executable.

"php.validate.executablePath": "/usr/local/bin/php"

This is the symbolic link to the php executable I created in step 1.

  1. Add the WordPress installation path so Intelephense can index.

I guess you have to do something similar on Windows 10.

1 Like


  1. I think you have to add wordpress to Intelephense stubs settings.
1 Like

Sorry, I was too fast and copied the link to the the php executable from some old notes. If you are running Apple Silicon you have to replace darwin with darwin-arm64 in the link.

sudo ln -sf /Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-8.1.9+8/bin/darwin-arm64/bin/php /usr/local/bin/php

1 Like

awesome! thank you so much! exactly what I needed to know and have been endlessly searching for!! I appreciate your time


Thank you very much for your time and your instructions! I was able to correct the problem!!


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.