Select Page

Hosting Multiple Sites Using LocalWP

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.

Check out more articles

How to Generate a Ranger Config File

ranger --copy-config=all This will copy all the default config files from /usr/local/lib so you can make edits without messing anything up. Huge shout out to https://dquinton.github.io/debian-install/config/ranger.html for explaining this and so much more. Took me a...

First Open Source Contribution

Surprise! I genuinely did not plan on making my first ever open source contribution today. In fact, I didn't plan on a lot of things happening this week at all. I recently got an awesome opportunity to work on a site that is being hosted on a platform called Pantheon,...

How to Exclude Specific Posts and Pages from WP_QUERY

For the sake of having something to work with, let's suppose we've got the following query:In this query, inside the $args array, there's a special parameter that allows you to exclude specific posts and pages from the query. This parameter is called post__not_in and...

Configure SSH For Password-less Connections

Preamble I'm slightly embarrassed to admit this, but it was a long time before I figured out how amazing this little file is and how exactly to put it to good use. The file I'm talking about is the SSH config file. By default, when you first connect to a server via...

WordPress Site Stuck in Maintenance Mode

Plugin Error Code 500 During Update While I was updating a WordPress plugin locally, something happened on my local server to trigger a 500 error code as the plugin was updating. On the frontend, I refreshed the page and was greeted with "Briefly Unavailable for...

Creating a WordPress Plugin Downloader

How it Started I was recently tasked with the challenge of creating a WordPress theme generator. The idea being, instead of writing your style.css file from scratch, you'd be able to just answer a few simple questions about how you'd like your theme set up, and those...

Fix Audio on XFCE Chromebook

The Problem After moving from GalliumOS to Xubuntu, I noticed that playing YouTube videos on both Firefox and Chromium would result in decent playback for a few minutes, but suddenly the audio would turn into a solid beeping tone while the YouTube video displayed the...

Adjust Trackpad Sensitivity XFCE

xinput set-prop "Elan Touchpad" "Synaptics Finger" 1 1 1 What are the values 1 1 1? This sets the sensitivity as close to the original ChromeOS as possible. Larger numbers will decrease sensitivity of various aspects. I never looked into which individual value...

Fireworks (Short Film)

https://vimeo.com/395077249 About the film Year: 2020 Director/DP: Tim Searfoss Writers: Matt Jones, Tim Searfoss Sound Mix: Matt Jones

How To Load Javascript in WordPress

Doing things the WordPressy Way Yes, technically it's possible to just drop scripts into template files, but it's not the correct method to use on WordPress sites. WordPress is pretty particular on how it handles JS. Register Scripts via functions.php Just a heads up,...

Looking for a place to host your next project or design?

Use this link to get your first 4 months of WP Engine for free: WP Engine – Plans (With 4 months free)