Switching to Windows for Local WordPress Development

#

As you may have noticed from reading our blog, we’ve highly favored Mac and Linux for WordPress development. And we’re not alone – through my incredibly scientific, highly anecdotal research, most other WordPress developers seem to be using Mac as well.

And that’s for good reason – Mac “Just Works” when setting it up for development. It has PHP and Ruby installed, has a Linux-ish command line, and it looks great!

Cat on Mac

While I’ve been happy with developing on Mac systems for 5 years now, I’ve recently decided to make the switch back to Windows. In this week’s article, I take a look at how (and why) I made the switch.

Why the switch to Windows?

The main reason I started considering the switch to Windows was the state of Macs lately. I really wanted to like the new MacBook Pro, but the constant reports of battery life issues and breaking keyboards has turned me away from them. The touch bar is a nice idea in theory but is relatively useless aside from being a shiny feature to make the newest Macbooks feel like more of an upgrade.

The iMacs are nice, but I’m not a fan of the shift from a dedicated tower and monitor to an all-in-one. All-in-ones are harder, if not impossible to maintain yourself, and repairs can be costly. The design of the current Mac Pro and the new iMac Pros show that Apple is committed to this path of making things look better despite sacrifices in performance and reliability.

They are still great computers (I love my iMac 5k), but spending $3,000 every 5 years or so just doesn’t make sense when you should be able to upgrade parts as needed, and replace them on your own if they wear out.

I’ve long been using a custom-built Windows PC for gaming, so I’ve decided to switch to that as my main development machine and demote my old iMac to a family computer. After making the switch, I had some research to do!

Virtualization, Windows Linux Subsystem, or barebones?

There are a few ways to get started with development on Windows. Windows 10 Pro includes Hyper V, which lets you run containers with different operating systems. I gave Linux a shot but found that I’m not really fond of the virtualization. It’s slow and is another layer between your computer and your files. Some users may view that as a benefit, but after years of development using tools like MAMP, it’s not for me.

Another option is Windows Subsystem for Linux – a program you can install that allows you to run Linux natively on your Windows machine. This is a nice option but requires a lot of setup. Like running a virtualized container, the Linux side of things doesn’t run as fast and tasks that would take a few seconds in a dedicated Linux box or in macOS can take much longer. And because it runs alongside Windows, I found it more confusing than a virtualized instance of Linux or good ol’ dual booting.

I ultimately decided to go with Local by Flywheel and keep using Windows as the primary OS for development. I like having a GUI for server-related stuff, and it lets me work on my files directly in Windows as opposed to in a virtualized Linux environment.

If I were developing websites or applications for one specific server, I’d likely use something like Docker (even though Gilbert prefers Vagrant). But since I develop plugins that will ultimately run on all kinds of servers, I don’t need to emulate a specific environment, so the GUI and simplicity of site setup that Local offers are extremely helpful.

Tools to make it easier

Over the years I’ve accumulated a lot of tools that are specific to Mac computers, so I spent some time finding tools in Windows that can do the job. I was relieved to find that my favorite programs like VS Code, PHPStorm, Sublime Text and Sourcetree all work just as well on windows.

There are still some things I miss from the Mac universe, but I’m now happy enough with the tools I have that I don’t feel the need to keep switching back over.

MySQL

Before I was using Sequel Pro for Mac. It seemed to be the most popular Mac MySQL GUI and it was free so I stuck with it. Unfortunately, this isn’t available for Windows, but there are a few other good options.

HeidiSQL is a free MySQL GUI that seems to have feature parity with Sequel Pro, is very fast, and looks decent as well:

HeidiSQL MySQL GUI

Another GUI that caught my eye was Data Grip. It’s made by JetBrains, the same people behind PHPStorm. It has a great-looking UI that goes beyond the standard feature set that we’ve come to expect and offers advanced features like SQL refactoring, on-the-fly analysis, and version control:

Data Grip MySQL IDE

I’m still evaluating both tools, but they seem to more than fit the bill for my needs.

Command Line

The built-in command prompt that comes with Windows leaves a lot to be desired aesthetically, and it’s a big transition coming from Mac:

Windows command prompt

The Mac terminal supports a lot of Linux commands which I’ve become accustomed to, so I was relieved to hear that the Cmder command prompt offers emulation for a lot of these commands including cd, ls, and more.

It also looks great which is a huge bonus:

Cmder terminal emulator

The command-line tools that I use every day like Composer, Grunt, and Node all have Windows equivalents that work just as well as on Mac. I also installed Git for Windows, which includes Git BASH. This lets you run Git on the command line like you would for Mac or Linux. It also integrates well with Cmder, so you don’t have to run different console windows depending on what you’re doing.

Final Thoughts

Switching to Windows wasn’t easy, but after getting used to the changes, I’ve found that I actually prefer working on Windows over macOS. I do think that Microsoft has come a long way in making Windows more developer-friendly, although it does have more work to do before it’s as easy and intuitive as macOS.

Do you do all your development on Windows? Are there any must-have tools that you think I missed? Let me know in the comments.

About the Author

Matt Shaw

Matt is a WordPress plugin developer located near Philadelphia, PA. He loves to create awesome new tools with PHP, Javascript, and whatever else he happens to get his hands on.