Podcast Episode

Review: Local by Flywheel

In today’s episode, we dive into the world of local WordPress development, focusing on his experiences with “Local by Flywheel.” We start by emphasizing the importance of local development environments for efficient and faster WordPress development. Dustin discusses how working locally eliminates the need for constant file uploads, caching busting, and waiting for changes to reflect. He introduces “Local by Flywheel” as his preferred tool for local WordPress development in 2023.

What is Local by Flywheel?

Local by Flywheel is a desktop application that provides a local development environment for WordPress. It essentially allows you to set up a miniature web server environment on your computer, complete with a web server (usually NGINX or Apache), a database server (typically MySQL), and PHP, the server-side scripting language that WordPress runs on. This environment is isolated from your live web server, which means you can safely develop and test WordPress websites without affecting your live site.

  • Customization and PHP Versions: Dustin highlights the flexibility of Local by Flywheel, which enables users to customize their development environment, including PHP versions and web server configurations. He emphasizes the importance of using the latest PHP versions (e.g., PHP 8.1) for WordPress development.
  • Database Management: The podcast covers the built-in database tools within Local by Flywheel, such as phpMyAdmin, which provides direct access to the database. Dustin also mentions third-party tools like TablePlus for more advanced database management.
  • Live Links and Integrations: Local by Flywheel allows users to create live links to their local sites, making it easy to share progress with clients or collaborators. Additionally, the tool offers integrations with hosting platforms like WP Engine and Flywheel for seamless site deployment.
  • Extensions and Add-Ons: Dustin discusses various add-ons and extensions available for Local by Flywheel, including instant reload for automatic CSS refresh, TablePlus integration, cloud backups, and debugging tools for text editors like Visual Studio Code or PHPStorm.
  • Pros and Cons: The podcast provides a list of pros and cons associated with using Local by Flywheel for local WordPress development. Pros include a user-friendly interface, quick setup, SSL support, and PHP version control. Cons include resource intensiveness and limited support for pushing to non-Flywheel hosts.
  • Workflow for Importing a Site: Dustin outlines the workflow for importing an existing live WordPress site into Local by Flywheel, including downloading files via FTP, syncing the database with WP Migrate DB Pro, and keeping the local and live environments in sync.

Links Shared During the Conversation:

Full Transcript

Business Transcription is provided by GMR Transcription.

[00:00:00] **Dustin:** On today's episode, we are going to do a full review of Local by Flywheel. Talk about why we like to develop on local environments and so much more right here on Your Website, Engineer podcast, episode number 537.

Hello and welcome to another episode of Your Website Engineer podcast. My name is Dustin Hartzler and today we're going to cut right to the chase. No announcements, no plugins. We're going to get right into Local by Flywheel. I've been using a local tools for years, just trying to make sure that I can develop more quickly and more efficiently.

And sometimes it's just a better experience to have everything contained on your computer. And I know a lot of people say, well, if I'm on an airplane, then I can work on sites. Well, that is true. But also on airplanes, now we have wifi. So it's not as big of a deal there. But I just like having the local environments just because it seems like I can develop a little bit faster.

You don't have to wait around for you to save the files and then you can upload them and then you have to bust the cash and make sure that you're actually loading the right version of your your CSS or whatever [00:01:00] adjustments you made. It's just it's all local. It just refreshes.

It's very quick. And we're gonna talk about the tool that I'm using these days right here in 2023. I've been using Local for maybe the last couple of years. Maybe I think even since my last computer upgrade was which was about two years ago at Automattic and I had been using something called Valet+ I'd use Local in the past.

I've used Desktop Server was another thing that was out there. Mamp. I really liked valet plus it was a command line tool that you could easily spin up a new site and shut it down and do all these things via the command line.

And it was always running in the background. I just always had so many configuration issues. And every time there was a new OS that came out like it would break the configuration that all my test sites would break. And it was just really a big hassle. And so I switched over to Local by Flywheel. It is a great.

You application that you can download. You can use it on Windows, Mac or Linux. So it's a cross platform tool and it allows you to create local sites. That's where the name came from. But you can create a WordPress site and then import a live site [00:02:00] to it.

So kind of my workflow is if I'm going to create a brand new site locally for a site that I already have, I can go into local, I can click the big X button or the big plus button and you can add a local site. When you do that, it's going to ask you if you wanted to create a new site completely for scratch.

Or you can create a blueprint. And so if you had blueprints installed, you could create some, a site with pre installed elements like plugins and themes. Maybe you always use the 2023 theme and you have these five plugins you want on every site. Then you could create that from a blueprint and it would automatically install all those things and your site would just be up and running with those things just immediately.

