Avatar of curiouswebster
curiouswebster
Flag for United States of America asked on

PHP: How to configure a PHP localhost Dev Environment on Windows 10?

I need to create a PHP Dev Environment, running on localhost, hosted in Windows 10.

What steps are there which I need to follow?

I assume I would use Visual Studio Code. What Extensions do I need to VSCode to be my PHP Dev tool? 

Thanks
LinuxWindows 10PHPWindows OSVisual Basic Classic

Avatar of undefined
Last Comment
Cyril Joudieh

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Cyril Joudieh

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
curiouswebster

ASKER
Thanks. Is there any risk to just installing WAMP server?

Once I get those installed, I will see how far I get and post any questions here...
SOLUTION
Chris Stanyon

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
David Favor

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
curiouswebster

ASKER
I do plan to set up a dev site adjacent to my production site. But, I assumed that such a site would not be so easy for me to get instance access to changes, like I can when running from localhost. And, I do want to have localhost development in the event I have no Internet access.

So, localhost seems much easier on Windows than a Mac, so I am okay using WAMP Server, if that lets me develop in Windows with no Internet access. Then, I can do periodic tests on my dev site, adjacent to my production site.

Make sense?
SOLUTION
Cyril Joudieh

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Chris Stanyon

A Local environment really is a fundamental part of the development stack.

Generally speaking, if you want to have a particularly robust system, you'll likely have 3 environments - Local, Staging and Production.

Local is where you'll do the majority of your coding and testing. It's integrated with your IDE of choice, and allows you to run full test / debug sessions. It's where you'll install all of your Project's development dependencies. It's where you'll build your app. Periodically, you'll push your app to Staging for 'live' testing, previews etc, and from there, you'll push to Production..

How you set up that Local environment may well depend on your own needs and workflow. The WAMP Server route is a really quick and easy way to get up and running - effectively a one-click install and you're good to go. If your development is relatively straight-forward, then you may develop using that for years to come. The ease of WAMPServer does however sacrifice some flexibility.

A much more flexible and powerful setup is to use the built-in Windows Subsystem for Linux (WSL) and/or Docker. This allows you to set up a fully-functioning, isolated Linux development platform right on your Windows PC. Your IDE (VSCode!) interacts directly with the subsystem and you can easily swap out various parts of the stack (different versions of PHP for example).

It's a little more complicated to setup, but once done - it's really powerful. If you also install Git into the system, pushing from local to staging can be a simple as a one-line command :)
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Cyril Joudieh

Visual Studio Code makes Git very easy. There are also extensions to visually make data easier if you work with JSON, CSV, ... Visual Studio Code usually prompts you for extensions based on how you use it.