Working with a local development environment makes a lot of things easier. We have written about this before, using XAMPP. In this post, we want to present you with an alternative: Local, formerly known as Local by Flywheel.
Like other solutions, the program enables you to run WordPress on your computer instead of a server. It’s also free and very easy to use, making it more beginner friendly than more technical solutions.
If you are looking for another way to work with WordPress locally, this tool might be the right thing for you. Let’s find out together, shall we?
Why Use a Local Development Environment?
We already cover the benefits of installing WordPress locally in our other post. Therefore, here is only the short version:
- Independence of an Internet connection, such as when traveling
- Ability to test site changes like site updates or plugin and theme changes safely
- A place to test themes and plugins you are developing before releasing them
- Increased loading speed and less development time
- No need to pay for hosting or a domain until your site is ready
Sounds good so far? Then let’s go over how Local can help you with all of the above.
In addition to the benefits mentioned, Local comes with a number of standout features that can seriously enhance your workflow:
- Automatic WordPress installation
- Ability to save site configurations for re-use
- Site import/export
- Remote access to local sites for clients and other stakeholders
- Local SSL/HTTPS access
- SSH and WP-CLI, log files for everything going on on your site
- Automatic site deployment (for Flywheel and WP Engine customers)
- Multisite support
There is also a Pro version with additional features like file sync, deployment to staging, and priority support for $20/month. Plus, a team version for $50/month.
How to Use Local to Create a Local WordPress Website
Alright, it’s time to go over how you can use Local yourself.
1. Download and Install
The first part is really easy: Getting Local onto your hard drive. For that, go to the official website and click Free Download.
This will open a popup, in which you have to choose your operating system (Mac, Windows, Linux), enter your first and last name, work email, and phone number.
Hit Get it now! to start the download. Once it’s done, run the installation. I trust you know best how to install a program in your operating system.
At the end, start Local (if you don’t get asked to do so anyway). This should be followed by a prompt to accept the terms of service, which you should promptly do.
You might also encounter an ask to allow Local to report errors back to the developers for improvements. This decision is up to you. Close the onboarding wizard and you have successfully finished the installation.
2. Create a New Local Site
After the installation, Local will automatically open to this screen.
The welcome screen prompts you to create a new local site, so why don’t we just do that? Click the big green button.
In the following screen, the first thing to do is enter a name for your new site. This can be anything you want but it’s best related to the final purpose of the site.
Under Advanced Options (which you need to open), you can change the local domain it will have and the path on your hard drive where files are saved.
In addition, you are able to pick a blueprint for your site if you have saved any. These are site configurations (including themes and plugins) that you can save and re-use without having to install everything manually.
Change anything if you have reason to do so and continue.
3. Set up Your Environment
Next up, you get here:
In this step, you can choose your environment. If you leave it on Preferred, Local will apply the standard configuration with a chosen PHP and MySQL version. When you click on Custom you are able to choose them yourself and also switch to MariaDB for your database. You might have to download some things in order to make changes but Local will tell you about that.
In older versions of the program, you were also able to switch between using an Apache or Nginx server. That currently not possible but supposedly on the way. However, right now you are limited to using Nginx.
Pick what you want (I go with Preferred) and move on.
3. Set up the User
In this screen, it’s time to create a WordPress username, password, and email. You can also determine whether this site will be a Multisite under Advanced Options. Hit Add Site when you are done.
4. Finish and Your Check Site
Local will then get to work. Depending on your operating system, you might get some prompts asking for permissions which you need to grant. When all is said and done, you land on this screen.
Here, you can see all the information about your site including the server environment, your versions of PHP, MySQL, and WordPress, the site name, domain, and path. You also have tabs for the Database, SSL, and mail utilities. More on that later.
The most important parts are the buttons in the top right corner labeled Admin and View Site. A click on these open the WordPress dashboard or front end of your local site in your browser.
Here’s what that looks like:
Neat, right? Local automatically installed WordPress and set it up without me having to do anything. In addition, if you go to the log in page you can enter your site with the username and password you set during the installation. You can find the WordPress files in the location you specified during setup.
In short, everything behaves exactly like a WordPress site installed on a server online, only that it’s all happening on your hard drive. With that, you have everything you need to start building your site
If you want to create more than one site, you can simply add more with the plus button at the bottom left. If you do, they will then be appear on the list of sites on the left.
For every site that you are not currently using/developing, you can stop the virtual server in the top right corner, where it says Stop Site. Alternatively, use the Stop All button at the bottom of the site list to quit all of them at once. In addition, a right click on any of the sites also lets you start and stop them.
The latter also gives you the following options:
- Jump to the site’s front end/admin dashboard
- Show the site folder on your hard drive
- Open the site shell for WP-CLI access
- Restart the site, which can help with caching problems
- Export your site as a zip file (to move to another server)
- Save as blueprint for re-use
- Change the site domain
- Modify what the site is called inside the list
- Delete site from the list and, optionally, move all its files to the trash
Alright, that’s it for the basics. Let’s now look at some of the additional features of Local.
Share Your Site Via Live link
A really cool thing the program can do is called Live Link. You find it at the bottom of the screen when looking at one of your sites.
When you click Enable, Local will generate a link for you. It enables another person to remotely access your local site via an Internet connection — even the back end!
This is perfect when building a website for clients so you can easily show them the results without having to upload it to a server. Plus, it’s super simple!
Use Local Connect
Another awesome feature is the ability to connect directly to a host and push the site online or pull from it from the server. This currently only works with Flywheel and WP Engine hosting accounts but the developers are looking for input who else should they should include.
Either click the Connect Host button in the bottom right corner or the Connect symbol in the left sidebar.
In either case you will need to log into your hosting panel (Flywheel) or input WP Engine API credentials (find out how to create those here).
When you have done so, and your site is compatible, from now on you have the ability to push and pull it to and from your hosting account with a click on the little symbols at the bottom.
In addition to that, in the Connect menu you are now also able to pull your site to local from connected accounts.
When you click the button of the same name you may either pull the data to a new site (that Local will automatically create) or into an existing one.
This applies to both production, development, and staging sites (if they are available on your account). Settings are basically the same as for creating local sites. When you are ready, just click Connect & Pull Site and the rest will happen by itself.
Run Your Local Sites on SSL/HTTPS
As mentioned, Local allows you to use your local sites with SSL. This is important, for example, if you are working on an online shop and want to test drive your payment systems. It’s also a good idea if your final site is going to run on HTTPS so that you make sure there are no surprises when you go live.
For that reason, all sites you create are also available as HTTPS versions by default. Simply change the URL in your browser to https:// in the front and you access it.
If you run into a security warning like below, go to the SSL tab in Local for that site and click the Trust button. When you now restart your browser and access the site, the security warning should not appear.
Local offers a bunch of addons that you can find under the menu item of the same name that are all aimed at making the development easier.
There aren’t very many available at the moment but if you are interested in one, simply click on it, then hit Install Add-on in the next screen.
When you are done, the button changes to Enable & Relaunch. Click it and the extension is available for use after Local restarts. Easy peasy.
Check the Preferences
You can access Local’s settings by clicking the tiny hamburger icon in the top left corner and choosing Preferences (among other options).
Local is pretty set-it-and-forget it, so choices here are quite limited:
- Appearance & Behavior — The only thing you can do here is change between a light and dark mode (a very popular current web design trend).
- New Site Defaults — Here, you set the default settings for creating new sites such as the environment, admin email, domain suffix, and file storage path.
- Exporting — Set up filters for which type of files will be excluded when exporting sites.
- Advanced — Choose whether to use local domains or localhost for your sites. Only the first setting allows you to use HTTPS and custom domains. You can also enable a develop menu to debug Local addons here.
- Blueprints — This is where you find your list of saved blueprints. Your only option is to delete those you no longer need.
If you need help, Local has many places you can turn to:
- User documentation — Find all the information you need to get started, work with servers, troubleshoot, and more. It also has help for the Pro version.
- Community forum — If you are stuck, ask other users for help with your problems.
Finally, for host-specific questions, you can also get in touch with the Flywheel and WP Engine support. Local has links to all of these in the Support section.
Using a local WordPress development environment has many benefits. Local makes creating one and setting up your sites much easier.
The program is very intuitive and simple to use. Even beginners can have a local site up and running in literally five minutes.
However, some features are missing. It would be great to be able to connect with more hosting providers. Also, they should bring back the option to switch between environments as was possible in earlier versions. Finally, the support documentation could be more detailed.
Hopefully, this will all be ironed out in time. However, Local is definitely already worth your time and attention.
Have you used Local before? What is your favorite or most desired feature? Let us know in the comments section below!
The post How to Use Local (By Flywheel) for WordPress Development appeared first on Torque.