Since I'm not in the WordPress business right now of creating websites for other people, I don't normally start with a site and try to build it out all in flywheel.

I normally will go the other way. I have a site that's out there and I need to pull it into flywheel so I can start working on it. I do use the create a site feature every time a new version of WordPress comes out. If it's 6. 5, like I will create a new site and then I will pull in the details and I will [00:03:00] update it so that I have the latest version there.

But basically I will create a new site and then I'll pull in information from the web. Say, for example, I get a brand new computer, I'm going to install local the application first onto my computer and then I'm going to create my local sites and then I will pull in the information from my live websites that are out there. So I guess let's first talk a little bit about Flywheel, what it is and what you can do, some of the settings and different things. And then we'll talk about how to get a site into Flywheel.

So I've been skirting around a little bit about what flywheel is or what Local by Flywheel is. And it's actually a desktop application that provides a local development environment for WordPress. It allows you to set up a minimum web server environment for your computer, complete with the web server stuff.

So that's either Nginx or Apache. It gives you a database server. So that's MySQL and PHP, the server side scripting language that WordPress runs on. This environment is isolated from your live web server, which means you can sub safely develop and test your WordPress sites without affecting your live site.

And I've been talking for the last couple years about making sure that we're not using the bare [00:04:00] minimum of PHP.

You know, we're not using 7. 0 anymore or any 2. All those are kind of out the door. We're trying to get to 8. 1, 8. 19, 8. 2. And those are the those are the PHP versions that we're looking to get to. And within Local by Flywheel, you have the ability to change your PHP version. You can also change your, your web server.

So you can go between NGINX and Apache, depending on what your web host is using. So I think that's a really good thing that I never got with some of those other platforms the ability to write instantly click and change your PHP version and you can start to see is my site working? Is it not?

Is there things that are broken? It also has the ability to set up multi site If you were doing something that is a multi site environment, you can use multi site inside of Local by Flywheel as well They also have database tools so you can go in, you can open up the database directly so you can see exactly what's going on.

You can actually use third party tools as well. I know that there are, there's TablePlus out there and there's a few other table plugins or table applications that you can use to get [00:05:00] direct access to your database. There's also a tool that's built in called mail hog, and it is a it's a system that will take all outbound emails from your local site and intercept them and basically make sure that they don't go out.

So that's if you're doing a bunch of work on your website, and you want to make sure that you don't have send out subscription renewal emails or send out any newsletter blasts or things from your WordPress site that's automatically kind of happening in the background. Mail hog will just kind of take care of that and say, nope, none of these things are actually going to go out.

And it also has the ability to do live links so you can create a live link to your local environment, your local site. So if you are building a website for somebody, you can set this up so that you can automatically show them here's what's running on my computer and you can see this out there on the web.

It also has integrations with WP Engine and Flywheel, the two hosting companies that, I guess, WP Engine is the, the parent company now of Flywheel, and so you can connect to your platform and then you can automatically push and pull your sites. I don't have hosting with either of those places, but it does have those [00:06:00] integrations built in.

Another thing is there's a whole bunch of library add ons that you could add to your site. And this is one that I haven't even really looked in this in a few years. And there is one that is an instant reload made by the local WP team. And basically what that does is that watches your CSS files. And if it senses any change, it will automatically refresh your browser so that they will you will be able to see those changes live.

And so again, that's another speed up feature that allows you to do some quick customizations. You save and then your site just refreshes. So if you've got a big wide monitor, you can be looking at your code. You can refresh and then by the time your eyes move on to your, your screen that has a web browser, it will automatically have been refreshed.

There's an extension for table plus, which will give you one click access to the site's database via the app Tableplus that's in there.

There's also cloud backups which is an extension that you can add on and it will allow you to back up snapshots of this local development site. You can connect via google drive or dropbox. So you have that option there and you can automatically do that [00:07:00] as well So there's lots of add ons that That you can add.

There's also some some debugging between V. S. Code or P. H. P. Storm, depending on if you're using one of those tools to develop your site.

Those are the things that are built in. Let's talk a little bit about pros and cons, why we use this, why we went and then we'll talk about how to get a site into Local. So I think some of the pros are there is a very friendly user interface. Local by Flywheel provides a pretty intuitive, usually friendly interface, making accessible even without a lot of technical skills, like you can definitely figure out how to create a brand new site, how to access the WordPress dashboard on your local environment and how to view your site locally.

