I’ve done a write-up on hosting local WordPress sites before, but I definitely prefer this method over the previous one. If you’ve never tried hosting multiple sites using LocalWP, then I’d encourage you to check it out. I’ve had really bad issues with it in the past, and it may have been a combination of lack of Linux support and my incompetence, but I decided to give it another shot and this time it was an absolute homerun.
What is LocalWP?
For the uninitiated, LocalWP is a software program designed for developers to get local copies of WordPress up and running quickly and push to production with ease. Just a full disclaimer before we go any farther, I am not being paid by LocalWP, they are not sponsoring me, and this is just a reflection of my own experience and my own opinions.
Let’s Talk About Setup and Updates
This is mainly a concern for Linux users, because build-it-yourself software can definitely have its ups and downs. However, I really like how Local distributes for Linux systems. While they don’t distribute via the official Linux repositories like Ubutnu and Arch, they do offer a simple .deb
that you can either drop into your default software manager or something like Gdebi. Updates are as easy as uninstalling the existing .deb
ad downloading and installing the latest .deb
. Gdebi handles all of this for you.
Setting Up Your First Local Dev Environment
This really couldn’t be easier. It’s a simple as clicking the “add site” button, choosing where you want to save everything, choosing your config options (PHP versions, MYSQL version, and either Apache or NGINX). The fact that all of these settings are a simple dropdown is amazing. When configuring your local dev environment with XAMPP (as far as I know) you make those decisions one time and it’s a pain to change them later.
And what’s more, these settings are independent of each other. So I can have 2 or 3 copies of a site all running different versions of PHP and one on Apache and one on NGINX. To me, that alone is worth the price of admission.
Cool Features
In addition to the fact that you can manually set up different environments with different versions of your LAMP or LNMP stack, there are other features inside LocalWP that make it a real standout.
Easy To Find Your Config Files
When you’re running multiple sites on your local machine, especially when each of them has different setups, it can be easy to lose track of all your config files. LocalWP does all of this for you. Inside each local environment install, above the root directory of your WP install, is one folder that contains all the config files for that particular environment. From that one folder, you can control your php.ini
and other vital config settings that could make or break your site.
WPEngine Integration
LocalWP has built-in integration with WPEngine, so once you connect your WPEngine and LocalWP accounts, you can drop in the WPEngine API key and gain access to all of your WPEngine environments right from within LocalWP. If you don’t use WPEngine for your hosting, then this feature doesn’t matter, but for those who do host with WPEngine, this is a huge bonus as opposed to figuring out how to migrate or push changes from a LocalWP instance manually via Git or SSH or FTP or whatever.
Automatic SSL Certs
If you’re developing locally with something like XAMPP, doing SSL certs can be an absolute pain, especially if you have to set them up yourself and generate your own certifications and keys and all that. Plus modern web browsers are getting so restrictive on locally hosted content that it becomes a real chore just to get a simple lock icon in the top corner. To have LocalWP just automagically generate SSL certificates for each environment is not only a huge time saver, but depending on the project you’re working on, some features actually depend on SSL certs being in place, especially in e-commerce situations.
File Tree Diffs on Push
One of the more recent updates is a feature called “Magic Sync” that automatically compares the files in your local file tree with the files in the remote environment that you’re pushing to. This is especially convenient especially if you’re concerned about overwriting important files. Great to have this “look before you leap” feature.
Final Thoughts
All in all, LocalWP has been an excellent upgrade over something like XAMPP, especially if you need to adhere to specific PHP versions and keep multiple sites locally as you work on several projects at once. All of the VirtualHosts and stuff that’s set up inside Apache config becomes a thing of the past as local sites can literally be up in running with 60 seconds with about 5 clicks. I really don’t know how I’d work without LocalWP; it’s become a vital part of my everyday workflow.