WordPress, PHP, and MySQL are what we might call “mature technologies”. They run on most servers, have high market share, and each has about 20 years of incremental refinement and improvements behind it. Naturally, there are many ways to run them locally for development. If you’re new to WordPress or programming on the Internet in general, it could feel like choice overload. Allow us to walk you through a few of the more popular options of local WordPress development tools so you can go back to arguing spaces versus tabs.
This article assumes you know how to work a text editor and a terminal, and have at least a little bit of experience fiddling around with Linux and/or web servers.
Ease of use: Local
You’re probably wondering what’s the easiest to set up? Local wins this all day every day, for starters because it has slick modern UI that works well, and it just works out of the box.
If you have some sysadmin chops, Vagrant isn’t all that difficult. It’s basically like setting up a server. If that’s not you, there are plenty of images and tutorials out there to simplify the path to running WordPress on Vagrant.
If you’re new to it, Docker’s containerization and handling of data persistence can inspire some existential questions as you learn to work with it. Once you get the hang of that, it’s basically like managing multiple Vagrant instances, but because Docker uses containers and not virtual machines, it’s faster and less resource intensive than Vagrant.
XAMPP or WAMP could be a strong competitor here if your dev machine is used only for developing in this particular stack. but I’ve run into weird configuration issues attempting to set it up on a general use machine, so I’ll put it in as the backmarker.
The standout in this filed is Vagrant, since it tends to be slow and resource intensive due to the nature of running a virtual machine inside your host machine. Docker and Local have always run faster than Vagrant in my experience, since they both run containers via virtualization without hypervisor or virtual machines.
Vagrant is the most configurable option, and easily offers the most direct control over what your server is doing. If there’s anything about your project that’s unique or deviates from the basic LAMP stack, you can probably make it work (given a long enough timeline) in Vagrant.
That’s not to say it’s impossible with the others, but let’s say for instance (random example here) you need to make WordPress talk to an Elasticsearch service that’s running on the same server:
Where is your site being deployed? Are you the only person working on it?
My grandpa always said, “make your dev environment look as much like production as possible”. If you are part of a team working on a WordPress project, you need a way of making your site’s configuration portable. Doing so will simplify deployment, as well as make it easy for everyone to run on their workstations.
This is handled beautifully by Docker and Vagrant, which both include ways of downloading (essentially) configured servers in the form of images, and provisioning them with whatever’s needed to get your site running.
Local does that too, except it focuses on just being really good at offering one particular configuration. XAMPP is my least favorite solution in this regard, unless you work on a team where everybody runs Ubuntu Server and VIM on their laptops.
Use the simplest setup you can get away with. If you are just building a new theme for your Animorphs website, use Local. Are you trying to incorporate some Python deep learning thing into WordPress? Vagrant is probably your guy. Consider this a long-winded way of saying run WordPress whichever way is most consistent and trouble-free for yourself and your team.
What gets measured gets done. Download the Digital Growth® Worksheet today, rally your team, and create results!