<p>First of all, I am also a Mac user. But these should be available for Windows too.</p>

<p>Start reading about virtualization. So, you won't install the web server directly on your machine but on a virtual box installed on your machine.</p>

<p>A good starting point could be <a href="https://www.vagrantup.com/" rel="nofollow noreferrer">vagrant</a> (which is becoming a bit antiquated more and more, but which is still worth a try since it's working like a charm).<br>
What's getting more and more into many developers' focus is <a href="https://www.docker.com/" rel="nofollow noreferrer">docker</a>. Many of my customers have been introducing it in their developer teams the last years.</p>

<p>Hope that helps. It's a lot to read though… </p>

CC BY-SA 3.0
2018-04-18T15:34:04.897Z
2018-04-18T15:34:04.897Z
Arvid
<p>I just use the included IIS on Windows 10 for development. Install MySQL and PHP and all runs fairly smoothly.</p>
<p>Just recently recently configured this on a new Win10 machine and made a note of another couple of points:</p>
<ol>
<li><p>Make sure that IIS_IUSRs has full permission to: c:\Windows\Temp and the directory where you will hold your development websites.</p>
</li>
<li><p>After up and running if you try to update a plugin within the Control panel you might get a curl error. This should resolve it: <a href="https://martinsblog.dk/windows-iis-with-php-curl-60-ssl-certificate-problem-unable-to-get-local-issuer-certificate/" rel="nofollow noreferrer">https://martinsblog.dk/windows-iis-with-php-curl-60-ssl-certificate-problem-unable-to-get-local-issuer-certificate/</a></p>
</li>
</ol>
<p>All running smoothly now!</p>

CC BY-SA 4.0
2021-01-19T14:44:03.243Z
2021-01-19T14:44:03.243Z
mmc501
<p>Virtualization is a good idea. This way you can easily replicate your environment on different machines. </p>

<p>I would recommend using Docker as well. I personally use <a href="https://github.com/LaraDock/laradock" rel="nofollow noreferrer">Laradock</a> as development environment. But you could use other or build your own. Which I don't recommend for beginners. </p>

<p>So here is how to start:
Install Docker, install Docker Compose, download Laradock, configure it and start MySQL and Nginx/Apache. PHP starts automatically. </p>

<p>Note: When you set up your DB connection in Craft's config remember it is not <code>localhost</code> but <code>mysql</code>. Because this is the name of the running MySQL container. </p>

CC BY-SA 4.0
2018-07-11T14:00:39.367Z
*offtopic* Hi there, I cannot not comment and must say "hello" to a fellow whose heart is beating for HRO, apparently. As a born Rostocker (living in Hamburg right now) I just have no choice. To make a long story short: Moin moin, Hanseat! :)
Arvid
CC BY-SA 4.0
2018-07-14T12:04:28.623Z
Moin moin back! Tried to pm you but man, your contact is hard to find. To stay on topic, what kind of projects do you do with Craft, in a virtualized development environment of course :)
Johannes
CC BY-SA 4.0
2018-07-14T14:30:39.810Z
Can't tell in detail due to NDAs with my customers. Mainly we use Craft to build usual websites, also for pretty big companies (as well as small ones, of course), then there are content hubs and websites for ad campaigns. Actually we build everything with Craft where the company needs an easy-to-use admin panel, multi-lang-support and not that much of individual development (which I personally prefer Symfony for). In single cases we use WordPress instead (only if explicitly requested for several reasons). … PM? Yeah, that's a missing feature on StackExchange, right? Try "arvid@" my website.
Arvid
CC BY-SA 3.0
2018-04-23T05:56:51.413Z
2018-04-23T05:56:51.413Z
Johannes
<p>Edit: I would now recommend checking out Nitro 2! A tailored development environment for Craft, by Pixel and Tonic themselves. It is based on Docker but does most of the heavy lifting for you, so you don't even have to worry too much about that side.</p>
<p><a href="https://craftcms.com/docs/nitro/2.x/" rel="nofollow noreferrer">https://craftcms.com/docs/nitro/2.x/</a></p>
<p>I'll leave my original rationale and info around issues with Windows environments and why something Docker based is the way to go.</p>
<hr />
<p>I've had a bit of experience with development environments on Windows and it can be a little bit tricky compared to macOS or Linux, because ultimately the Windows filesystem tends to be a problematic for virtualised setups, which I'll explain in more detail below.</p>
<p>First I would say you want to use virtualisation despite my initial statement above. No one should be having to locally configure any form of dev environment these days, messing around with config files etc. MAMP while it does provide GUI and easy way to tweak it, no one has time for that. You ideally want to have a repeatable and easy one command provision process, where all of this is done for you. You want to be able to completely tear down your dev environment and be able to rebuild it in a matter of minutes not hours.</p>
<p>I've tested Vagrant, Nanobox and more recently Docker on Windows. I would recommend Docker because of it's WSL2 ties now. Previously Docker on Windows relied on Hyper-V but now with WSL support (Windows Subsystem for Linux) Docker becomes more attractive and much lighter weight. Because Docker and WSL are tied to the same Linux kernel running within Windows (Yes Windows has a Linux kernel running inside itself now!) meaning performance wise you'll get much better response times from apps than Vagrant or Nanobox can ever achieve. I found Craft 3 to be horribly slow (even with dev mode off) and I'm afraid it is combination of the VM abstraction layer and the Windows filesystem (it sucks for VMs).</p>
<p>Vagrant and Nanobox both struggle because they require a full VM layer pointing to a Windows filesystem mountpoint, this is where your dev environment is hurt on Windows. The Windows filesystem is a pain in the arse when virtualisation is concerned. You will find issues with certain tools i.e. npm with symlinks and many other Windows specific stuff. There's even been specific issues directly impacting Yii2, which did get fixed, but just shows you that Windows can be evil: <a href="https://github.com/craftcms/cms/issues/4355" rel="nofollow noreferrer">https://github.com/craftcms/cms/issues/4355</a></p>
<p>Docker has the advantage of WSL support and having the concept of containers. So think all the services needed like Apache/nginx (webserver), MySQL/Postgres (database backend), PHP-FPM etc, these can all be in their own containers rather than a single VM in comparison. This has the advantage of being able to swap out or change only certain elements when needed. Example: Fancy switching from Apache to NGINX? Easy, just change you web server container. Want to go to Postgres instead of MySQL? Cool, just switch your DB container.</p>
<p>With Docker, you can literally script the entire process with a <code>docker-compose.yml</code> and <code>Dockerfile</code> to automate the build and provisioning of a development environment. There are also great resources from the community around Docker. Even Pixel and Tonic have official purpose build docker images for Craft CMS 3 development.</p>
<p><a href="https://github.com/craftcms/docker" rel="nofollow noreferrer">https://github.com/craftcms/docker</a></p>
<p>The documentation on how to use them is a little lacking currently, but there's also an excellent walkthrough from Andrew Welch around a complete walkthrough of Docker environment: <a href="https://nystudio107.com/blog/an-annotated-docker-config-for-frontend-web-development" rel="nofollow noreferrer">https://nystudio107.com/blog/an-annotated-docker-config-for-frontend-web-development</a>, other Craft CMS developers have shared their Docker setups as well. A lot of them share the same common foundation, but may differ in some areas depending on requirements.</p>
<p>The end result, you can literally run one command <code>docker-compose up</code> and everything else is provisioned for you. So that's why I'd recommend Docker. While it is a VM like Vagrant and Nanobox, it's about as lightweight as it can get, coupled with WSL2, I'm pretty sure it's going to be the fastest environment as well (aside from running natively on something like IIS).</p>
<p>The alternative would be running an environment on the host directly without virtualisation to avoid issues with volume mounts and such, this however puts more liability on yourself to configure things however, which as per my original statement, nobody has time for that! But you could even use IIS which is the native web server for Windows.</p>

CC BY-SA 4.0
2021-01-15T10:34:12.423Z
2021-03-02T19:37:12.567Z
2021-03-02T19:37:12.567Z
James White
<p>I was wondering what people who are developing on Windows 10 are using as webserver environment in 2018? I have had ok results previously using ampps, but I'm having a lot of problems with Craft 3 as of lately. With 500 internal server errors etc. Also, I'm developing on several PCs, syncing the projects with Git.</p>
<p>A friend of mine recommended Laravel Valet and homestead, but he's on Mac. And installation on Windows seems to be a lot trickier. I've tried Mamp too, but have really bad experience with that one.</p>

CC BY-SA 3.0
2018-04-18T15:00:44.763Z
I've used XAMPP for Craft 2; just trying to get Craft 3 up and running locally for the first time today, with no success yet. [insert shrug emoji here]
Sandwich
CC BY-SA 3.0
2018-04-18T15:07:02.110Z
Not sure if this could eventually count as primary opinion based question => reason to close... however I use XAMPP. I never had any issues with installing Craft 2/3 or anything else. XAMPP for the win. I don't even know there are any issues at all while installing Craft
Robin Schambach
CC BY-SA 3.0
2018-04-18T16:45:53.010Z
As a follow-up to the issues I had been encountering, they were due to running multiple PHP versions from one XAMPP install. PHP 5.6 (which XAMPP installed with) came with the proper Windows-formatted paths in `php.ini`, but when I added PHP 7.1 and 7.2 manually, I didn't change their paths accordingly. Windows needs the drive letter before the path; merely referencing the root via ```\``` is insufficient, you need ```c:\``` (or whatever drive letter is relevant).
Sandwich
CC BY-SA 3.0
2018-04-18T20:57:09.893Z
FWIW, I do the majority of my Craft dev on Win10 using native IIS and standalone PHP, MySQL/PostgreSQL without issues.
Brad Bell
<craft3><server><environments>
Craft 3 - Recommended development environment for Windows?
# Craft 3 - Recommended development environment for Windows?

