WordPress. The darling of the content creator. The bane of the software engineer. Love it or hate it, WordPress is here and it’s not going anywhere. We’ve all seen the numbers, WordPress now commands one third of the web (source: WordPress.org)
Before we get started I need to underline that I am not an unbridled fan of the behemoth CMS with it’s greedy footprint and often archaic API. Yet, with its seemingly endless library of plugins, extensive documentation and beginner friendly admin interface, WordPress is often the simplest solution for many of my clients. There is so much built in right out of the box that cover most of my clients needs and if a feature is not already built into WordPress then almost certainly one of the 50,000 plugins housed in the wordpress plugin directory will fill help fill that hole.
What is not always so simple is setting up a local install for WordPress development. Even less simple is syncing your local development install with your production server out in the wild. WordPress is not a self contained application, rather it relies on a web server (Apache being it’s most common partner), the PHP programming language and of course a database such as MYSQL or MariaDB. As such, all three are required to be installed on the host operating system for WordPress to even think about running. While this might not be a problem for Linux users it has often been just a little troublesome for Mac users and a right royal pain in the rear for WIndows users to manually install and configure an up to date install of MYSQL/PHP/APACHE.
To remedy this, developers have reached for an all in one server install such as MAMP, WAMP and XAMPP to solve this problem yet that solution is less than elegant. And while installation is automated, configuration is not. It is still up to you to configure and maintain the software. For those eager to try WordPress this could be just another in a long line of hurdles they need to overcome to get started. I understand that a good working knowledge of the LAMP stack is often needed to become a proficient WordPress developer and that anyone venturing down this road will need to learn these technologies sooner rather than later. However, I would argue that technologies such as virtual machines and Docker containers offer a number of benefits over local installs of
Over the course of this three part article I’ll provide an overview of three ways that WordPress developers can get set-up a running install of WordPress on their local machine. In part 1 I’ll cover Local by Flywheel, perhaps the simplest option to get running. In the second part, I’ll tackle Trellis by Roots – a Vagrant based solution and thus a more involved set up process. Lastly, I’ll review Docker. There can be little doubt that Docker containers are an exciting technology offering the convenience of a Virtual Machine coupled with low resource utilization yet juggling multiple containers to get a simple WordPress install up and running can seem excessive to those of us wanting to get a simple development environment up and running quickly.
I should say here that I am by no means an expert on any of these technologies, I’m just a small developer trying to figure out the quickest and simplest way for me to service my clients.
Option 1: Local by Flywheel
Level: Easy Peasy
An almost legendary piece of software at this point and it is easy to see why. Simple, easy option for anyone who has even a passing interest in working with WordPress. Indeed, Local is so simple to use that it offers the curious novice an ideal way to give WordPress a try either as a user or developer.
Installing couldn’t be easier, direct your browser to the Local by Flywheel homepage, hit download, fill out the form asking for your name, email, etc and you are all set.
The download (a forgivable ∼500MiB) is quick and mostly painless (more on that later). However, a possible pain point is the collision between WIndows 10’s Hyper-V and VirtualBox — an application that is essential to Local by Flywheel and is installed automatically as part of the FlyWheel install. Before installing Local I would recommend turning off the Hyper-V service using the Programs and Features application built into Windows.
Flywheel’s slick GUI affords its users a simple way to create and manage local WordPress installations. Fancy developing your own theme or child theme? Maybe you would like to test a range of plugins and themes in a safe environment before deploying to a production server. Or perhaps you would simply like to take WordPress for a spin as a blogging platform. Either way, Local is the simplest way I can think of to get up and running with a local WordPress install without playing with the command line.
When you run Local you are met with a clean page somewhat similar to the layout and feel of VSCode. On the left we have a vertical toolbar offering four buttons, two of which are directly connected to the FLyWheel hosting service (we will skip this for now), one is for installing and managing plugins (more on that later) and the main one is for creating new Websites on your local computer and that’s what we are interested in here.