12/28/2023 0 Comments Wordpress developmentYou can just install that extension, navigate to your project in WSL, and enter code. Luckily, VS Code has a remote WSL extension that is fully compatible with WSL 2. But what about editing them with your favorite code editor, VS Code? So as I mentioned before, we have to keep the project files on Linux. Editing Linux Files with Visual Studio Code It’s at least on par with other Windows environments like Laragon and Local by Flywheel, and way faster than older local servers like MAMP, WAMP, and XAMPP. The local WordPress site on this setup is fast. Luckily, Gilbert already wrote a great tutorial for configuring the web server, installing a local WordPress development environment, and creating a volume for mounting any custom WordPress plugins or themes. Next, I needed to set up a new WordPress site. If you’re following along, make sure you use the instructions for the Linux operating system instead of installing it directly on Windows.ĥ minutes later, and I had a full PHP/NGINX/Maria DB dev environment in Docker, on Linux, on Windows! To get a local environment going, I installed Devilbox, loosely following the Devilbox documentation. It can now run directly on the Linux kernel, which means things are much faster than they used to be. We’ve written about Docker before, but it’s worth noting that Docker has special support for WSL 2. I was still determined to get a working development environment set up on Windows with WSL 2, so I installed Ubuntu on WSL 2 per the docs, and sat down to figure out the rest. That means that traditional Windows dev environments like Laragon or Local are out. Working with Windows files in Linux (or the other way around) can be much slower. ![]() To take advantage of the improved speed, Microsoft recommends that you keep your project’s files inside of the Linux environment, and do most of your work there. Now in 2020, WSL 2 has been released, and is no longer an emulated Linux kernel – it’s the real deal. Microsoft seemed fully aware of these shortcomings though, and strived to make WSL 2. This made working with Linux files on Windows or Windows files on Linux a bit tricker, although still possible. The files in that subsystem were also isolated from the main Windows install. However, the first version of WSL wasn’t flawless.īecause it was virtualized, even simple things like changing directories could be painfully slow, especially once you add in things like Git and a fancy terminal. Developers no longer had to set up something like CMDer to emulate basic commands like ls or rm. ![]() It gave developers a “good enough” Linux environment that helped with some of the issues with working with UNIX-based programs or scripts. It offered an emulated version of Linux on which you could install your favorite Linux distro, like Ubuntu or Debian. Windows Subsystem for Linux was first released back in 2016. I think Windows has finally gotten to the point where someone can be just as productive as someone else on Mac. And someone just starting out in development may not want to spend $3,000 to get a machine that they aren’t sure if they will like. Macbooks and iMacs are expensive and hard to fix or upgrade as they age. I think the biggest and most common reason for using Windows is price. However, things seem to be turning around lately – first with the introduction of Windows Subsystem for Linux (WSL), a new commitment to open source, then with a new terminal and finally WSL 2 (more on this in a bit). Windows has been known for lacking in developer tools, especially for apps like WordPress. Some might wonder why anyone would use Windows at all, when Mac is bundled with PHP, Git, Ruby, and several other tools you may need for local WordPress development. In this week’s article, I take a look at how you can set up a modern WordPress local development environment on Windows. While I’ve been happy with Mac systems for years now, I do try and keep up with what’s changing on Windows. It has PHP and Ruby installed, has a Linux-ish command line, and it looks great! ![]() And we’re not alone – through my very scientific and thorough research, most other WordPress developers seem to be using Mac as well.Īnd that’s for good reason – Mac “Just Works” when setting it up for development. As you may have noticed from reading our blog, we’ve highly favored Mac and Linux for WordPress development.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |