Advice for local project

Guys any suggestions for vscode extensions or settings for PHP code running in browser. It is getting more difficulty for me to check the code is running or not here. I have tried live server extensions some youtube recommendations also doesn’t work for me for longer projects i was using some replt or phpsandbox websites. but i want to test them in my local environment. And XAMPP htdocs is not good for me as i might save them in different paths as some having storage issues and other issues. If you anything please share with me…

1 Like

PHP cannot run in the browser, so I’m not sure what you are trying to do.

Can you explain a bit better and perhaps provide some code examples.


In fact, they can, just don’t rely on it. And currently the only project (in my knowledge) actively maintaining such is the WordPress Playground.


I see you’ve already discarded XAMPP, but I would really like to urge you to try it again. Having a local development sever is by far the most convenient solution to build and test your website, because you don’t have to worry about syncing local code to a live server to test it.

And yes, XAMPP isn’t exactly identical to our hosting, but as long as you use the same PHP version, it should be close enough to catch 99% of all errors before publishing.

I’m not sure what issues you’re referring to exactly. But I can tell you that hardcoding specific paths on our server in your website is a bad idea, because you’ll have a very hard time hosting your anywhere else for any reason. You should not need this if you use relative paths, or just have a shared config file.