(Asked by: username_0 on 2018-04-18)

I was wondering what people who are developing on Windows 10 are using as webserver environment in 2018? I have had ok results previously using ampps, but I'm having a lot of problems with Craft 3 as of lately. With 500 internal server errors etc. Also, I'm developing on several PCs, syncing the projects with Git.

A friend of mine recommended Laravel Valet and homestead, but he's on Mac. And installation on Windows seems to be a lot trickier. I've tried Mamp too, but have really bad experience with that one.

**Tags:** craft3, server, environments
> **Comments:**
> **username_1**: I've used XAMPP for Craft 2; just trying to get Craft 3 up and running locally for the first time today, with no success yet. [insert shrug emoji here]  
> **username_2**: Not sure if this could eventually count as primary opinion based question => reason to close... however I use XAMPP. I never had any issues with installing Craft 2/3 or anything else. XAMPP for the win. I don't even know there are any issues at all while installing Craft  
> **username_1**: As a follow-up to the issues I had been encountering, they were due to running multiple PHP versions from one XAMPP install. PHP 5.6 (which XAMPP installed with) came with the proper Windows-formatted paths in `php.ini`, but when I added PHP 7.1 and 7.2 manually, I didn't change their paths accordingly. Windows needs the drive letter before the path; merely referencing the root via ```\``` is insufficient, you need ```c:\``` (or whatever drive letter is relevant).  
> **username_3**: FWIW, I do the majority of my Craft dev on Win10 using native IIS and standalone PHP, MySQL/PostgreSQL without issues.  

---

## 4 answers

### Answer by username_4 on 2018-04-18. Score: 1 | Accepted answer

First of all, I am also a Mac user. But these should be available for Windows too.

Start reading about virtualization. So, you won't install the web server directly on your machine but on a virtual box installed on your machine.

