Whether you’re designing and developing WordPress themes or plugins or just creating webs for customers, you’ll need to have multiple WordPress installations to work with on a daily basis. And the most important thing is that creating a new WordPress installation and starting to work on it has to be a really simple process so you don’t waste your time (and therefore your money) in setting up this type of infrastructure.
Nowadays there are many options for setting up a WordPress development environment locally. Here I’ll tell you a little about my experience on this. I started a few years ago by setting the typical PHP and MySQL installation with Apache directly on my old black Macbook. It used to be a good idea to have a step-by-step tutorial at hand when installing and configuring each of the three previous components (Neil Gee’s guides were always my best choice).
If you followed the steps and were lucky, everything went well and you ended up with an infrastructure on your computer where you could install WordPress. Then you had to download the latest version of the content management system, unzip the zip file in the server folder, and start the process: create a new database, edit the
wp-config.php file, follow the steps of the installer, etc.
Essentially, having a local WordPress installation up and running wasn’t difficult if you had the minimum knowledge, but it was a hassle to do it that way. Also, if you upgraded your operating system to a newer version, you might have to do something because you had broken some of your settings. F**k! ?
After several years of working this way, the explosion of virtual machines arrived, led by Virtual Box. Virtual machines allow you to have a “virtual” computer inside your own computer. Thanks to this, and the emergence of configurators such as Vagrant and VVV, which add a layer above the Virtual Box to “ease” the management and configuration of virtual machines (focused on WordPress in the case of VVV), everything seemed to be easier and more straightforward.
Now if you wanted to have a local WordPress installation, you could have it on a virtual machine within your operating system, completely isolated. Thus, changes to the system should not affect your local environment. A great success and progress, but still, far from being a solution for all audiences. I’m sure that if you’ve ever used (or are using) Vagrant in conjunction with VVV for WordPress, you’ve had configuration problems that make no sense at all.
You just completed your tasks working on your local WordPress installation and everything was fine. Then you turn off the virtual machine and go home. Then the next day comes, you’re going to turn on the virtual machine and… oh, boy! There’s no way it’s going to work. WTF! It worked yesterday!
If setting up Vagrant with VVV for WordPress was already a bit esoteric at times, when it stopped working, almost always the solution that worked was to reinstall it all over again. A real pain in the ass because you could end up wasting your whole day at work fighting Vagrant. If you use Vagrant and VVV and this has never happened to you, seriously, go to your nearest lottery office and buy a ticket now. You can’t be that lucky!
Maybe it was me being a jinx, but Vagrant was a torture. There had to be something simpler. It couldn’t be that after so many years of evolution in the WordPress development we were still having these problems. Was I the only one who was having problems with Vagrant and VVV? No way! That’s when I discovered Local by Flywheel.
Once Local is installed, just click on the + icon to create your new WordPress installation. Here it will ask you the name of your site and the environment you want to use. You can leave the default option or specify PHP and MySQL versions and whether you want to use nginx or Apache. You then enter the username, password and email address of the WordPress user to be created. And that’s it! The new WordPress installation appears and you’re done–it’s that easy!
From there, you can go to see the new site or access the dashboard from your browser. The good news is that if you’re a test freak you can always modify the PHP version or switch between nginx and Apache. On the other hand, in the Database tab you will find the data to connect to the database with your favorite program. What’s more, if you use SequelPro (which you should), one click opens the program directly and connects to the database. If this isn’t wonderful, I don’t know what is.
Local by Flywheel includes many other features, such as making your WordPress installation multi-site, creating a public link for others to view your local installation from outside your computer, or even passing your local installation to a real Flywheel server (yes, Flywheel is a hosting company, so it’s normal for them to want to monetize this tool in some way).
The question here is, does this mean I’m no longer the hackerman I used to be who loved typing console commands? Am I not a geek anymore? The answer is a resounding no! I just want to do my job, for which I get paid, which for now is not to set up cool virtual machines, but to develop plugins for WordPress.
This post is not advertising. Flywheel pays me nothing for recommending you to use Local. In fact, I’ve been using it since before Flywheel bought it (it started as a free tool and still is, even though it’s owned by a hosting company). If I recommend it is because I think that if you use Mac OS X as your operating system (Local is also available for Windows, but since I haven’t tried it, I can’t tell how well or poorly it works there), you shouldn’t waste any more time with other solutions. Local does what you need and has not failed me once to this day (I’ll keep crossing my fingers). For me, today Local is the best option to manage local WordPress installations on your mac. And if your opinion is different, how do you do it? Leave a comment below ☺️
Featured image by Kent Pilcher on Unsplash.
Leave a Reply