 All right, so welcome. I'll tell you a little bit about me first. I've been working on the web pretty much since there was a web in pretty much every aspect of the field. I've got about 20 years of experience, and I've been working in WordPress for the past several years as a freelancer. I've also veered off on tangents as a musician, and I spent most of last year wandering around as a digital nomad. This is what my face looks like when I want to bring a puppy back from India. So I got an undergraduate and a master's degree in computer science in the mid-90s, and I learned to program in languages like Pascal and Lisp and Prolog. I built multimedia projects in Macromedia Director. Does anybody remember Shockwave? Yes. Yes. And in undergrad, I wrote assembly language code for a PDP-11, and nobody even used those back when I was a student, but the prof was about two years from retirement, and he couldn't be bothered to upgrade his own skill set, so we all had to suffer as a result. So I don't use any of that anymore. If I were to put it on a resume, I would get laughed at because so much of it is so outdated now. So what was the point of all of that? What did I actually get out of all those years of stress and being treated like less than a human being and all those tuition fees? I basically came out of it with a process for troubleshooting things. So this is going to be a fairly abstract talk, as we've only got 15 minutes, and so I don't think we can cover all of the technical issues and programming errors that can possibly affect your site in this time. So this is going to be more about your mental approach to the problem and your mindset and your strategy. So I'm aiming more at new developers and people who just dabble in WordPress occasionally. So if you're an advanced developer, then you'll probably already be familiar with this sort of thing. If you're Ryan, then this is probably right up your alley. So this is about knowing how to break a problem down into smaller manageable parts, not being overwhelmed by just something coming at you. It's also about knowing how to translate abstract knowledge into real-world tasks. So I learned a bunch of programming languages that I will never, ever use again. But I learned something about how to learn programming languages and how to look at them and how to read them that will carry through no matter what I end up translating it to. So we have a crisis. Your site is down. Oh my god, it's the end of the world. So let's first deal with the feelings of panic and anxiety. So I'm going to talk in this short little talk mainly about sudden unexpected stressful problems. The same approach is going to apply to things like troubleshooting a minor CSS glitch on your site. But in those cases, you're usually dealing more with internal pressure and frustration. Why can't I figure this out? When your site is down and somebody can actually see that, there is this sense of looming terror and pressure or somebody may be breathing down your neck for it. So these are the situations we're going to look at first here. The first thing to remember is this is not happening to you. It's just happening. It's just another thing that's happening the same way that right now you're sitting in a chair in a room. It's just a thing that's happening. Your site is just down. There is a problem. It's not personal. Don't believe everything that you think. The worst thing about this is the stories that we start to tell ourselves about, oh god, this is awful. Everybody's going to think I'm a total fraud. It's going to ruin my career. I'm going to get fired. The client's going to fire me. I made a terrible mistake. I should never have uninstalled iTheme security. I should never have done this or that. So your mind is going to start throwing a bunch of stuff at you. That is really not what you need right now. And you don't have to buy into it. Are people actually in danger of dying? Is anybody here working on a WordPress-powered life support system? No? OK, yeah, I kind of didn't think so. Your client might think that people are in danger of dying, and they may be putting a lot of pressure on you. Generally, just reassure them that you're on the job. You're aware of it. You're going to deal with it best as you can. They mostly just need you to know that they're worried. And once they know they've been heard, they can step back and let you do the thing you need to do. So we're going to try to sort this out now. Sometimes it's really obvious what caused a problem. You just updated all the plugins, and boom, your site is down. So you know it probably had something to do with updating the plugins. When it's not obvious, you have to retrace your steps. So it's very much like looking for your keys and where you saw them last. So when do you last know that the site was working? Have you made changes recently? Did you maybe update the plugins last week, and the problem is only arising now? Somebody tells you they started seeing this thing happening on Tuesday. Do you have other people working on the site? Could someone else have made changes? What else has happened since? Has something about the environment changed? Maybe the hosting company did some kind of update. Can you look into that? Maybe the domain name didn't renew, and that's actually why you're not seeing your site. There is also the possibility of a hack, but I'm not going to get into that too much here. I only have 15 minutes, so we're just gonna look at more kind of routine failures. So right now, we're just looking for the cause. So don't try to fix it until you know what the cause is. If you're not sure what the problem is, don't start trying things randomly that may have worked before. Don't dig yourself down a deeper hole right away. There'll be plenty of time for that later. So the first thing we wanna do is break it down into smaller pieces. It doesn't do you any good hearing, my site is down, and I'm seeing an error. You need to get complete error messages, very specific, and the exact behavior that leads to the problem. So does the problem happen on every page of the site? Does this only happen when you do a certain thing? You wanna narrow it down as much as you possibly can. If it's somebody else who's telling you about the problem, make sure you can replicate the issue yourself because it's very hard to troubleshoot a problem that you can't see. So if all we know right now is there's a problem, we're gonna look at kind of what the usual suspects are. Where are we most likely to find our problems? So it could be at the theme level, it could be a plugin, it could be your server, and it could be the domain name. So you need to learn what types of problems are most likely to appear at each level. So if Chrome is saying that it can't find your site, it's probably a domain issue. It's not as likely to be a theme or a plugin. Sometimes you can pinpoint it within seconds, sometimes it's not even your responsibility. I have had clients call all upset because their site was down, and it took me two minutes to find out that they hadn't paid their hosting bill. And it's kind of like, okay, back to you. Not my department. So we need to eliminate the suspects. What can you rule out? Can you prove it's not the theme? Can you prove it's not a particular plugin? Or now that you've found that, okay, it's definitely something to do with the theme because I switched to 2017 and it's the problem goes away, so it has to be in my theme. Can you hone in on exactly what bit of code is causing the problem? So if you can't find the answer, you need to find everything that isn't the answer. So deactivating plugins, switching themes, commenting out sections of code once you start working within maybe a page template, and eliminating everything, even if it means you've got a super bare bones little chunk of something appearing on your page to try to hone in on exactly where the issue is. If something works on one page but not another, you can figure out, okay, what is something that is on this page and not on that one that could be causing it. I give you time to read this because I'm not reading it out. So plugin conflicts are, of course, one of the most common things that we're going to run into. There's lots of different causes for it here. If it's not immediately obvious what plugin is causing the issue, usually you would turn off each plugin one at a time and reload, check if the problem is still happening. Sometimes this isn't possible because the functionality that you need to test is an essential part of the current theme or a critical plugin. So if you're having a problem with WooCommerce, you can't exactly turn off WooCommerce and see if that fixes it. Sometimes a problem won't appear until you have two particular plugins activated together so you may have to test things in combination. If you're getting a white screen of death and you can't even get to the dashboard at all, you can temporarily turn the plugin off by renaming its folder in FTP or at the command line. So at least you can salvage things enough to bring it back up and start mucking with things in the dashboard again. So maybe your site isn't down. You're working on a theme and you're just stuck. So everyone gets hung up on a mismatched parenthesis and accidental missing semicolon once in a while. If you're not running on a live site, you want to make sure you've got PHP errors and warnings turned on so it'll tell you the line number where something suspicious is happening and give you a starting point. Inaccurate logic means that your code is running but what you think you've asked it to do and what it's actually doing are different. So you might be feeding it the wrong variables or you might have put a critical statement outside a while loop that it should be living in. So you need to leave yourself breadcrumbs along the way. You need to display what is in this array. We'll print out variables before and after the loop that happens just to make sure that the data that you're passing through is actually what you're imagining it is. Sometimes it's even something like you're working in the wrong file without realizing it and you can't understand why the problem isn't going away because you've been reloading it and you know it's right. And then you realize oh I was working and that should have been page about and it was oh yeah. When you catch yourself doing this just fix the problem now that you found it and then go outside and take a nice little walk around, look at the trees and then come back to it. It means you need a break. Programming languages are written by humans and humans need to be able to describe what's going on. If you're not sure about your logic, look at it and read it out in English line by line. It won't help you with syntax but it might help you understand what you're trying to do a little better and it's a way of dealing with other problems in life besides just code. I was going to talk about staging sites but Jamie is coming up with a whole talk on it a little later so I'll just tell you they're really, really, really important and helpful and can save your hide. A browser inspector is absolutely critically important and if you're not using a browser inspector like Chrome Inspector to debug things and especially CSS, you won't be able to get anything done in any kind of reasonable time. It helps you hone in on all the culprits. Someone else has almost always solved the problem that you're dealing with already so being able to do an accurate Google search is often way more important than actually knowing the details of the language you're working in. Plugins and themes always have good, not always, often have good support forums as well where the author has answered somebody else's question about the same issue. Oh my God, I did this with two minutes remaining. So I've done my best to condense a 20 year career into less than 15 minutes but I might have missed something so we've got a minute and a half for questions. All right, I think if you have any questions or anything, come find me later. Thanks.