LocalWP – Local WordPress without a headache!

  WordPress Dev sandbox on your desktop

SANDBOX

More than 2 years ago I wrote a blog article about ServerPress, an application to run WordPress locally on the desktop. Unfortunately ServerPress has not been updated for a while. The biggest problem here is mainly the fact that ServerPress still doesn’t support PHP 8 – the latest version – and yet there are more and more hosts that offer PHP 8 as standard. So a site that would work fine on your desktop could ‘explode’ as soon as it goes live.

Now it is possible to create a Linux subsystem on Windows and that could actually solve all your problems… if you have the knowledge to set up such a subsystem. For many, that is just a step too far.

Not too long ago, however, I came across a solution that is quite beautiful. And easy to install too.

But – why would I want to install WordPress locally?

The first question, of course, is why you would want to install WordPress locally. This can be for a number of reasons. One good reason is that before you want to use plugins on your site, you want to test them first. Another reason could be to try out so-called ‘code snippets’ safely in an offline environment first. Both to prevent your website from suddenly going down due to a mistake. And a third good reason could be that you develop code for WordPress yourself. Working with a debugger is so much more convenient when it’s possible locally.

Of course you can also do this in a staging environment online, but the advantage of a local environment is that it is much easier, especially if code needs to be modified. Not to mention when to debug code.

Now it is quite possible to install a WAMP (Windows Apache MySQL PHP) stack on your PC yourself, but that requires quite a bit of work to set up properly. In addition, it takes up quite a bit of space on your hard disk and puts quite a drain on your system resources. So I was happy to find an alternative solution…

 

LocalWP

LocalWP started out as an independent Open Source project, until it died a soft death. Luckily, the folks behind FlyWheel hosting found this and decided to revive it. Not as Open Source, but much more user-friendly than the original project.

LocalWP is therefore a way to install WordPress locally. But it goes much further, but I’ll talk about that later in this article.

First of all, let’s look at the simplest form of use. You want to install WordPress locally to try things out…

Playing in the sandbox with LocalWP

The first thing to do then, it won’t surprise you, is to download LocalWP. It’s nice that -unlike the ServerPress desktop server- LocalWP is available for all three major platforms: Windows, MacOS and Linux.

After installing it on your computer, it is actually very simple. You start the application, you enter the name for your new website and WordPress is installed. With the buttons ‘Admin’ and ‘Open Site’ you can be taken to the Dashboard or the front of the site respectively.

And there you can do whatever you want to do.

If you want to place a copy of your live site on your desktop, I can recommend using All in One Migration, a plugin that I have mentioned several times on this site. You can easily download your website to your desktop and upload it within your local WordPress installation.

An alternative is to use the export function of LocalWP itself. You will then receive a ZIP file containing the entire contents of the wp-content folder, plus an import script for the database. After the database import you will also have to update the URLs. You can use Elementor’s built-in function for this if you use Elementor, or else Velvet Blue Update URL is a great solution.

 

As far as the simple use, where you simply want to download WordPress locally. But LocalWP offers more. Let’s take a look at those possibilities too.

Synchronization with your website

Pretty cool, but not for most of us is that you can literally work on your website locally, and then push the changes to your website. Unfortunately your hosting provider has to support this and right now the only two hosts that do are Flywheel and WP Engine. Both hosts who have a large customer base in the US, Canada, EU & UK.. However, if you find LocalWP worthwhile, I would certainly encourage you to whisper to your host that you are interested in an integration with your website. Who knows?

Use of ‘blueprints’

Do you regularly create websites, using the same plugins and theme every time? Save time now by using ‘blueprints’. In addition to downloading LocalWP as an application, you can -it does not have to be – also create an account on the LocalWP website. On this website you can, for example, install extra add-ons for LocalWP or define your ‘blueprints’. If you then log in to your local installation, you can choose from different blueprints when creating a new website.

MailHog

MailHog is an application that captures all outgoing email. The moment MailHog -a part of LocalWP- is activated, every email ‘sent’ by your local LocalWP installation will end up in MailHog, so you can easily see which mails are being sent.

LiveLinks

For ‘LiveLinks’ you must have created a LocalWP account. But if you want to show your local website to someone, you can. You send that person a unique link, so that he can watch (and test) the website you are working on on your PC. No one else can do this. And if you want to revoke access, you can simply delete the ‘live link’.

Various Add-ons Available

In addition, a number of add-ons are available. I won’t go over all of them, but some that I’ve used myself are:

Image Optimizer – All images are compressed, which can make the site quite a bit faster.

Table Plus – For the developer and power user: One-click access to the tables of the site’s database. Quite a bit more efficient than working with PhpMyAdmin.

Cloud Backups – Especially useful for a website that is still under development. Easily make incremental backups to a cloud provider (there are several to choose from). In this way you can easily go back to a ‘previous version’, which is ideal, especially when you are busy with programming. But it can also be nice when you test plugins. Try a set of settings, make a backup, test the situation and if it’s not what you expected, take the backup one step back.

Xdebug + VS Code / Xdebug + PhpStorm – Quick and easy install debugging for two popular PHP editors, VS Code (my favorite) and PHPStorm. No hassle with configuration files, but with a few mouse clicks LocalWP and your favorite editor ‘talk’ to each other.

Instant Reload – Handy when you work with two screens. As soon as you save a CSS file in your editor, the website refreshes in the browser.
The documentation on how to create an add-on is publicly available, so keep an eye on the add-on directory for new add-ons.

 

Conclusion

I’m excited, LocalWP is not only a convenient way to develop and test offline sites, but also increases production. The only ‘challenge’ in the beginning was where exactly LocalWP stores the sites. Because that’s not exactly clear. But that is in your user folder under ‘Local Sites‘.

Unlike Serverpress Desktop Server, LocalWP does not have a ‘paid version’. Also the add-ons are so far- all free. The revenue model of LocalWP is mainly to draw attention to the specialized WordPress Hosting Services  -FlyWheel –  that has released this program.