 All right, as my lovely introduction just said, my name is Megan Haynes and today I will be talking to you guys about how to update SMART by using a state insight. I'll start off. Has this ever happened to anyone? Show of hands up. Live demo. Yes. Now side note, nowadays with New Word Press, you shouldn't see this as much, but instead you'll get a really weird email that scares you even more than this white screen of death does. Don't try some actual site. What's the answer? Well, you've got to use a staging site, Dengas. It's the entire point of my talk is long-term boiled down. If you want to do updates safely and securely, don't do them on the actual site. Do them on a copy of the site safely. So let's start from the top and work our way down, shall we? What is a staging site? A staging site is basically a private copy of your website. Ideally on the same server or very similar stack so that you don't encounter problems. Basically, it has no visibility from Google. So if you've turned off in that little section, the discourage search engines from indexing, that's turned off. Sometimes you can even have a password blocking access to the entire site. And the term staging is in contrast to the term production or live. So you have your live site. That's the one that's online right now. All the users are interacting with it. You're making sales. People are posting on your forums. And then you have a staging site, just like a stage on stage behind the curtain where you can do all your tests, perform all your updates and not muck anything up for the live users actually using your site. So why do we use staging sites? Basically, we use staging sites to keep our website healthy without having the risks of updating right on live. The simple fact of WordPress is websites get hacked because people don't update plugins, they don't update themes, and they don't update their core software. And I can understand why I've dealt with hundreds of websites. They're complicated. When they work, they're great. And you don't want to touch that. It's kind of like, it's good. I'm going to romp or peel it, set it and forget it and hope nothing breaks. The problem with that is it's not a matter of if, it's a matter of when. If you don't update regularly, you'll have this giant backlog that when you do update, you're going to have all these bugs and you'll be discouraged. Doing it live is not the best way though, because if you apply an update and it causes a problem on your site and your site's down, well, now you're in panic mode. And then the adrenaline gets flowing and it's hard to code when you're shaking because you don't know what's going on. So that's why we use staging sites. We also use staging sites to perform updates very, very carefully. Like I said, you're doing these updates not on the live site, but your copy of your site. You can go slowly through the updates. You can actually read the update notes. Show of hands who read the last patch update notes that they applied. Exactly. We're busy people. We don't have time to read these notes, but sometimes you'll discover brand new feature that you didn't know about, or a new incompatibility that's going to be a problem. And when you're not rushing to update things on a live site, you have time to actually read those notes. And then you can test thoroughly without like polluting and mucking up your live site data. So this is important, especially if you're doing e-commerce. You'll want to, you know, you're applying your updates to WooCommerce. You want to make sure people can still purchase a product, but you don't want to have the actual money account from your account. You don't want to have a fake order that your company's actually now rushing to fulfill because they didn't know that it was on a staging site. So by doing our updates on a staging site, you can test thoroughly. You can make 100 orders. You can do pretty much anything you needed to, and then it will not affect the live site when you go to apply your updates. And we use staging sites because they eliminate mixed stakes and downtime. So if you're on your staging site and you update your plugin, you don't know that there's a problem found. Great. You're not on your live site. Your users don't know. They're off doing purchases. They're off in the forums. They have no idea that you're currently trying to figure out why this plugin update has crashed your site. Now, this is super important for any sites that are actively doing e-commerce because a site down on a site that's making money is not being made. That gets attention at the higher ups that you don't necessarily want to have. Similarly, there can be problems in updates that cripple your SEO and you don't know because you didn't thoroughly check. You didn't read the notes. You're just kind of doing that. And you don't know that there's a problem there until two months later when your CEO comes in and is like, why are the sales stopped on the website? Why don't have leads? It turned out it was actually a form that now needs a captcha, but you didn't know because you rushed it through. These can all be avoided by following the methodology of a staging site. Okay. So we talked a lot about why we want to use staging sites. I'm sure half of you are like, okay, I'm down with this. How do you actually create the staging site? So we're going to go through a variety of ways. So one of the first ways that you can create a staging site is by using the backup plugin that you already have installed. And the reason that I put this number one is for a really good reason. Basically, if you already have a backup plugin installed on your site, it's already performing your backups in the case where your site gets hacked. You don't know how to restore your site from that backup. That's a big question. And again, when things go wrong, that's when the nervous happen. So you can use your backup plugin, take the backup it made and create your staging site right from there. You'll get better at knowing how your backup plugin works. You'll be able to create the staging site with no problem. And then at times many of your client sites will have one of these installed. So you don't actually have to put on a plugin, get into the core of the files, just go with something that they already have running. You can also create a staging site by using your web hosts. So it depends on what host you're on and what plan you're on inside that host. But many hosts do include one click staging where essentially you're on your WordPress dashboard or their dashboard. There's literally a button that says create a staging site. What that does is copy your live site into the little password protected area where you can then make your changes. Most of the premium WordPress dedicated hosts like WP Engine, Liquid Web, Flywheel, Siteground, they have this built in. Some of the other ones like Godaddy and A2 hosting, you need to be on their managed WordPress plan as opposed to being on their generic $5 plan. You may or may not get a staging site at that level. But once you get up to the point of paying $15, $20 a month for your hosting, they usually have backup or built in staging. So there's also another option. Again, I'm giving you options, not decisions. You can use a staging site service such as WPStageCoach.com not affiliated. What this does is they give you a plug-in that you put on your site and then with one click again, it creates a clone of your site on their own servers. So it's a little different because it's a different server stack. And this site is actually automatically deleted 14 days or so if you don't interact with it or update it. So it's very temporal. It's there for you to test with, not for it to be there and lingering. And we'll talk about the risks of having a permanent staging site in a little bit. Now this option is not free. It does come with a little cost, but generally it's an affordable level and a caveat that it does not work with multi-sites. So if you're dealing with multi-site at that point, you're probably on a higher tier of hosting, which will have a built-in staging site. Does anyone not know what multi-site is? Basically, it just means you have a parent WordPress and you can see little child WordPress from that parent. WordPress.com is a multi-site. Another way to create a staging site is to manually clone the site. This is brutal method, but that's how you learn the gritties of WordPress. I always recommend everyone to do this once so that you can say you did it and then find a better, more efficient way. But that's how you learn, right? We learn in WordPress by trial and error. You can read a book to the code and that's how you learn. So you basically just copy over your files, copy over the database, do a little find and replace to change the URL to the current staging site, and then you've got a copy of your site ready to go. Another option for creating a staging site, there are many options, is you can create a site that's only accessible on your local machine. You can use tools like local by flywheel or desktop server or server press, lamp rail services that you can use as well. What they basically do is they'll install, they'll set up a little mini server on your computer. The benefits of this are that your site's not live. It's not online. No one will ever chance upon it because they have to be on your computer or like physically on your network. It's not going to happen. The con to that is it's not identical to your server. So there could be issues where you're applying a plugin. It looks fine on your local machine, but then you apply the plugin online to the problem because they're not running the same PHP. They're not running the same server. There's the, there can be difficulties where, but generally speaking, for most, for 99% of people, a local site is a very good option, especially if you're an indie developer and you don't actually have to pass the site between QA and back and forth. There's no problems. Okay, so we talked about what a staging site is. We talked about a number of ways that you can actually implement a staging site. So let's quickly go over the workflow. Unless it's just a general sample workflow, I tried to make the most broadly applicable across all the different varieties of options. Start up like that and go clockwise. So basically, you identify items that need an update on your live site. You create an update plan. Okay, today I'm going to update WooCommerce. I'm going to update all of the WooCommerce applicable trial plugins, but I'm not going to update BuddyPress and those because I want to, I want to make it easy for myself, reduce some options of variables. Then you perform those updates one at a time on your staging site. The reason I say one at a time is, again, we have the luxury of time. So you can step through things one at a time, apply the update, make sure nothing's broke, then roll out the child updates. Again, verify that those haven't broken anything. Test each plugin's functionality very, very thoroughly. Actually submit data, go through the full flow. Don't just load a page and okay, it loads. Actually step through. Use Yoast to check a keyword. Make a purchase. Then go and make sure it actually worked correctly. And then you perform those same plugin updates on the live site. So we're not actually taking anything on the staging site and moving it, though that is an option. If you wish, and if your workflow is good and simple enough, which is it doesn't have ongoing orders, it doesn't have a forum where people are constantly adding new data. If it's a brochure website, like for a mom and pop shop, you can totally perform the updates on staging and then just push the entire site right back up. You use a backup plugin to re-migrate the site, just like you migrated it down to staging. This is a template. Every site's the same. Sometimes you can't migrate the site over again because of WooCommerce or data. Sometimes we have to do a lot more plugin updates at once because we've got a lot of backlog that we need to get through. So this is a good template to go from. And then here are some questions that you can ask yourself about staging sites before you get into the actual work. And this is based on my struggles and trials. So you can benefit and not have to struggle like me. Why is questions you should consider? Number one, whose job is this? Like, who's going to do this work? If you're a solopreneur for your answer, well obviously it's you. If you're a part of a larger company where you are the IT division, but you may have a marketing manager as well, then you need to discuss who is going to actually be responsible for making these updates, determine how often will they be performed? Are you doing updates every week? Is once a month enough? Is every two weeks? I don't ever recommend updating beyond pushing it past one month because, again, you start building technical debt behind you. The whole point of this is to make it easy to do these updates and stay caught up on the stream. And then schedule this task in calendar firmly. Put it in pen. It is not a meeting that gets pushed when something better comes up because that's the death cry of a website is when, oh, we'll get to it later. We'll get to it later. It gets hacked and then rebuilt and then everyone hates WordPress even though they shouldn't. Another question to consider is, should I pay someone else to do this? And the answer may very well be yes. If you have a company large enough such that your time spent managing and dealing with the updates is a bad investment, it would be better to develop websites than to maintain them. There are plenty of companies across. There are local ones. There are ones in Canada and the states. There are companies that are global that will help you do this. And one of the benefits to kind of going with that is that you've got a raw server of experts there to help you in the case where a plugin has a problem because that's where the difficulty gets. Okay, I've applied the plugin. I need to now debug why it's having a problem. And that can just start taking hours and hours of your day if you're not a developer-minded person who's excited about when things go wrong, which is like one in 10,000. Many maintenance services also include daily, weekly backups. So it's easy to pitch to the higher ups in that regard. And like I say, it frees up internal resources for the more important work. If your job is selling widgets, you don't want to be spending all your time cleaning up the production floor, and you can hire a robot to do that. It's certainly the purpose of the sock is to teach you how to do a staging site. So I want you all to try and make it happen a few times and then look back at it and just be realistic. Is this worth my time to do? You may find that you love doing this to the point where you can start a maintenance business. It's not that complicated to do in terms of there are always new websites being produced. And you can make a business offering that suits what you can do and what you're willing to provide, whether it comes with a development hour a month, whether the backup's more frequent, et cetera, et cetera. So this is a good option to look into from both sides of it. And I have a few bonus, super bonus tips for your staging site and things to think about. Bonus tip number one, change your dashboard color. Here I have a picture of a live site and a picture of my staging site, which is which. Well, I don't look at the URLs, they're a little different. This is much easier. I know I'm on the staging site because it is bright red. And that, you know, you may think, oh, okay, that's, that's just simple. It's, it's nothing. But when you're nine in the morning debugging a plugin that's got a problem and you see that red screen pop up, you know, you're on the right site. Very commonly what you'll do is I'm updating a plugin. Now I'm reproducing that change on the live site and I don't know which I've gotten confused. I'm going back and forth. I've copied code from here over there. It can be very frustrating. So this is built into the WordPress profile. As you see right down here on the users, your profile, there are eight color themes. So pick one that's not default. There are plugins to add other ones. If you are not satisfied with this range of colors, you can even change them right. Plugging yourself. And my final bonus tip is nuke it with fire. So this is what happens often when you have a staging site. Okay, great. I'm doing my testing on here. Meanwhile, my marketing department is working on their new offering. So they're writing content. They don't want it to go live on the site yet. So they're just testing on the staging site. And there we have problems because we've got content on the staging site that we need to have on the live site. It should be on the live site, but they've tried to, they're being smart, they're doing all their work behind the scenes. That's got a problem because I don't know what the situation is. I don't know that content exists without somebody telling me or having a plugin installed that literally logs whatever anyone does. So again, it's just, it's frustrating. I've literally gotten that third line many times from clients where I'm saying I'm doing plugin updates. I'm going to take away your staging site and I go, no, no, no, no, we have valuable content on that. The best policy I can find is to literally make it a company policy. That staging site is a temporary thing. It can disappear at any time. So if you are, if you're choosing to work on new marketing content, work on that on Google docs, you can test it on the staging site, but know that that will never make it to live until you do that. You'll get people in the company that go, no, no, no, you can do this. It's just code. You've got to stand straight and just be like, no, this is the way it's going to be. But of course, perform a backup of the site before you nuke it anyway, so that when the CEO comes and goes, well, you deleted the marketing content, you've got to go. Second last slide is a promo for WordCamp Ottawa. You like WordCamp, you're here. Have you ever considered coming to Ottawa? We have a WordCamp too. It's just on sale now here. It's July 13th, 14th this year at Carleton University. Speaker application is still open. If you have never spoke, if you want to be up here telling me your GC secrets, I want to hear them. But please consider it. Come on out. It's going to be a lot of fun this year. And now I'm going to open this up for a whole question, whole bunch of any questions that you'd like, staging site or something even somewhat related. Who's got the first question? I have prizes for people who ask questions. Yes. So if you know, again, if it's a smaller site and you're the only one making those changes, you could choose at that time to migrate the site back. So I'd use a backup plugin to make a backup of the site, take the existing one, change the subdomain to a different URL, and then reinstall WordPress from that backup. That'll usually, those backup plugins come with a tool that does the database search and replace. And the reason I suggest that is because reproducing those media, re-uploading it is just tiring. That's intern work. It's not your work. Like I say, using a backup plugin to restore the site is like a one, two. You'll get the site done and you'll learn how to do it in the case of a fire. If you'd like to have a prize, please. I have a few maintained shirts available, like one in three sizes. I also have a pop socket and some stickers because merch is great. Next question. Sure thing. Absolutely. So there'll always be plugins. Every developer has their own opinion on what plugin is good, what plugin is bad. Some people love vault press. Some people hate automatic. Some people love backup buddies. Some people love manually fdp'ing everything. Your job as a website creator is to come in with a bag of tools. So backup buddy and up drive plus and manual thing can be three tools in your tool set that you apply depending on what the situation is. I've faced limited hosting as well, where yeah, your standard workflow just is not an option. So at that point, you start looking into other options. A lot of the plugins share basic commonality. It's just the skinning that's different. It's the approach or the actual methodology steps that are a little different. So use the time to explore two or three tools. Pick whichever one works for you, whichever two work for you, and just kind of always keep a little feeler for how people are thinking. What's the new update plugin that's coming out and it's cool? Maybe I'll give that one a try. So you can use your current website to make a subdomain, like login through fdp or through your cPanel. Make a new folder. So my website.com slash my test site, and then you'll restore the backup into that. And just follow all the documentation on the backups. They'll guide you through. Next. I love using the staging sites built in syncing because they tend to be, when you're dealing with a managed WordPress host like WP Engine, they've got really good systems for creating those staging sites. You can even push it back up if you're confident that again, no database changes are going to be lost or anything. You can push your staging site to live. Very great and easy. I like to, I prefer to work with the host's built-in version just because in case there's a problem, like a literal, it's them under the bus. I file a support ticket and I say, hey, your staging site tool broke, guide me through this. I don't have to pay an hourly fee. Next question. You can choose to, you can always purchase a domain if you wanted to. Often staging sites will just, so with WP Engine, your actual account name is my weird account name.wpengine.com. That's hidden. Nobody sees that. They visit MeganHaines.com. What WP Engine does is it just makes a little different site there. So it's Megan's cool site.staging.wpengine.com. And it's got the same server, so you're not going to encounter bugs where, oh, I'm running a different version of PHP. It worked fine. I'm testing and now it's not. I do not get any, I have no affiliates other than my company. I don't get any kickbacks for recommending anyone. Any other questions? No. All right. Thank you very much.