A good starting point could be [vagrant](https://www.vagrantup.com/) (which is becoming a bit antiquated more and more, but which is still worth a try since it's working like a charm).  
What's getting more and more into many developers' focus is [docker](https://www.docker.com/). Many of my customers have been introducing it in their developer teams the last years.

Hope that helps. It's a lot to read though…


---

### Answer by username_5 on 2021-01-19. Score: 2

I just use the included IIS on Windows 10 for development. Install MySQL and PHP and all runs fairly smoothly.

Just recently recently configured this on a new Win10 machine and made a note of another couple of points:

1. Make sure that IIS\_IUSRs has full permission to: c:\Windows\Temp and the directory where you will hold your development websites.
2. After up and running if you try to update a plugin within the Control panel you might get a curl error. This should resolve it: <https://martinsblog.dk/windows-iis-with-php-curl-60-ssl-certificate-problem-unable-to-get-local-issuer-certificate/>

All running smoothly now!


---

### Answer by username_6 on 2018-04-23. Score: 1

Virtualization is a good idea. This way you can easily replicate your environment on different machines.

I would recommend using Docker as well. I personally use [Laradock](https://github.com/LaraDock/laradock) as development environment. But you could use other or build your own. Which I don't recommend for beginners.

So here is how to start:
Install Docker, install Docker Compose, download Laradock, configure it and start MySQL and Nginx/Apache. PHP starts automatically.

Note: When you set up your DB connection in Craft's config remember it is not `localhost` but `mysql`. Because this is the name of the running MySQL container.

> **Comments:**
> **username_4**: *offtopic* Hi there, I cannot not comment and must say "hello" to a fellow whose heart is beating for HRO, apparently. As a born Rostocker (living in Hamburg right now) I just have no choice. To make a long story short: Moin moin, Hanseat! :)  
> **username_6**: Moin moin back! Tried to pm you but man, your contact is hard to find. To stay on topic, what kind of projects do you do with Craft, in a virtualized development environment of course :)  
> **username_4**: Can't tell in detail due to NDAs with my customers. Mainly we use Craft to build usual websites, also for pretty big companies (as well as small ones, of course), then there are content hubs and websites for ad campaigns. Actually we build everything with Craft where the company needs an easy-to-use admin panel, multi-lang-support and not that much of individual development (which I personally prefer Symfony for). In single cases we use WordPress instead (only if explicitly requested for several reasons). … PM? Yeah, that's a missing feature on StackExchange, right? Try "arvid@" my website.  

---

### Answer by username_7 on 2021-01-15. Score: 1

Edit: I would now recommend checking out Nitro 2! A tailored development environment for Craft, by Pixel and Tonic themselves. It is based on Docker but does most of the heavy lifting for you, so you don't even have to worry too much about that side.

<https://craftcms.com/docs/nitro/2.x/>

I'll leave my original rationale and info around issues with Windows environments and why something Docker based is the way to go.

---

I've had a bit of experience with development environments on Windows and it can be a little bit tricky compared to macOS or Linux, because ultimately the Windows filesystem tends to be a problematic for virtualised setups, which I'll explain in more detail below.

First I would say you want to use virtualisation despite my initial statement above. No one should be having to locally configure any form of dev environment these days, messing around with config files etc. MAMP while it does provide GUI and easy way to tweak it, no one has time for that. You ideally want to have a repeatable and easy one command provision process, where all of this is done for you. You want to be able to completely tear down your dev environment and be able to rebuild it in a matter of minutes not hours.

I've tested Vagrant, Nanobox and more recently Docker on Windows. I would recommend Docker because of it's WSL2 ties now. Previously Docker on Windows relied on Hyper-V but now with WSL support (Windows Subsystem for Linux) Docker becomes more attractive and much lighter weight. Because Docker and WSL are tied to the same Linux kernel running within Windows (Yes Windows has a Linux kernel running inside itself now!) meaning performance wise you'll get much better response times from apps than Vagrant or Nanobox can ever achieve. I found Craft 3 to be horribly slow (even with dev mode off) and I'm afraid it is combination of the VM abstraction layer and the Windows filesystem (it sucks for VMs).

Vagrant and Nanobox both struggle because they require a full VM layer pointing to a Windows filesystem mountpoint, this is where your dev environment is hurt on Windows. The Windows filesystem is a pain in the arse when virtualisation is concerned. You will find issues with certain tools i.e. npm with symlinks and many other Windows specific stuff. There's even been specific issues directly impacting Yii2, which did get fixed, but just shows you that Windows can be evil: <https://github.com/craftcms/cms/issues/4355>

Docker has the advantage of WSL support and having the concept of containers. So think all the services needed like Apache/nginx (webserver), MySQL/Postgres (database backend), PHP-FPM etc, these can all be in their own containers rather than a single VM in comparison. This has the advantage of being able to swap out or change only certain elements when needed. Example: Fancy switching from Apache to NGINX? Easy, just change you web server container. Want to go to Postgres instead of MySQL? Cool, just switch your DB container.

With Docker, you can literally script the entire process with a `docker-compose.yml` and `Dockerfile` to automate the build and provisioning of a development environment. There are also great resources from the community around Docker. Even Pixel and Tonic have official purpose build docker images for Craft CMS 3 development.

<https://github.com/craftcms/docker>

The documentation on how to use them is a little lacking currently, but there's also an excellent walkthrough from Andrew Welch around a complete walkthrough of Docker environment: <https://nystudio107.com/blog/an-annotated-docker-config-for-frontend-web-development>, other Craft CMS developers have shared their Docker setups as well. A lot of them share the same common foundation, but may differ in some areas depending on requirements.

The end result, you can literally run one command `docker-compose up` and everything else is provisioned for you. So that's why I'd recommend Docker. While it is a VM like Vagrant and Nanobox, it's about as lightweight as it can get, coupled with WSL2, I'm pretty sure it's going to be the fastest environment as well (aside from running natively on something like IIS).

The alternative would be running an environment on the host directly without virtualisation to avoid issues with volume mounts and such, this however puts more liability on yourself to configure things however, which as per my original statement, nobody has time for that! But you could even use IIS which is the native web server for Windows.


---

