 Today we're going to talk about spinning up sites with local by flywheel, and again, my name is Dennis Stensmore You can reach out to me any one of these channels LinkedIn Facebook Twitter or just email me directly if you got questions about the presentation or questions about flywheel WordPress, whatever hit me up So I'll skip through these. She did a good job introducing me. So Started as a screen printer Moved Arizona and ten at Collins College. I originally did graphic design, but really got into the web and Kind of took off from there Did a lot of flash development, which is cool because I learned PHP my sequel which WordPress is built on So kind of got a head start on what I did in WordPress Started building WordPress in 2010 and never looked back since then. I still love everything about WordPress I've worked for some of the biggest agencies in Valley. I worked for a tear lever land tear lever blue media So I've been really lucky to have some really good jobs around here I know we'll work full full time for lights out interactive my own company and I work in cahoots a co-working space in Midtown Phoenix I love to play FIFA The last job I was at we played a couple soccer matches during lunch and we'd play soccer match before I leave So I got really competitive with that. I love the golf. I love to play the guitar when I'm not doing that I love to hang out with my sidekick Shakespeare I will say this please save your questions till the end. I'm gonna buzz through this real quick I'm gonna have some live screencasts that you guys can watch. I'll take questions at the end But I want to make sure I can get through as much as I can so Local environments are really cool before I started developing locally on my own computer. I Used to have a separate staging site which was okay I mean you could put stuff up there you could test it But you used to have to use like an FTP so I'm gonna push this PHP file now I'm gonna push the CSS file. I hit refresh. Okay, that didn't really work. So now I got to push them again Well now the FTP hung up. So it's pretty painful and pretty slow So it was also just really difficult to make quick changes I Got a new job with some better developers and they really taught me pretty quickly and they said It's pretty much a requirement that you start using local websites to do your development So I was really lucky that they pushed me in that direction. I used map at first, which was good But today I'm going to show you how to use local by flywheel So now that we're doing local development You can set up an environment with a matter of seconds with WordPress already installed, which is a huge bonus You can pull down a live site Let's say you're testing a site or you take over a site or you're debugging a site You can pull it down you can set it up locally and you can really kick the tires You can look underneath the hood. You can really do a lot of cool things with it You can test it in different hosting environments. Sometimes I pulled down a site. It was the wrong version of the PHP An old developer or someone did it before me and they were using a different version of PHP So there's a lot of things you can change and test You can also enable PHP debugging, which is really really great I use PHP storm now and at my last job I was still using an older Older piece of software and I was kind of stubborn to change But when my boss showed me the debugging that he did I said wow I have to have that And I'll show you that here in a little bit But you can also test caching which is important. A lot of times you'll build a site and you have it working locally Or you have it working on your saving site and you push it to the live site And it's got some really advanced caching and it can actually do some negative things that you didn't really think of So that's really good to test locally All right, so installing local by flywheel. This works on a Mac. This works on a PC. You go to their site It's a free download you put in your name your email pretty basic stuff You download the site and it just installs like it would a normal You know PC or Mac program Spinning up a site on local as easy as one two three and we'll go through that real quick here So there's a site setup that you set up initially You set up your environment and you set up the WordPress install So I'm gonna go through this real quick I'll review it here in a second, but alright. I'm gonna hit a new site you name the site This is really just kind of a label of what you want to do underneath the advanced options It's gonna create a URL for you. I always kind of check it. I'm picky about what my URL is even though it's only local and So the the WordPress setup here you enter your password The other stuff is usually set up from your initial install and I'm gonna hit add site So it starts doing the things in the background and installing WordPress installing a local site And now it's already up. So I click view site And now I have a site running locally on my computer with WordPress installed the latest version Just like that We did it. That's it And under 30 seconds we spun up a new local site So let's review how we spun up the site And we'll also review the other options that you can do for it So the easiest one two three the first one is the site setup. We have some advanced options. So we can say What our local site domain is gonna be again, it's gonna kind of take its best guess from whatever you label it But sometimes you maybe want to add a different dash or you want a different naming convention Maybe you want it the same as what your live site is. So you've got that option Your local site path where it's actually stored on your computer when you set up flywheel the first time or local by flywheel It's gonna have a default folder. Maybe you want to change it. Usually I just leave it the same And you can also create from a blueprint, which is really cool. We'll talk about that a little bit later So let's go through this again because we went through it really quick the first time So the first step of the site setup again, we're gonna give it a name and under the advanced options We're gonna look at the domain setup Where it's actually stored on your local computer? I just leave it in the flywheel sites folder that I've set up for myself and An option of whether or not you want to use a blueprint. We're not gonna do that for this part now But I'll show you how to do that here in a little bit So set up the environment so there's two main environments that you can choose There's a preferred environment, which is preferred by flywheel and flywheel is a hosting company much like Bluehost Much like WP engine like go daddy, but it's really built it's managed WordPress So it's really built for WordPress their preferred environment when you set it up locally It's gonna match what they have up there. So I'll use varnish caching It'll have like all their advanced options that they have up there So it mirrors their hosting with the caching as I said it supports connect to flywheel So once you set your site up locally with the push of a button You can actually push your site up to a flywheel account, which is really really slick But you have to use a preferred environment to do that Local PHP however is not enabled on the preferred environment, which is kind of a bummer Talk to them. Hopefully they're gonna fix that in later versions So here we're gonna set up our preferred environment It's really just selecting the left tab and it's got a little green light there Saying that it supports connect to flywheel So that's as easy as that one now the custom environment you can do a lot of other things This is what I was talking about like maybe you're pulling down a site Maybe you need to change the PHP version. Maybe you need to change the sequel version You've got all your different options in here. So Again, you select your custom environments your PHP version your web server. You're my sequel version But this supports local PHP debugging, which is huge I'll show you that in a minute as well Again, that totally changed my life and made me a much better developer by doing that So here we're gonna select the custom environment. You can select a different PHP version In the PHP version up here It's got like a little download sign and it's saying hey, we don't have that version of PHP installed on your computer So it's gonna have to do that You can change between engine X and Apache. Honestly, I'm not like a super advanced server guy So I just kind of go with what works best But I have had a site that didn't work on engine X and on Apache it did and vice versa So sometimes it's easy to change or sometimes you need to change it It's easy to do and you can also change your version of my sequel So the setup WordPress when you initially install Local by flywheel you have some defaults like WordPress username. So it's always going to be mines like lights out admin You're gonna have a WordPress password that you have to enter every single time And a WordPress email which again it takes your default of what you've set up initially It'll have some advanced options, which is whether or not it's a multi-site And if you choose a multi-site, whether you want it to be used by the sub directory or if you want it to be used by sub domain So let's look at that part of the setup. So in here you enter your WordPress password You could just use like password or your name because you're just doing it locally But I still recommend using a strong password because maybe you're gonna upload it Or push it, you know in a couple weeks and you forget like I've got a really weak password So best practice is always to use a good password And whether or not it's multi-site and the multi-site options that you want to do in there Okay, so that's how we do it Now that we've spun up a site, let's look at how to make changes to a server once it's up live And we'll also look at the other cool features that local has to offer So updating the site setup you can change the WordPress version Actually, if it's out of date, you can just update WordPress with the click of a button You could do that in your browser as well, but this is sometimes a little bit easier You can change your PHP version again if you're testing and you're really trying to fix what's wrong with the site and trying to Debug it. That's a good way to go Again newer versions you might have to download if it's PHP versions and you can change web servers Like I talked about before from engine X to Apache or vice versa So once the site is set up you come in here and you're in the site setup tab So you come in here this version of WordPress is out of date and we'll look at the actual site that's running locally It says hey, you know WordPress needs to be updated You can do it was just click of a button in here. It seems to work quicker and seems to be a little bit easier to update that there So it's updating right now. Boom. It's updated. You come in here hit refresh. Okay, so we're on the latest version of WordPress So you can also update the latest version of PHP again if it has a little download icon it may take a minute to To download that dependency you can change server types And that's it for that So also you can change the site domain now This is really cool because you know again, maybe you're just picky like I am sometimes you want to change the actual local name of it But normally when you change a domain name with WordPress you have to do a find and replace in the database This automatically does it for you. So it can be great for deploying to a staging site Let's say you've got your site running locally and okay That's the way I want to go and I'm pushing it to a staging site and I can change the domain name on the fly and then just kind of push it up It's also great from changing it from a WWW to a non dub dub dub or vice versa So in here you can just click change and it'll allow you So you go into the site setup and you click change This will allow you to actually just enter a new domain name Click change domain and that rolls all the way through again This seems like pretty simple to do but this tool actually makes it really simple So we change it from local to staging. I can change it to comm it's actually using your local host file So even though it's comm it's going to find this one before it finds the one that's on the web So even if you want to pull down a live site and you don't want to actually have to change the domain name You can just work with the comm and you're actually working with your local site Or you can change with the dub dub dub So I'll skip ahead a little bit here So it has some really cool tools as well and one of them is a database tool It uses two options it can use Adminer, which is a great option update and manage your database It's very similar to PHP my admin. It's a web-based way to actually manage your database or you can use sequel pro On the Mac at least I don't know what options they have for PC. I actually haven't tried it, but for on the Mac sequel pro is a really cool tool. So first we'll look at Adminer when you come into the database tab You click on Adminer and it'll actually just launch the web-based version of it So in here you can go into One of the great things If you want to just update any kind of option in your in your website, that's easy thing to do Oftentimes it's easy to export your database Which is great if you're making any kind of extreme changes or you're doing any kind of testing or Trying some new things out. It's really easy to export your database Which is you know a huge cornerstone when you're actually doing any kind of local development So you click and make sure that you're saving it as a file you export it and it goes right into your downloads folder Which is really cool when I've done like any kind of new development a lot of times I'll I'll do a lot of saves of my database just to make sure I'm saving stuff as I go The other option is a sequel pro option, which does really the same thing But it's a desktop version of it, which is a little bit more slick. It seems to update quicker and It's just kind of what you prefer, but this is a really cool tool that Is more of an app version of it, so I'm gonna do the same kind of thing I'm gonna come into my site options. I'm gonna change the tagline of the website And also show you how to download Latest version of your database Hello, we're camp. So again the export works pretty similar again. It's just a little bit of a different interface But a really cool tool to have So SSL Nowadays, it's really really easy to have every site be SSL and there's so many options to do it And so it's highly recommended But if you're using a WooCommerce site or anything where you're collecting any kind of sensitive data It's super important to do for your clients. The problem used to be If I would download a site that's SSL Using map or using other programs. Sometimes it's harder to get it running. It's super easy and local So some of the options that will show you the open SSL version. It'll show you the certificate But the easy part is really just click of a button again It's a must have when pulling down a secure site I used to pull down secure sites and sometimes I would just not use SSL But you kind of run into problems So the third tab when you're actually in the site setup you come in here in this SSL right now I haven't turned this on so it's kind of grayed out and we look at the site and we're gonna look at it as an HTTPS site and You guys have probably seen this before your site is not secure So here we just click the button trust and it's basically installed in SSL for us So now we'll refresh it and it works just as you'd expect and if you don't do that Not only can you say like okay? I do trust this site, but it's gonna give you errors of hey You're using mixed content some contents being loaded secure some of it's not so this is really really slick and Basically by default I turned it on because all my sites that I'm running Up on the up on the web or HTTPS anyhow, so just really helps for consistency So let's look at some utilities blueprints is really really cool. So When I ever I develop something locally or start a new project, I always use advanced custom fields That's my favorite plugin and I use usually a boilerplate. I've got a couple different ones Some of them are really slim others are really built out, but this can really help your Your your time frame of okay, I'm gonna use these same plugins. I'm gonna use the same theme So you can build works WordPress sites faster with blueprints You can save your themes and plugins in a neat pre and solve little package So I set up one called lights out bones. It's like it's just a simple simple framework theme It's really basic when I start and then I really add everything to it and again. I add advanced custom fields. So Going back to the beginning. We're gonna set up a new site We're gonna call it word camp blueprint 2018 and under our advanced options. There's option for I'm gonna choose lights out bones So now this is spinning up. It does take a little bit longer because it's pulling in the database of what I say before It's also pulling in a plugin. It's also pulling in a theme So it does take just a little bit longer, but it's still only like 30 seconds So we'll let that spin up for just a second here So again, I don't have any styles or anything. This is just like super boilerplate for me And we'll log in. We'll take a look at the site and just starting out My favorite plugins is installed and go and look at the theme. All right. It's the theme that I had set up So You know, it really pays to start off with something. Maybe you use a bootstrap Maybe use a certain kind of theme beaver builder or whatever it may be It's worth your time if you're always doing that to set it up initially and use that blueprint Some other utilities mail hog. So this is really cool I've developed a lot of custom websites where there's custom notifications to clients and Sometimes you could be developing on and say all right there's a test email that went out and maybe it actually emailed a bunch of users and it wasn't supposed to or The actual admin address was for the main your main client. You're a CEO of a company and that's going to them So you don't really want that to happen. So mail hog is an email testing tool for developers It's got like a similar UI as gmail or a yahoo platform And it'll intercept an email. So Anything you're doing locally any email you send out will actually get filtered through this Again, it prevents testing emails from going to your clients So we'll come in here underneath the utilities you enable mail hog And I'll actually pop open the window. So it just looks like a gmail or a yahoo Mail and it already shows there's an email in there from the first site setup I'm going to go in here and I'm going to change the email address the main one for the WordPress site And whenever you do that, it's going to say hey, we sent out an email and you have to confirm that you want to change your email So we're going to do that here We'll click save changes and it's giving us a message. Hey, you need to confirm that So normally that would get sent to that email, but here it's actually in mail hog So we'll take a look at it. You can confirm it if you wanted to So just a really really slick utility for local development Connect to flywheel. So I talked about this in the beginning again, you need It'll pair up local by flywheel for delightfully simple development workflow. That's kind of their language that I stole You can push or pull your site to a flywheel hosting plan with the push of a button And it's not supported with custom environments So if you're doing some really good debugging with like change of php and stuff as we talked about that is not supported at this time um, so We're going to spin up a new site. We're going to call this word camp flywheel Connect And for this one, we're going to make sure it's a preferred environment. You'll see the green light on underneath this saying hey, this supports it In our password So i've already gone before I did this demo I've already gone and set up an actual hosting slot for it like in my flywheel hosting account So this gets spun up and we're going to take a look at the local site That's just how you push the flywheel. So we'll look at the local site How many people have actually used flywheel? Okay, so we got a good amount of people. Okay, so good. So In here, we'll make a change and kind of show like hey, this is the local one And then I'll show the live one and kind of show how how the difference is Um, I will connect so cool So again, this is our local site And in my actual flywheel account Um, I've already set up a hosting space for it So when you click the connect button You can say push the flywheel and it'll basically just ask I've already connected my account to it Um, so I'm going to push it to word camp flywheel It also creates a backup of it on your hosting account So if you push it and you made a mistake, you can always roll it back, which is really slick Takes a couple minutes. It actually doesn't take long. I've I've pushed a bigger site and I thought wow This might take a half an hour, but it took like less than three or four minutes. So It does a really good job of that And there it is so it's up on the the flywheel site the the pool works basically the the same kind of feature You can also exclude the database. So let's just say you made a bunch of changes to your php files and your templates or your theme It's easy to just do that and not the database X debug so this is what really really turned me on to it as well It's an extension for php to assist with debugging and developing I use it with php storm For this presentation, but I know it works with other id's as well And you must have the x debug extension in chrome for this to work Um, I assume it works on other browsers as well, but I've only used in the chrome browser And again, this is not the the debugging is not supported in their preferred environment So you kind of have to choose are you going to be pushing and pulling or are you going to be doing local debugging? So I've already got this site set up For the x debug you just hit enable and so that actually starts working right off the bat There's the the extension for chrome And I've already installed that before the demo. So this is php storm and I just have I have the functions file opened So I'm going to put a breakpoint online 15 And that's basically going to say um, and I'm also putting globals in my watch. So I'm going to watch that php variable So I hit refresh And because I put a breakpoint in there it stops online 15. So it's going to run the wordpress Locally, but as soon as it hits that line 15 because I said a breakpoint it says wait Hang on I'm going to stop and I'm going to look at what we got going on here. Um, so I watched the variable globals and if you saw I actually opened up um, and saw what was inside that whole array Um Over here in the variables section it shows basically every variable that's inside of wordpress So if you're building some kind of new theme or if you're trying to build a plug-in or if you're building anything Um, and if it were the olden days where I would have to push to a staging site I can't really see what's going on inside of php And if something's not working I could spit it out into the browser and kind of try and look at it But again, that takes time. You have to push the php file through ftp You have to refresh and hope that it's printing out the right variables And so it's it's crazy and it takes a long time here. You've got this whole interface of saying Oh, I'm going to grab that variable and here's what it actually equals So really really great for any kind of advanced php developing that you do That all makes sense to everybody I know I asked no questions yet, but Um, there's a live link feature Um, so if you're developing a site locally, um, this will enable you to actually see it through the web Um, so you don't actually have to push it anywhere Um, so it's great for developing a staging site for a client Maybe you're just doing a new feature and you say hey, will you check this out and see if this is working? Um, be careful of a beginning index. So google can actually find these sites Um, so it's really important that you actually make sure that doesn't get indexed And somebody actually interested interestingly Asked me at a meet-up. They said I haven't set up local psychism afraid. My computer is going to get hacked I don't think there's any chance of that and I've asked people who are smarter than me about that and they said, you know Not that I know of But because it is connecting to your computer, maybe there's a vulnerability. I mean everything's hackable nowadays. It seems Um, I don't know any anything about that, but I thought I'd bring it up and maybe it's something to keep your eye out for Um, but enabling live link is just a button down there and it's going to generate just kind of a random URL And you pop that open and now you're looking at this not from your local computer But this is actually being served up through the web Um, so again, like you could use this as like a testing For a client like hey, here's how the new site's looking. This is how it goes. You don't have to push it up to a staging server So that's a really really cool feature Again, like in this demo, I'll show How to actually block it from robots, which I think most of us know how to do I make a couple changes and kind of show That it's actually changed through the through the live section, but in your settings here Well, so I'll go ahead. I make a I say hey, this is a live link site Save the changes We're looking at the actual I'll skip through that. I'll take questions if you guys got so that's it. Um That's kind of how the live link works. Um, I'll take any more questions on that if you got Any questions? Yes Yeah, I can hear that. So, um, it's a great question. So it does this does this prevent you from using any other Different kind of hosting plan. Um, is there anything that stops it from from doing that or do you have to use flywheel? Absolutely not. Um, the last place that I worked we pretty exclusively used wp engine But this was just the best local environment that we could use So you could still if you um, if you want to use some kind of automated service that uses get You could do that if you wanted to use fdp, you could do that as well So that's just an extra feature that kind of pays if you if you have flywheel I just started using them because I like local so much and it's easy for me to push and pull There's still some limitations You know Compared to setting something up super advanced for yourself. So You can use any hosting whatsoever. So this is really just a great tool to to get it running locally Yes Sure Um, I don't know how it's done behind the scenes. So the question was how does the live link work and She works with her clients and really wants to show them as you're working. So that's one reason she hasn't done a locally So I don't know how the technology works. I know some other advanced people could probably tell you But you basically just enable by clicking a button and it's going to give you a random url It's kind of just so it's just generating something that you can see You click on that link and you open it up and it is showing you like so you could you could come from your computer And look at what I've done on my local machine. So it basically is just like a gateway into your computer, right? It is a little bit weird and I have had it to where it says like you're using too many resources So it's it's somewhat limited But it's just instant and a really cool way to show somebody really quick You could still push it to a staging site and show your client and say, hey, you know Here's what I've done. But this is just another option. Does that make sense? Awesome. Absolutely. Yeah, so it's being right right, so She's saying, you know, it's it's not just something that's on your local computer. It's a link you can send to your client Absolutely, you No, it actually just goes through the web and that's why it's generating kind of a random url because it needs to make sure that it's unique Um, and your computer I'm sure has to be turned on because it's really serving it through your computer, right? So again, that's why it's dangerous if you don't go into your site settings and say Do not allow robots or do not allow the site to be indexed Google might index it which could hurt you from an SEO standpoint if you have another site out there somewhere, right? So I've had that happen to other developers that I've worked with it was a cool new feature And they were like, hey, I'm going to use this and all of a sudden I was getting indexed And I was actually hurting the SEO value because of kind of duplicate content so you got to be careful with that but It's it's just another cool feature that it has Good question. So the question is setting up a blueprint. Is there a lot to configure to it or or how is that set up? So I have lists of sites right here Let's uh, so the word camp Word camp flywheel 2018 you basically right click on it and save as a blueprint And we're going to call the blueprint uh word camp flywheel 2018 save the blueprint it's saving right now That's it. So you could spin up a new local site get it. You know, here's my here's a bootstrap and here's sass and here's Whatever you want it to be. Here's my beaver builder. Here's advanced custom fields Save it as a blueprint next time you install a new site. You just use that blueprint Yeah, good question. So yes. Yeah. Um, so the question is can you access the the files from your mac? So I actually have a shortcut over here and here's like all my sites that have been added So as soon as you spin up a site, um flywheel blueprint 2018 So you come in here and the structure is basically app public And then here's your whole WordPress site. So instead of having to fdp all your files are right here I crack open that php file. I start making changes. I open the css file. I make changes as happens right there And you think like well, okay It only takes a couple minutes to upload it to but if you're if you have to do that a hundred times I mean, I actually saw a presentation talking about saving 30 seconds I don't I remember what the calculation was but basically if you can save 30 seconds here and there you can take a vacation, right? So this is really really huge of I mean it's been a game changer of of building sites locally on my computer Yes Um, I still have the question is if you have map or zamper running on your computer Do you have to get rid of that or does it conflict? I have had no issues with that I I have both installed on my computer I just leave maps turned off right now because this has been so much better for me Maps is a fine tool and I use that for years, but like configuring SSL or HTTPS was difficult and and painful And it didn't have the same kind of tools that this has This just plus like um if you if you spun up a site on map It didn't have WordPress installed immediately It didn't have kind of the WordPress configuration in it. It's great for spinning up a local site But not really focused on WordPress. So that's why I like this so much better Yeah Yeah, good question. So if you're using another host like wp engine or go daddy Is there a quick way to find out what they're using in their infrastructure? Um A quick way no, I mean not that I know of I mean, I'm sure you could do like a php info file And kind of try and figure it out. Um, I actually asked some of the developers I worked out with like the caching is tough if your caching isn't the same environment And I've talked to other again developers are better than me and I was like How can we get the environment to match what they do? But some people aren't going to tell you that they're secret sauce, right? So Yeah, yeah, but again, if you if you use fly will then you know, you're going to be using their same Environment if you use preferred. So there is an advantage to using that and kind of keeping it all under one roof Um any other questions? Yeah, I'm not exactly sure. So you're not using a windows or Yeah, uh, uh So the question was she works on windows, but uses linux and unix servers Um, I think if you just installed it on windows itself, it's going to take care of all the platform and stuff underneath it So it's really they pride themselves. They actually say it's built for designers. So um, you know Yeah Exactly. Yeah, this is this is a lot more, you know user interface Agui and just kind of push button kind of style. So it's really slick Yeah, so she asked I mentioned a managed wordpress about flywheel and is this the same as managed wordpress. So Managed wordpress sites. Um, usually they offer like daily backups. They'll also automatically Update the wordpress version for you. Um, so that's a little bit of a different thing Like you could just you could get like a shared hosting account of go daddy But it's not really set up if it's not a managed wordpress site It's not really built for wordpress specifically And so you could there's more vulnerabilities to be hacked because it's not automatically updating wordpress And it just doesn't have features for that. So that's what we mean when you talk about managed wordpress So this is more of a local environment. So it's not technically kind of managed wordpress. It's just a local tool But it kind of ties into that So if you got any other questions come see me afterwards. Um, here's some resources CSS tricks had a good article about it. Um, their their, uh, documentation is really good There's a link to blueprints. Um, if you don't have time to type this out right now Slides will be available later. There's a few different cool articles about x bug and also connect the flywheel and also capital w capital c phoenix Is a promo code if you guys want to get a flywheel hosting account Their cheapest one is 15 bucks, but um, I got them to give you a 50 percent promo code for that Just for word camp people So you can sign up for that and kind of try it out for 30 days And even if you don't like it after 30 days, you can get your money back from that But it it at least saves you a little bit of money. So wc phoenix capital wcp And thank you Also guys, um come see me afterwards. I actually got some flywheel swag So I got some t-shirts and stickers if you want that or if you got any questions or want to talk more about it Thank you