And that's all pretty simple. It also has some very quick settings. You can set up the settings on a page by page basis or a site by site basis as you go. Or there's a whole settings panel where you can go in and you can set your preferences for your new site default. So what you want the admin email to be, what the suffix can be. By default out of the box all your websites are dot local instead of like dot com or dot blog. They're dot local. And then you can [00:08:00] also set where all of those sites are installed. So I have mine in my root directory in a folder called Local, and then that's where they all go. That's just kind of how I have it set up.

The other nice part about Local by Flywheel is inside the settings for each site. There is an SSL certificate mode and so basically there's a one click SSL setup which essentially allows you to be able to run a secure version and make sure that you've got that little walk next to your your domain name Make sure that that is there when you're on a local environment as well. And lastly, one of the other big benefits of Local by Flywheel is like I said earlier, those different web server or PHP versions where you can toggle between those and you can check to see what your site looks like on either one of those.

It also local can also keep your WordPress version updated. If you're running an outdated version of WordPress inside the dashboard, you have the ability to update it and there's a button that you can just update and it will update that site automatically. There are some, some cons, of course, with any program that's out there there.

You could say that it's a resource intensive program. Especially if [00:09:00] you've got a couple sites running in the background or if you've got limited Ram or CPU usage in general, I used to always just open it up and let it run all the time, but lately it's like, well, I'm not developing, I'm not working on a site right now, so I'm just turn it off and not really need it.

The other con for me is that it always appears in your Windows switcher. It doesn't run in the admin bar. So on the Mac, if you do a command tab, it's going to cycle between all the applications that you have open and whether you have the window open or not, Flywheel is always going to be on that list.

And so that is just one con that I think. But in general, I, since I've been closing it when I'm not using it, it's not a huge deal.

Some of the cool features of like pushing from a local environment to a live server. They won't work if you don't have the Flywheel or WP Engine hosting. So that could be seen as a disadvantage of the plug in.

That's not a big deal for my workflow as I save all my changes and revisions as snapshots in git, and then I will push the git changes directly to the server. So I don't see that a lot, but I can see where that could be a little bit of a downfall. If you've done all this work [00:10:00] locally to develop your site and now there's no easy way to push a site to a server.

I can see where that could be a little bit of a problem, but there are ways around that.

So I think Local by Flywheel is a very valuable tool for WordPress development, especially for beginners or small to medium sized projects. It's very user interface. It's quick setup. It's usable features like blueprints and live links makes it a popular choice. I think it's the best thing that's out there for local development in the WordPress space in 2023.

And let's go ahead and dive in to talk about how to get a site into local. Here's how I would set up a local site for a site that's already created out there on the web somewhere.

Say for example, your website engineer. Let's just talk about that one. So I would go into local and then I always create a super short, short name for this URL. So your website engineer. com is actually ywe. local. And that's how I set it up. That's how I make sure that I don't know. It's just how I always take the first letter of each name or word in the domain. And I just that's how I do it. Like that's just my naming convention.

You can name it whatever you want, but I create that as a site and then make sure I can get that [00:11:00] up and working properly. So basically what that means is you create the site and then inside a Flywheel, there is a WP admin button and there's a, open site button in both of those will take you to the appropriate place.

And so the W. P. Admin button will actually log you in when that site is up and running, which is really, really handy. So you don't have to worry about okay, what's my login here? How do I get in? It automatically logs you in. And then the other button, the open site button will show you what the site looks like locally.

So I get that up and running and make sure that the default theme is working. Make sure you can see the hello world and all of that good jazz. Make sure that it's just working because it's, I've done it before where I've created a site and then I try to import a bunch of stuff and it's broken and then I realized it was broken before I started all of my putzing around and tinkering with things.

So once I've made sure that it's open and it functions properly, then is the point where we start making sure that we are setting it up and getting the information from the live server and put it into Local. So what I do then is the next step is always I will open [00:12:00] up via FTP. I'll go to my live server and I'll FTP into that area.

And what that means on a legacy site or a site that's got tons of content like yourwebsiteengineer. com, it's going to take a little while to download all that information. You could also use some sort of backup system, like if you have Jetpack backups or if you have any other plugins, updraft, any of the plugins that are out there that can back up your site, maybe you do a full backup and download that to your computer.

Because basically what you want to do is you want to get all of your files from your server and put them in your local install. So that's all your plugins, your themes in your uploads and depending on the size of the sites that could be a lot of information that could be a little information.

Once I have all the files in the correct places on my local site, your site still won't look right because you've got a new database versus the live database. And the way I keep my databases synced between local and live is I use a plugin called wp migrate db pro. And this basically what I'll do is I will on the local site. I will go into the settings for this plugin and it is a premium plugin. I don't know.

