 And I have worked with local development environments starting all the way back from having Linux on my desktop and manually compiling Apache all the way up to the modern day. A little bit about me, I am from Michigan and that's where it is. You can see we have an upper peninsula and a lower peninsula. Two parts to the same state and we're disconnected. People from the upper peninsula, that's the UP, they're called upers. There's a bridge between the peninsulas and people in the lower peninsula are called trolls because we live below the bridge. The temperature there in ground up is the same as here today except it's summer there. This is what our summer is like. Our winters are like this. The top two are my street. This is a parking lot and the machine there is what they used to make these giant piles of snow. This is a little unusual. We still talk about that winter, we got all that snow. But it's not that uncommon. It happened several times in my life. Incidentally, it also gets very cold there and I learned that minus 40 Celsius is the same as minus 40 Fahrenheit because that's how cold it gets there. So let's talk about local development. Why? Why would you do this? And perhaps I should start with what is it? It means running a server on your laptop or your desktop or something not on the internet per se. You could do it on a Raspberry Pi even inside your house. Excuse me. It doesn't have to necessarily be related to your live website. Many people think, well, how am I going to use this for my live website? You may not at all. For educational purposes, you can easily start up a WordPress site, download some plugin that you think might be interesting, find out that it's going to melt your site and throw it away. And no harm done. It's very quick. It's very easy. Just a few button clicks and 30 seconds you have a website up. 30 seconds later, it's gone. No harm done. You can work without the internet. So if you have a long train ride, a long plane ride or you have family with a farm someplace and you just want to go away for the weekend and still need to work but without the internet, you can. Now, something to remember about WordPress is that every time you load a web page in WordPress, it wants to talk to the internet. So if you are without the internet, it will just hang and run and run and run. So a nice young man named Andrew Norcross wrote a plugin called airplane mode which turns all that off. And you can put your website into airplane mode and then it won't try to talk to the internet every time. So this all only works if you have locally all the documentation you need and all the code in your head and you don't need the internet. But many people do. I know a lot of people that will go away and get offline and work for days at a time. You can potentially recreate crazy server environments. They don't even have to be that crazy. WordPress.com has a unique server environment and so they set up a VVV instance and give it to every employee. So they can develop on that and everybody has the same thing. So if you have multiple employees and you're working on a unique environment, you can craft a clone of the live server and distribute that. And the last point I just said. I'm going to go through my slides pretty quick and then I'm going to do some demonstrations. So I want to talk about the old hard ways. LAMP is Linux, Apache, MySQL, PHP, Perl, Python, and every other P language. That's the old standby. That's how the internet was built. Then people wanted to run it on their Mac and so they made MAMP and then Windows. So we have WAMP and then somebody said, well, we should abstract that and make it run on all of them. So then we have ZAMP. These actually install the software on your computer. So you get Apache, you get MySQL, you get PHP. Now Macintoshes, these days, OS 10, come with that. And it works to use them, but they're kind of old versions. So most people either don't install them or have to uninstall them if they came that way. Now, something else I want to point out is all of these old hard ways are still in current use and they're very valid and they work. So if you're already doing this and you like it, by all means carry on. This is good stuff. There are just easier ways these days. Varying vagrant vagrants. Excuse me. Vagrant is a system for making recipes for virtual machines. People usually use it with virtual box. So you use vagrant to create a recipe that says I want this version of this software and this version of this software and I want them all installed in this order. And then you can distribute that recipe and somebody can pull down just the recipe and run it and it will install Linux and Apache and MySQL and all that kind of stuff. So varying vagrant vagrants is a specifically WordPress oriented system. So the recipe is WordPress. There's a GitHub repo for this and it's heavily maintained. It's up to date. It works great. And I'll get in a few minutes to the reason why I don't like it anymore. Docker is similar, but uses fewer resources with VVD. Each instance is a complete virtual machine. So if your virtual machine needs four gig of RAM and then you do another one and another one, you've now used 12 gig of RAM. And if your machine only has 16, it's going to start crying. Docker only spins up one instance of a virtual machine and then multiple instances of only the web hosting part. So you only give up that initial four gig. Again, it's wonderful. It works very well. One of the examples we're going to look at today uses Docker, but I don't prefer Docker straight up myself. So the awesome new ways. Yes, okay. So the new ways extend the old ways. One of them, as I said, uses Docker. The other one uses XAMP. So they're still using the old ways, but they've extended it to allow for things like creating site templates. So they call them blueprints. So you install WordPress, you install your favorite plugins, you get everything configured, and you save that. And the next time you start a project, you start there, which might save you half an hour of configuring WordPress and installing plugins every time. Ngrock is a service that's not related to WordPress, but allows you to provide a short-term URL that works through firewalls to your local machine. So you can fire this up and get this weird little URL and give it to anybody on the Internet, and they can see your web server on your machine. And it only lasts for half an hour or so. So it's not like they can get into your machine forever. But it allows you to build something here, send it to your coworker, your client, your friend, whatever it say. Hey, look, what do you think? And they give you feedback and then it's gone. Easy, important export. This is great. The local by flywheel does it best, but you can build a site in local and hit the export button and you get a zip file. You send the zip file to your friend and they drag it into the local UI and seven minutes later they have exactly what you built. And then they can do whatever they need to with it. This is good for backups for yourself. It's good for sharing what you've done with your friend. It goes beyond the NROC idea where they're just looking at it. You're actually sending them all the code so they can build on that. So these are ways that the new software extends the old software. We're going to look today at two of them, local by flywheel and desktop server. Let's see here. So local uses Docker. So the very first time you fire it up, it downloads Linux and installs it. And it's called provisioning. It provisions the whole thing. So the first time you install it, it can take 15 or 20 minutes to start up. And I didn't know that. It's not documented. So the first time I did it, I turned it off halfway through and it broke a lot of things. So don't do that. Just go get a drink. So it uses Docker and this means everything is self-contained. Everything's separate from your machine. Everything is very encapsulated. Because it's owned by flywheel, it has tight integration with flywheel as a host. Because it's owned by flywheel, it does not have tight integration with any other host. So keep that in mind. I use it. I like it. I don't host on flywheel, but I still like it a lot. That integration just is irrelevant for me. The great thing is that you can choose when you're setting up a WordPress install from multiple versions of PHP and MySQL. So I think it has three different versions of PHP and no, three different versions of PHP 7, several PHP 5, two different MySQL, et cetera. So you can, to a certain extent, replicate what your server is running. And I learned that there is a big difference between MySQL 5.5 and 5.6. It really matters. So yeah, I have in here Docker based under both pros and cons. The pro is that everything is encapsulated. It's very neat and clean. If you want to throw it away, you just drag the whole thing in the trash and everything's gone. On the other hand, it's sucking up 4G of RAM all the time when it's running. And that's annoying to me. I want that stuff back. Desktop server by server press is very, very comparable. I'd like to point out that between these two, I would say they have feature parity and you should try whichever one you like or use the whichever one you like. One of the great things about it is it can easily import common backup formats. So if you use backup buddy, you can just import your zip file and you have your site. What's another common backup plugin? Anybody? What's that? Yes. That'll import from there as well. So that's really handy because if a client comes to you and says, oh, my site's broken. Can you help me fix it? You say, well, do you have a zip file? A backup? Oh yeah. You just install it locally and take a look at their site. It is zam-based, which means it's running Apache, MySQL, PHP locally, and it's not using 4G of your RAM or whatever you're giving your machine. It has good integration with most hosts, and it does it differently based on what each host needs. So some hosts, it wants your FTP credentials, but others it'll work over SSH. And so on and so forth. That's really handy. And it has a plugin system, and I'll show it to you in a minute, but there are features you can turn on and off based on whether you need them. For example, it comes with airplane mode. You just turn it on or off at the desktop server level, and it applies to all your machines at the same time. Cons, there is a lack of choice in software versions. You don't get to pick your PHP. You don't get to pick MySQL. Now for a long time, it ran PHP 5, and everyone was sad, but now they have moved to 7.002 or something like that. So it's much more relevant to modern WordPress hosting situations. Again, the con is how it's run on XAMP. XAMP is old. It's been around for many, many years and has at times not been supported. It is supported now, and so there continues to be new versions. But desktop server is already aware that they need to be thinking ahead to running their own stack and not being based on XAMP because it could go away. Okay, so that's my last slide. I'm going to show you some examples. I lost my mouse. Do you see a mouse? Oh, there it is. So let's fire up local. This is what the UI looks like. You can right-click on each or any of these machines. You can view site. Go to the admin dashboard in WordPress. Look at the file system and finder. You can open the site in SSH, and this is an important thing because local runs on Docker. If you want to use WPCLI, you have to SSH into the Docker instance and use it there. Now, if you just want to edit a file, you can pull it up in the file system on your Mac and do that directly. But if you want WPCLI, you have to SSH, and it's really easy. You just push that button and I mean, you can restart, stop, clone, export, save as a blueprint. You can change the domain. So I'm running heropress.local right now. I can change it to anything else. I can rename it or delete it. As you can see here, I'm running nginx instead of apache. That is a choice. You get the option of server, 703, and you can change that. That's also unique to local. Here's where my files are. For database access, it comes with Adminer, and if you have SQL Pro, it will use it. Adminer is a web-based thing. I don't know why they don't use PHP MyAdmin because that's the best, but they don't. So you can simply click and it will fire up the database like that. And you can see how quick that just appears. SSL. I have it off right now. If I click trust and log in, now it has an SSL certificate all set up. Now when I go there, it says, hey, you have a self-signed certificate. We're going to freak out now. And so you still need to permanently accept. But that's it. That's all there is to setting up SSL. For utilities, it uses a mail hog to catch emails. So when WordPress sends an email, it doesn't actually send it. It goes into mail hogs, fake email client. And you can log in there and see all the messages that come in and out. So this allows you to work with email without actually sending email, which wouldn't work if you were offline. Live link here at the bottom. Enable. I click that. And I get this address, which I will make large. It takes a minute because it's going out to the Internet and trying to poke a hole back through this firewall, which it usually manages to do. We'll see if it works. I don't think it is going to work. Oh, there it did. So anybody who wants to, right now, you can go to 57e7a694.nrock.io and get this website. That is pretty much all there is to local. Here, I'll fire up a new one. We'll call it, oops, WordCamp Sydney. Yeah, we won't do any advanced ones. Preferred is php717 nginxinvarnish-ql5.6, but you can switch to custom and choose whatever you want. Then I continue. Your WordPress password can usually be something stupid, like I have RepHot right now, because it's local. People can't get here. And your WordPress email usually doesn't matter because it's going to send email to MailHog anyway. We add site and it's provisioning. And I have to put in my password because it wants to talk to the host's file. Come on, little engine, go. There we go. View site. That's how long it takes to build a new WordPress site. And then when I'm done with it, or actually, let me show you this. I'm going to export. And you can exclude file types. Export site to my desktop. And that's done. So now I can delete this machine. Now it's updating the host's file to get rid of that domain name. And it's done. So now, pretend that I am someone else. I just got emailed this zip file. I dropped to import site. I need to confirm the same settings. And the same amount of time it took is last time to reprovision this website. Now I'd like to point out that on large sites, this import and export can take a lot longer. So if you've got hundreds of JPEGs and millions of database files, uh-oh, there we go. Then it can take a lot longer. Something else to remember. Let's see, where's... Stop all. You can't run more than one in local environment setup system at the same time. They will conflict. Most notably because they both want to talk to your host's file to set up domain names. So when you are... If you're going to switch between them, make sure you shut down all your servers together. Desktop server always wants to start with privileges. So... I think FF figured this. Nope, it works. So you saw how many times I had to put in my password with local. This will be the only time with desktop server because it remembers. So I can use the admin color bar, which will change the admin bar to a different color if I'm on local. I can use code, debug, and trace. So if you're using Xdebug, you can turn that on and local SSL. So now those things are either on or off, depending on what I checked, for all of my sites. And now... Now my laptop is running Apache, PHP, and my SQL. Um... If I click sites, it fires up Safari, which annoys me, but I don't know how to change it. I only have one right now. You can visit, go to the dashboard, or look at the database, and they do include PHP, my admin, because it's the best. Um... I'm using the free version right now. Local only has a free version. There are benefits for... I don't... If you wanted to pay something, and then you would get more features, because it integrates with their hosting. Otherwise, everything's free. Desktop Server has a free version and a pay version, and the pay version does come with a lot more features. This is the free one. You can stop or restart. You can remove, copy, or move an existing website, or create a new development website. Um... So I will call this WC Sydney, and you'll note that the extension is .dev.cc. This is a real domain name. And they bought .dev.cc and have made it available to anyone in the whole world for free. So if you want a domain like that on your real website, you can just go register for free. Um... It's a little weird, but you could. Um, blueprints. I only have the one that comes with it. Um, well, no, there are two. You can install a blank blueprint, and it doesn't have WordPress. An empty folder. And you could put Drupal in it if you wanted. Um... I don't know why you'd want to, but you can. Ha ha ha. Um... So right now it's creating the source folder, virtual hosts, and the server name entries. And there goes the database. And restarting. And we're done. And it wants... Am I allowed to? In Safari? You visit this website, you know. Oh, you have to do it for the certificate. One more time. Now, the blueprint does not come with WordPress installed. So you have to do the famous five-minute install. Um... If you're going to use this a lot, I recommend you make a blueprint that is bypassed all this stuff. Um... Once your sites are running, there is essentially no difference whatsoever between doing it with desktop server or local. It's just WordPress. Um... There's the minor detail of having to SSH into Docker if you want to use WPCLI. With this, you can just use WPCLI right on your regular command line. Um... For editing files on the file system, it's the same in both. And it's actually the same in all of them. VVV, all of the old stuff. For just editing normal files, you just do it right in your regular file system with your favorite IDE. And it works fine. Um... XDbug is a little different in both... In Docker and... Well, VVV Docker and... XAMP or any of the amps. Um... Because your port numbers are different. Your IDE will see Docker and VVV instances in remote machines. Somewhere else on the internet. And so you have to talk to them that way. When you're running one of the amps, it sees it as really local. And you'd put in different port numbers and things like that. Um... Something that took me a long time to wrap my head around. I'm going to quit desktop server. But that did not turn off Apache in my SQL. And so you can't now start up local. Because it'll conflict. So you fire back up. Give it privileges. And when you're done, go to stop or restart and click stop. And that shuts down all of the server services. And that is the end of my talk. Yes. Would you like the mic? As I said, kind of a beginner question. So you did everything on your local which is very clear and awesome. Now all your URLs are set with the local ones and you need to convert them to WordPress. So I'm using one method but they're probably more efficient ones. For sure. So yeah, if you have any recommendation for easy ones. Can I say the question? If you have any recommendation for ways to take it from the local back to website and changing those URLs in a nice and clean and easy way. Yes. There are a variety of ways and to a certain extent it depends on your host. WP engine has a wonderful site importer where you can take a dump from anywhere local or any other host and it will fix your domain names in your database. There are plugins that let you do search and replace on your database and you can do the domain names for yourself there that will immediately break your site. But, you can then take your file system you can take your database from phpmyadmin or whatever and put it on the live server and it will work. WPCLI has a wonderful search and replace tool so you could put it on the live server broken and use SSH to do that. Now, that's not a very beginner method. If you're going to do it, I recommend a plugin. To be honest, I don't very often export an entire site a whole database. I'm a plugin developer so I take just the five files I just created and put them up. If I'm fixing a broken website, I don't push the whole thing back when I'm done I push back the little bit that I fixed, that sort of thing. Yes. Following up on that question, why don't you just develop locally using your real world domain name? Put it in the host file and everything works. Yes, you certainly could because I'm lazy. Well, it's a funny kind of lazy that makes you do so much extra work. Well, okay. Whereas if you make the choice in the first place just to develop locally using your destination domain name the site barely knows that it's moved once you go live with it. None of my tools support that out of the box so if I wanted to do that I'd have to spin it up locally using their domain name and then go into edit my host's file manually to point it to the right place and that would work. That would work fine. You can edit your host file to say that your domain name is local. And it just took you less than 20 seconds to describe what would be so much more work getting to CLI and... While it's looking local, you can't go look at your live website. Yes, you do. You just put a hash in your host file. There you go. That's 10 seconds work. Yeah. Way to back. I use WAMP. Sorry. There's two people in my office so I build websites and I pass them over to my partner who fills them with content. Then we go back and forward. With those solutions, can she still do that? Can she still edit the website using that live link, I guess, is it? Yeah. Yeah, actually using the live link if she's only using the WordPress admin, the live link works wonderfully. In fact, for a while I used to work on my Linux box because Linux is the best while running local on my Mac next to me. So I would SSH from my Linux box to my Mac next to me using the NGROC URL in my browser just because I didn't want to have to deal with the Mac. There's no list. I mean, you'd need to share. Does it change the URL every time? Yeah. Sydney WordCamp website I'm working on. You go and edit it here but then you go back there tomorrow and I've restarted it. Is it a different... Yeah, it would be different. Yep, it would be different. So you'd have to somehow keep that up. There's one way in the back up there. Oh, here we go. Yeah, just going back to your local by flywheel PowerPoint, you listed Docker as a con. Why is that? Because it does use up some system resources to run itself far more than because it's running actual another OS. Whereas the the amps don't. Yeah, it's not a kernel. It's not another complete kernel. It's just another charitored environment, essentially. Yeah. It is running inside virtual box of Mac. I have really high hopes. I was told it would be running this spring on Linux because then it would not need virtual box and it would be much faster. But I don't see it yet. All right. We'll get it back. Oh, you know what? Just one more thing. Desktop server also is supposed to be running on Linux this year sometime. So for those of you who are into that. Yeah, go ahead. Hi, great, great talk there. So just a couple of questions on desktop server. Do you personally use that yourself or do you only do just for testing purposes or have you I use desktop server exclusively for a very long time. And then they got a little behind and were not running PHP 7 for a year and a half or so. That's about when I stopped as well. And I switched the docker to local. Excuse me. If I had to make a choice right now I really don't know which one I would choose. I'm good friends with both teams. The feature parody is there. It really is about personal preference. Does desktop server give the live link as well though? Like what local would? No. Well, what do you mean by keep? It has Ngrok support but it does time out after a while. And that's an Ngrok thing that doesn't have to do with either of the system. But the public can see that it's created in both systems just like what you showed in local. Another difference is desktop server because it's paid they have given a great deal of time and money into their support team. So if it breaks you call them and they will get on the telephone with you and walk through things. Local has good support but it's text only and things like that. Have you used the blueprints before? Because that's something I didn't really get into though. It's supposed to be really powerful once you started to create all these different blueprints. I haven't freelanced in a number of years but when I was freelancing I used blueprints pretty heavily. Mostly just to set up my one favorite and start from there every time. So I didn't have to install all my plugins and all that. And just the last question. This is probably a massive problem for everyone with local. You just quickly touched on it and I'm sure desktop server will be very similar. If you've got a large site how do you deal with it moving from local to the server environment so you're talking 20 gigs 25 gigs which I've got a few clients that are about there. And it's usually the uploads folder but regardless it's part of... The important part is to not do that. So you skip it. Only move the changes. Only move the things that are different. So in an enterprise workflow which I've used a lot with local well there's a service I can't remember the name of now. You can push to GitHub and it will watch your repo and when it sees a change it will take it and publish only the changes to your site. And it can do it over FTP or SSH any number of weird things. And so when I'm working on a site I change one file and I push it to GitHub and that one file goes to my new site and it takes 20 seconds. Now periodically if this is a long project I need to pull down images from the live site because it's been so updated that mine is really stale. But my local never gets ahead of live so I don't need to be pushing back loads and loads of content. So the real key is to only push back what you've changed. So I have a final question down the front. Tofa. Not so much a question but a solution. WP Migrate DB Pro. Yes WP Migrate DB Migrate Pro works very well. It solves all of those things that you've just been talking about. So you can pull it down once or push it up once but you should not do the uploads when you're doing a database push or pull from one site to another. It does all of such a place for you. After a few years of doing all this manually and all the ways you guys have been describing that plugins like 250 a year or something but it's so awesome and that's probably what I would recommend for the young lady in the front because it is I don't want to say thoughtless but once you set it up and it's talking back and forth it just does its thing. Thanks Tofa we've run out of time. Thanks Tofa from BigCommerce and Grand Rapids Michigan please.