You’re likely familiar with local WordPress development. However, if you’re still sticking with XAMPP at this point, you might find there’s a better choice available for your needs. In fact, many tools are specifically tailored to WordPress and its intricacies.
In this post, we’ll talk about a few different solutions and types, mainly those centered around the command line. Let’s get started!
‘Local’ isn’t local to you, but local to your computer
In case you’re not au fait with what we mean by “local WordPress development,” let’s start there. Essentially, local development is when you create and develop a website on your computer, rather than on a live web server.
We’ll discuss the benefits of doing this shortly. However, let’s first discuss the process of developing locally. You’ll usually create an install via a site template containing all of your default themes and plugins, then get to work. When you’re done, you can push the local site to a live server.
This sounds simple — and it is — but some WordPress developers are still hesitant to do it. Let’s chat about why this is, and why those misgivings shouldn’t stop you from developing locally.
Related: Local Sync – a simple way to deploy your localhost WordPress website
Reverse psychology experiment No. 179: Developing on a live site is a fantastic idea
Let’s preface this section by saying that you should definitely develop locally regardless of the project. This applies even if your local installation and the live server are so dissimilar that you might have to carry out some additional work down the line.
Also, some WordPress plugins require a live server to run optimally (Jetpack, we’re looking at you). Approximating a mail server on a local site is also a challenge. OK, we’re not selling this very well.
Despite these drawbacks, local development will let you develop without any risk to your live site, while using zero bandwidth and resources.
What’s more, creating an install takes a matter of seconds, especially if you’re using a pre-built template with your chosen solution.
In fact, creating installations aplenty is a key benefit, with hard disk space being your sole limitation. Also, depending on your chosen environment, you can negate the drawbacks we mentioned at the start of the section. That’s good news, mainly because we definitely don’t want to put you off the idea altogether.
You’re probably already familiar with a tool such as XAMPP. Since this is such a well-known local development environment, we’re not going to talk about it here. However, we will begin with an XAMPP-based environment that you might have heard of before.
3 cool AF local WordPress development tools that will hook you up with club tickets
We’ll discuss three lesser-known solutions, and lay out their benefits.
Varying Vagrant Vagrants (VVV).
Let’s take a closer look at the benefits and functionality each of these local WordPress development tools have to offer.
1. Desktop Server
As we mentioned, DesktopServer is built on XAMPP. This is good news, especially for those currently using that particular stack, as it’s practically guaranteed to work with your system out of the box.
DesktopServer is a new breed of local environment that gives you a good-looking interface to navigate. It also requires a minimum of clicks to get an install up and running. Ultimately, it’s ideal for developers who spin up sites regularly. What’s more, because the software itself can be optimized, it’s
much faster than a standard XAMPP stack.
If you want to test drive DesktopServer (or one of the other similar solutions), there’s a free version available. However, this is fairly limited and serves as, for all intents and purposes, a demo. The premium version is priced at around $100 (at the time of this writing).
2. Varying Vagrant Vagrants (VVV)
We’re now going to move on to tools that primarily use the command line, starting with the WordPress developer’s tool of choice. The eccentrically-named and open-source Varying Vagrant Vagrants is built on top of the Vagrant environment. It provides a functional, browser-based Graphical User Interface (GUI) to manage your installs.
Using VVV is understandably more complex than a tool like DesktopServer, but for the experienced developer, this should be no problem. Each install is actually a virtual environment powered by VirtualBox, which you manage primarily from your Terminal or Powershell.
There are a few simple commands to learn, and the majority of your non-development time will be spent “provisioning.” In other words, pushing through changes and updating the install. As such, this isn’t going to be necessarily fast in practice depending on your workflow, although under the hood, it’s much faster than XAMPP.
Finally, we have Docker. This is basically an alternative to VVV, and those using it champion its speed compared to that solution. We’d agree that there’s a clear speed benefit for those creating lots of installs, but it might be inconsequential for all but the most time-pressed developers.
Overall, Docker offers a harder to digest infrastructure than Vagrant, but a much snappier process due to less strain on the CPU and RAM. You may also find that each particular “container” is smaller in size, due to the inherent structures of VVV and Docker.
Weighing up whether Docker or VVV is best for you is beyond the scope of this article. However, this piece offers a comprehensive look at both platforms. We recommend starting with VVV, and looking into other solutions as your needs change.
“Always develop within a local environment” has been rammed down your throat so much it could be imprinted on your headstone. A good start is to use a tool such as XAMPP, but there are also plenty of WordPress-centric solutions available. These even come with additional speed and functionality benefits to boot.
For example, VVV is run from the command line, and is the WordPress developer’s environment of choice. Docker is just as good, and arguably even faster. However, a tool such as DesktopServer can straddle the line between power and ease of use. It could be the answer to your local WordPress development prayers!
This post was originally published by Tom Rankin on the GoDaddy Blog. Image by: Alexandru Acea on Unsplash
I have used a lot of different local development environments, attempted to work with XAMP, WAMP, virtual machines, Vagrant, Docker and these days I almost always just use Laragon, by far the easiest I’ve found. It even handles “local” email and sends emails to a text file. It is by far (in my opinion) the easiest system for Windows-based developers.
I totally agree with that!
Same. Even Local by Flywheel has been ridiculously unstable, even the new beta didn’t work consistently for me. Laragon all the way.
Just a clarification for what Vagrant is/does:
Vagrant provides a simple, elegant way to manage and provision Virtual Machines, basically separating the development environment from the local machine, so theres no messing up Windows or MacOS etc with load of development tools. Plus you can download different boxes for different environments so theres alot of flexibility.
We use Laravel Homestead, which is basically just a pre-packaged vagrant box with everything included. We do a lot of Laravel development alongside WordPress so just having one box for everything is good.
Theres also Valet, but it’s only for Mac and doesn’t separate the dev environment from the local machine. Its great for people who only need PHP/MySQL/Web server but not a full virtual environment.
Then theres Trellis by Roots, which is an ansible playbook which allows for your local development machine to near match the production machine. Its all done in a vagrant box again. Complex to get your head round though.
Surprised Local by Flywheel is not at the top of this list
I agree. I tried Flywheel about six months ago and never looked back. Super easy to install local WP sites right on my computer. The migration process could be better, but not too tough a hurdle to overcome.
Surely it’s a better option to work on a live development server/domain and use managewp to transfer the approved site to a live environment once completed? Thats what we do to good effect, as it’s easy to show clients the finished website before deploying it…I’ve never really understood the benefit of working locally (just my opinion).
Surprised Local by Flywheel is not at the top of this list. Is the exclusion anything to do with them offering WordPress hosting and competing with the GoDaddy family?
Not intentionally. Article focused on groundwork services for developers not new softwares built atop of them, like Flywheel on top of Docker.
But from the sheer amount of comments – I guess we’ll have explore Flywheel as well.
I’d suggest you check out “Local by Flywheel” since this is a recent post and this product has been making headlines for a while now – for a good reason: it is the easiest way to build local WP websites and it’s completely free … It uses Docker in the background (but you won’t have to deal with the complexity of Docker).
Totally agree with Thomas – Local by Flywheel is magic on a Mac. The easiest way to get going locally.