I think I pay a hundred dollars per year for a bunch of [00:13:00] sites. I don't know. It is by far the best tool to keep things in sync, but I will basically say here, I want to pull in from this site and then replace the, your website engineer. com and change that to YWE dot. local and then it goes and finds and replaces and does everything that it needs to pull in all the data.

This is going to pull in posts and pages and basically everything that's in my database. It's got to pull it in. And once that's done, it'll probably log you out of your site and then you log back into your site and it should just all magically work. Now, sometimes it doesn't work exactly like that, but kind of going through those steps, downloading the plugins, the themes and the content from the uploads and doing all of that and pulling in the database with WP Migrate DB Pro.

That is going to get you set up probably as quick as possible. And then what I do is maybe every three months, maybe six months, depends on how often I do it. I will do another poll with the WP Migrate DB pro and that way it'll get any blog posts or a podcast or anything that I've created or updated or if I've got a [00:14:00] WooCommerce store, it's going to pull in all the orders.

That basically is going to keep my development site in sync with my live site. So I do that regularly. And then I never do any changes to like pages or post on my local site. Those are always done on the live site. And so I just want to make sure that I'm never pushing from local to live because I don't want to overwrite any changes that I've made over there.

And keeping those two environments kind of in sync is really, really hard, especially a site that has a store on it and people are buying things from the store. You've got subscriptions that are auto renewing or things like that.

So I always keep the live site as the source of truth, if you will. And then I'm going to keep my local site as a copy of that. And it's not going to be perfectly in sync all the time, but it's going to have enough data that is going to be very valuable for me.

If I'm redesigning the site or I'm working on, Oh. I'm going to change this in the theme template or whatnot. I can do that locally and I can see it working on different posts or different pages, but I don't have to have all the latest content on my local environment. Plus having this a local environment, which is pretty much a clone is a really good backup [00:15:00] if you will.

And so if something would happen on your site and your, your host has lost in any backups and you still have your computer, you can always restore, you know, it's going to be a manual process of. Copying things via FTP backup to your server or whatnot, but you can recover a lot of things if you have a pretty active local environment with that is is synced with your live environment.

So that's kind of how I use Local I'm gonna create a site and then I will pull in all the database with WP migrate DB Pro and then I will copy and paste the plugins and whatnot. I also do with the with the local sites. I also do a bunch of testing.

And we've talked about other podcast episodes now where we can use WordPress playgrounds, or we can use TasteWP and quickly spin up a site with a plugin installed. So we don't need to do this very often, but sometimes you just need, I need WooCommerce and I need this plugin in this plugin.

I want to see if they all work together and how they work. And so for troubleshooting or testing or helping users or something, I could spin up a local site and I can have all those plugins installed and do a quick check there just to make sure how things are working. But [00:16:00] again, as we continue to kind of evolve in our WordPress space, that might not be necessary with WordPress playgrounds in the near future.

Lastly, as I wrap up here, Local by Flywheel is a free application that you can add to your computer so that you can develop locally. And so with all the pros, the cons, I think it is the best tool that's out there and it's free.

So I recommend this week giving it a try and seeing if you can not only just create a site to run locally, but to create a site and pull in content from a live environment.

I think it's a good exercise to be able to try to take a WordPress site that's on one server and say your live environment out there somewhere in the world and bring it to your local environment, which would be a different server because if you want to move from WP Engine over to Pressable or to WordPress. com, we need to know how WordPress works so we know the pieces that need to be moved. And so I think a good exercise is to get a local site and then pull in a live site from somewhere and then start being able to tinker with it. Maybe you, maybe this is the, the perfect time to switch to a full site editing [00:17:00] theme.

Like what happens if I switch to 2023? What is that going to do to my website? And then you can click around and you can look and it's not going to affect the live site at all. I've done so many boneheaded things when I was a developer and like, I'm going to do this on a live site and then something breaks.

And then I spend the next five hours trying to fix the thing that was broken so that the website still looks okay to the viewer. Whereas if you break something on your local site, you can still go to dinner or you can still like break when it's time to go to bed and it's only affecting the site on your computer.

So that's a long way to say. Local by Flywheel is the best tool that's out there to create local environments for WordPress sites where you can develop, play, customize, do your thing with WordPress and have it locally and you're the only person that you can see it.

There are a bunch of different tools and things that I can review in the WordPress space. If you've got something specific, let me know, head on over to yourwebsiteengineer. com and click the contact button and let me know what else I should review, whether that be a plugin, a premium plugin or some sort of theme or any of the other adjacent WordPress [00:18:00] related SaaS services that are out there.

Let me know. I want to dive in and learn about those and share my experiences with you all. So that's what I want to share with you this week. Take care and we'll talk again soon. For more great WordPress information, head on over to YourWebsiteEngineer. com