Okay, we're going to get started. Thank you all for coming. One final technical difficulty, the clicker. Thank you. All right, so thank you all for coming those of you in zoom land. Thank you for joining. This will be recorded as well. So anyone you know who wanted to attend wasn't able to you can let them know we'll be sending the link around. So we want to thank Dr. Dan Libby for coming out. He came all the way out from California to give this lecture so please join me in welcoming him to our campus to talk about mindful resilience for military leadership. Let me give you Dr. Libby's bio and then he will come on up and take over. So Dr. Libby is a founder and executive director of the veterans yoga project he is a licensed clinical psychologist, specializing in the mindful integration of evidence based psychotherapies and complimentary and alternative medicine practices for the treatment of PTSD, and other psychological and emotional distress and active duty military and veterans. As a postdoctoral fellow at Yale University's Department of Psychiatry and the VA's mental illness research and education clinical center, Dan conducted research investigating the physiological correlates of mindfulness meditation, as well as the first epidemiological research investigation of complimentary and alternative medicine in VA PTSD treatment programs. He is also the former director of clinical services for the Starlight military rehabilitation program and has taught mindfulness and yoga to hundreds of veterans and active duty members. So with that, I will hand this over to Dr. Libby. Thank you so much. Hi, good morning. Thank you. I'm sorry. Good afternoon. Thank you all for being here and for welcoming me. As the inside my name is Dan Libby. I'm a clinical psychologist. And I'm here to talk to you a little bit about mindful resilience. And in particular, these are our objectives today. So just just to rewind a little bit about me again I'm not really don't have any military experience myself. I'm a clinical psychologist who is studied trauma right studying stress and trauma and studying the psychophysiology of stress and trauma and how does stress get underneath the skin to create or exacerbate disease.  And so today, what I want to do is talk a little bit about stress and trauma but I want to try to talk about it maybe in a different way and maybe provide a unique perspective on stress and trauma. And in order to do that. We also need to understand a little bit about what's the opposite of that right what's the opposite of stress and trauma right what is resilience what is thriving what is living in alignment with your values and goals look like. And what we'll really do is look at how do these tools help us with those those things. So, I put a definition here of mindful resilience right there's a lot of definitions of resilience and a lot of people are sick of the word resilience and now you've got you know warrior toughness and you've got all these different programs that are designed to create and build resilience. And so there's a lot of ways to look at that one way is to look at it as resilience is about sort of getting back up when you get knocked down. Right it's about bouncing back it's about, you know, falling and do what you need to get back to where you were. But really what I think a more appropriate version of resilience is one where we don't go back to where we were because really you can never go back to where you were. Right it's really about how do I live even more in alignment with my values and goals, how do I find even more mission and purpose in my life. Regardless of the trauma or, or because of the trauma or because of the stress, but in order to stay focused on our values and goals. Right and to me that's really what resilience is about it's just about allowing us the ability to control our own minds control our own bodies in effort of you know whatever our particular values and goals are. So I also put the definition that I stole from the website on the warrior toughness program right so I did a little research looking at this is the new, the new initiative in the Navy and the idea is that they're teaching a warrior mindset. And the idea I think and one of the differences maybe between this and resilience is here they're really talking about focusing on peak performance on what happens in the most stressful time. And it's not really just about coping with it that how do you excel right how do you be the best that you can be even in the worst of times, right, and even in the most boring of times, right, so. So what I would like to do is provide a slightly different understanding of stress and trauma. And I'll start by using an example of the most common traumatic event out there is a car accident. Right because it happens all the time and people get into car accidents all the time. But if you look at all traumatic events they can all be defined by three things right all traumatic events lack three basic characteristics at the time. The first is safety.  There's also a lack of predictability. Right because you can't predict what your car is going to do you can't predict what the other car is going to do, and there's a lack of control. Right so you can't control your car the other control or the other car. So what we can understand is that traumatic events by definition, right and if you look at the basic scientific research right if you look at what underlies stress. What does the lack of safety predictability control or safe predictable and controllable environment right SP a CD. It's easy acronym space to help us understand that all traumatic events and all stressful events if you think about like co good in the world pandemic. Right is there a lack of safety. Yeah is there a lack of predictability yeah is there a lack of control yeah right that's why there's a level of stress and for some people trauma around the current world events. And for those of us when we wear a mask we get inoculated with the vaccine all of a sudden we're exerting some level of control. Right and all of a sudden we're not as stressed out about it. But so if you can think about any stressful event in your own life. Right, you can look at it and all of them we're going to be marked by these three things there's going to be a lack of safety in some way, a lack of predictability and a lack of control. Another problem also is that for some people during that traumatic or stressful events. There's tends to be a lack of safety predictability and control internally as well. Right, so we were just talking about a safe predictable and controllable external environment. But really what are we talking about when we're talking about mindfulness and self reflection and yoga right we're talking about the internal environment, my thoughts my body my physical sensations. What sometimes happens for people when they are in the midst of a stressful or traumatic event is they start to lose safety predictability and control in their internal environment. So I've had a vet tell me and not so many words that hey doc, I couldn't predict and I couldn't control the fact that I projectile vomited the first time I had to pick up a body part. I feel safe, and I try like hell to keep it in. Right, or somebody at the time of a big stressful event just sort of goes and towers in the corner and they're just sort of like frozen. Right, they get that fight flight and they go into that freeze response. Right, and I, and what happens I've lost control this isn't how I predicted that I would react it's now I trained. I was in the Navy train me to react now anybody and so I couldn't predict it, and I couldn't control at the time I really wanted to, you know, be more effective but I was just frozen. Right and it certainly wasn't safe. So what we know about all traumatic and stressful events is that there's a level of a lack of safety predictability control externally. But what often happens is there's a lack of safety predictability control internally. And then go on to develop post traumatic stress for example, what we know is this lack of external space persists. Right, I work with lots of folks who are dealing post traumatic stress and, you know, if they're in public their back is to the wall their eyes are on the exits and I go out and big crowds, right because the world is what it's unpredictable. It's uncontrollable you can predict or control what other people are going to say or do you don't feel safe right and roof tops snipers, you know you're in the middle of downtown wherever. Right. And so what we know is that when people develop a post traumatic stress symptoms, you can understand it clinically through the four symptom clusters and get the diagnosis but when we understand it from the person's perspective. Right what are they experiencing their experience in the world that feels unsafe. It's unpredictable and it's uncontrollable. What's more debilitating or most debilitating about people who are dealing with post traumatic stress, for example, is that there's a lack of safety predictability control internally that persists right I have these intrusive thoughts and memories and images that are unpredictable I don't know when they're going to happen I can't control them, and they're not safe. Suddenly all of a sudden my heart starts beating they start sweating profusely, my body starts reacting in ways that are unpredictable. I can't control it when it happens and it doesn't feel safe. And even my behaviors, right despite my best efforts, right are unsafe and unpredictable and controllable. I met a veteran that I worked with who told me a story basically how he's driving south on the West Side Highway in New York City you're going down right going to the GW bridge and the lanes are like this right there's like no shoulder.   It takes the bad out of the backseat of the baseball card and he smashes the guys with you happen like that doc.  He did not like here's another example of his body and his mind. Right and his behaviors being unpredictable and uncontrollable and unsafe. And we can think of a lot of what people are dealing with when they're stressed out right it doesn't have to be post traumatic stress. But what happens when you get stressed out. Right I'll speak from the eye when I get stressed out sometimes I stray from my values and goals.  And so, what we know is that for all of us when we're in that stress response there's a lack of external safety particularly control but there's also this lack of internal safety particularly control. So this is where I think this is what resilience is and this is what we do it better than the younger project. So we're not going to speak too much today about the little thing little. We won't go too much on a little bit we'll talk about crafting an external safe predictable control environment right because one of the things that we can do as leaders in our own lives and our own families as leaders of others. Right is that we can create a safe predictable and controllable environment for other people. Right when my staff is feeling safe and they know what's going to happen and they have a level of control. Right my staff gets along better right we have you know people who are able to work more effectively. Right so part of creating space is about creating a safe predictable control environment for others. Right and that's our really think one part of leadership but before you can get there. Right we start to have we have to create that safety trick to the control in our own bodies, right in our own minds. And so how do we do that. Well we practice the tools. So, before we get that I want before we get to the tools right and we're going to talk about mindfulness and breathing and yoga. But really I want to start to help understand why and how these tools create that internal safety predictability control. So I can invite you all to get and take a nice deep inhale through the nose. I can predict with 100% accuracy what you're going to do next and take another deep inhale. This time hold your breath for two beats and then let it out real slow control the exhale. So that your exhale, a little bit longer slower deeper than you know, maybe do that a couple of times, take a deep inhale through the nose. Hold it for a beat, and then see if you can make your exhale twice as long as your inhale. A couple more rounds inhale, hold it for a beat. In yoga we do something called the Ujjayi breath where we gently constrict the back of the throat, making a little ha sound so there's less air that can escape that allows you to extend your exhale. So you can do that with your mouth open or close. So when you take a deep inhale through the nose keep going. Use that similar to personless breathing. So your breath just became a little bit more predictable and controllable. And what will happen and maybe you start to feel something right is when we start to extend our exhale longer than our inhale. Maybe you notice the shift in how you feel right in a maybe abstract kind of way or maybe a very concrete kind of way. But I would almost promise you that if you did that 10 times in a row and you really started making your exhale longer than your inhales, what happens is you actually shift your nervous system. The autonomic nervous system actually shifts into a place that's more vaguely mediated and so we'll talk about what that means. And so one of the ways that these practices works is regulation of the autonomic nervous system. And what is the autonomic nervous system well the autonomic nervous system is what regulates everything else. It's regulated by the autonomic nervous system.  What is this autonomic nervous system with the autonomic nervous system basically controls your level of energy in your body. Right. So if you think about physiological arousal here on this axis right how much energy do you have at any particular moment. Right, there are probably some days where have you ever been really hyper. You have so much physiological that you're, you can get the words out, right, or you're so anxious, you're because physiologically you're just too amped up, right, and we've all had those experiences. You know where he's enough. You just don't have enough energy. Right, when you have your hypo around. So what your autonomic nervous system does is it works to keep you in that sweet spot. Right, the Goldilocks zone, right where our physiological energy levels, right are appropriate to whatever we're dealing with that in a moment right so if you're in a stressful situation you sort of want that the energy levels to be up here if you just sort of hanging out, you know with your spouse on the couch watching a movie you're probably good being down here reference the autonomic nervous system that allows you to be in this zone and when you're in this zone, right or when you're out of this zone right, it affects other things physiologically right physiology determines phenomenology. So physiologically, we are outside of this zone and so we're going to experience changes in our thoughts in our physical feelings and emotions, right as well as in our behaviors. And what we know is that if you think about the thought behavior repertoire right so in any moment, we can have any number of thoughts right and any moment we can engage in any number of behaviors. Right, but when you are in hyper arousal or hypo arousal. What happens is you actually have a decrease in freedom you only have a certain number of thoughts available to you in that moment. You only have a certain number of behaviors available to you know, so not to excuse bad behavior, right but that veteran that I worked with you smash the other drivers windshield in some way he had no other choice. His physiology was so up here that he said he had to neutralize that threat and make sure that that driver didn't put anybody else in danger on that road. Right, and it happened like that he had almost no other choice because there was no space between stimulus and response. And so what we know is that when we're stressed out, we do we tend to right we tend to focus on defense escape avoidance and retaliation. Right, whether we're hyper aroused or hypo aroused right you sort of isolate yourself and you're in that defensive posture right when you're hypo aroused and so we know that this physiology is directly related to our thought behavior repertoire. And what we also know is that many of us right and many of the people that we lead many of the people that we live with our loved ones and maybe even ourselves. Sometimes spend our lives and might feel like we don't spend a whole lot of time in that sweet zone that maybe we spend a lot of time engaging in behaviors and using substances to try to feel okay right we all just want to feel okay right give me that cup of coffee in the morning. Right, give me that Red Bull in the afternoon give me a couple of drinks in the evening, right whatever it is that we're doing. On some level you can look at our behaviors as we're just trying to feel okay in the moment. Right, and that's really comes back to how do we feel physiologically and how can we keep our autonomic nervous system. optimal arousal zone or this window of tolerance. And so what we know is that when we start to come inside the zone right is our thought behavior after opens up. Right, so maybe if he had had a little bit of if right the that that I was talking about if he had had his autonomic nervous system maybe just a little bit closer to that arousal zone sweet spot there. Maybe he would have had a different thought. Right, maybe he would have just flipped the guy off maybe he would have done just sort of said oh wow he must be in a rush right he would have had other thoughts available to him at that moment. But at the time of this of the stress, right the stress was so overwhelming that his thought behavior repertoire shrink. So part of the part of my goal right for him as his clinician part of my hope right instilling resilience and others is to be able to deal with such an overwhelming stressful response, while all while still keeping your thought behavior repertoire nice and big.  And for most of us we're not going to choose to decide right he was not going to choose to do that. So what we know is that in the tools that we for me building resilience right mindful resilience is about one being able to stay inside that optimal arousal zone right even when you get cut off in traffic. Right, even when your coworkers and a whole right even when you get like triggered or poked or you know whatever it is right is to be able to stay inside that optimal arousal zone. So that are again our thoughts and behaviors can be in alignment with our values and their goals. And also to start to widen that window of tolerance right so now I can tolerate more and still not become so overwhelmed that I fear off from my goals. Ultimately, when we start living inside that optimal arousal zone right now or now we really open up right now now we have a different mindset maybe not thinking about ourselves all the time right we're really focused on service and leadership and now creating space for others. But first we have to be able to maybe sometimes at least be able to create that safety but control in our own bodies. So, how do we do that.  And so we are going to look at how do we control right how do we create that safe predictable and controllable environment. Well, one of the things we do is we meditate right so here we get to we're actually talking about mindfulness now so what is mindfulness, and what is meditation, and are they the same, and there's so many different types of meditation out there. So, ultimately, right meditation one way to understand meditation it's just about attentional control. Right you can just throw mindfulness throw the word out the window can throw resilience out the window you can throw right it's just about controlling your attentional resources, putting your attention where you want to put your attention when you want to put it there for as long as you want to put it there. I don't know about you, but for me, right my attention is very easily like, you know, squirrel, right, like oh there's a buzz in my pocket or there's a ding or right we are we are. Our attention is constantly trying to be hijacked. Right. I mean it's the attention economy now right everybody wants your attention, and a lot of failures of resilience are about this inability to keep my mind focused like we're to put my attention where I want to put my attention. The practice of mindfulness right as it's usually taught is about picking something to put your attention on right so I'll invite you guys to bring your attention right to the tips of your nostrils. Right where the breath exits and enters the body. And what we'll do is we'll meditate on those sensations right on just feeling what is I just noticing the sensations right there at the tips of your nostrils. And for the next few breath cycles every time you notice that you're thinking about something else that your mind is wonder just bring your attention back to the sensations right there at the tips of your nostrils. And isn't it amazing that I can invite all of you to do that and every one of us right we can all do we can bring our attention to a place. And an amazing thing is is that none of us can sustain it there. Right. We only did that for what about 1015 seconds. Right I'm going to guess that most of us had other thoughts in our mind right because that's what the mind does right meditation is not about making your mind go blank. It's not about achieving some state of nirvana where I'm like all blissed out and you know reaching somebody right it's really just about noticing where your mind goes right so noticing hey I'm not focusing on this anymore and bring it back. And noticing where it goes and bring your attention back.   Right that's what the practice of meditation is so what are we actually doing. Every time I notice that my mind has wandered. What's what am I doing I'm gaining more predictability of my own self right I'm starting to know myself better. Right I can actually like isn't it amazing that every time I try to meditate after lunch I start thinking about cookies isn't that weird right. I understand and know ourselves in other words our minds become more predictable. We start to be able to metacognize as they say right we start to be able to see where our mind is. And as we notice where the mind goes right we learn about ourselves we become more nervous we are becoming more predictable in the mind. And then an amazing thing happens is that with just a little bit of practice. What happens is you're actually able to sustain your attention on the breath for maybe two breath cycles before you get distracted.  Over time now right I'm able to keep my attention where I want to keep my attention, despite the noisy neighbors and the, you know, my legs fall asleep and all these other distractions. So what am I really doing I'm strengthening the muscles all I'm doing is strengthening my attentional my ability to control my attentional resources. Right so in other words our mind is becoming more predictable and more controllable. And when you have a mind that's an asset, instead of a liability. Anybody here have a dog anybody have a pet dogs. How many of your dogs are well trained. I won't ask the opposite then I'll assume there are poorly trained or somewhere in the middle. But one way to understand the mind and this is one of the ways that I will sometimes teach meditation is it's just like training a puppy. Like a puppy is right it's designed to be hyper and to chase squirrels and to be curious about the world. Right and that's your mind your mind is supposed to be curious about the world and to think about lots of things. Right your mind isn't supposed to be blank all the time or just completely focused all the time right there has to be room for that. And just as you tell a puppy to heal right and you bring that puppy right back by your side and it walks with you for a second. And then what happens it can chase the squirrel and then you say heal and it chases and heal and it's and that's what you do for your whole life right but over time as your dog gets older. Right it doesn't run away quite as much doesn't right it doesn't chase quite as many squirrels but it's still chase the squirrels because it's still the nature of the dog to chase squirrels. And so it's the same thing with our mind it's the nature of the mind to think and to wonder and to be curious and to explore and to ruminate and to do all these things. And we can also train it right we can also train our mind to be an asset. Because again when you look at people failures of resilience right when you look at people who aren't exhibiting that ability to control their selves at the time of a trauma. And it's it's part of it's the mind right there they're not able to control and put their attention where they need to put their attention. Right they get caught up in whatever they get caught up in. And so, part of resilience is gaining safety, particularly control in the mind, which is what that side sense. So you don't need slides. Right, most people when they think of yoga right we're veterans yoga project is the organization that I founded and run. And so there's a stigma that just pops up right away right you use the word yoga, and all of a sudden we all have these preconceived notions of what that is. And so I'm here to tell you don't have to use the word yoga right or mindfulness, right so all we're doing is we're just controlling our breath controlling our minds and controlling our bodies. And what's happening with the body right when we are practicing mindful movements, and how is that different than just going to get your, you know, going to running or engaging in other physical exercise that isn't mindful. Right what is mindful exercise versus mindless exercise. So you understand that right is one we want to understand that our physical body right is run by the somatic nervous system right we talked about the autonomic nervous system but our somatic nervous system is half sensory nerves, and half motor nerves. Right so half of our nervous system is designed to take in information to observe to sense to proceed. And the other half of our nervous system is designed to move and act and behave and engage with the world. So what we know. So here's a picture of your brain, and the part that's highlighted in pink here is your somatosensory cortex. Right. And what we know about the somatosensory cortex this is a strip of your brain tissue on the outside here, where there's a kind of a one to one relationship where there are parts of your body that are mapped on to your brain.  And so if I invite you guys to all just go ahead and give me a thumbs up with your right thumb. Right. Now go ahead and just maybe wiggle that right thumb.  And at the same time, the sensory cortex would be lit up also because in order to move you actually have to sense. Right, but we could also just bring your attention into your right thumb and just try to feel what your right thumb feels like. Without moving it. It's a different thing right to try to feel sensation with with movement versus without.  Right, so what we have is a map of our physical body in our brain. And what we know is that if you look at this little homunculus thing if you look at the parts of the body that are most represented. It's the areas of the body that have the most sensory nerve endings. Right, so the tongue, the hands, the genitals, these are the parts of the body that have more little holes and salt eyes here, because there's a lot more fine tuning right there that we can sense things really finally with our fingertips that we can with our middle back for example, which doesn't have as much brain here. So what we know is that we have a map of our body in our brains, and that we know that over time. And with, especially with physical injury and chronic pain, for example, but also with emotional pain is that over time, your map, it's a little smudged you guys remember when maps actually used to be on paper. When you actually like you'd go to AAA, or maybe you'd print it from map quest, you know, when generation later, but we used to have paper maps and if you'd spilled like some coffee in your paper map what happened. You got smudged right and you couldn't see the streets quite as clearly. Right, you can see there's a neighborhood there but you can't really see what's what. Well something similar happens in our brains over time. And that we start to lose that fine detail and our maps get smudged. Right, because we're not actually sensing our bodies very much and with chronic pain, for example, right somebody who has chronic low back pain. Right, if you put them in a scanner scanner and say okay bring your attention to the right side of your lower back.  It's not just that strip that represents the lower back. It's also the right glutes the right hip, the left leg, like in other words, there's not as much definition there's not as much fine use, you know the word I'm looking for something there. And so our maps get a little smudged. And so we know that this happens both with physical chronic pain. Right. And I'm pretty sure it happens also with emotional pain. So if you have trauma in a particular part of the body again you're not going to bring attention to that part of the body. Right people have a lot of difficulties with sexual side effects after being sexually assaulted. Part of that is because they actually will not spend as much mental time sensing that part of their body. So their map gets smudged right and this is partly what I think also creates some and one of the reasons are one of the ways that trauma creates illness. Right and dysfunction in the body is that we start to actually have a smudged maps we can't sense it as well. And then the same thing happens on the motor side of the body to right is that we don't have the ability to move quite as precisely. So I might be working with a beginner, you know, beginner yoga students, you know, maybe someone who's maybe doesn't have much experience, you know, engaging in physical exercise, and I might invite him to get and lift your right arm. He goes like this.  Right all of a sudden I'm able to not. I'm able to have better finally motor control. Right and yoga you do balancing posture right and it shows that you're actually a better ability to balance you're going to fall less than your older age. Right, so in other words, what's happening when we practice mindful practices of yoga right or even if you're running in a mindful way if you're lifting weights at the gym in a mindful way where you're paying attention to not only the sensations of the breath but paying attention to the physical body. What you're doing is you're remapping you're driving a little Google car through the streets. Right. You see little Google cars that goes through their map and all the alleys now they're mapping parking lots and they've got the whole thing that's right, because that is little Google cars going through the streets, clearing up the maps. And that's what we're doing when we're engaging in mindful awareness of bodily sensations, right when we engage in mindful movement of the physical body, what we're doing is we're just creating clear stronger maps of our internal world so our bodies become more predictable, more safe, both sensory wise and motor wise breathing we already mentioned breathing right but breathing is really the key to all of this we already did the thing where we extended our exhale right and it allows us to bring our attention or our physiological levels right inside that zone right where now our thoughts and behaviors can be more aligned with our values and goals where now what we know is that they be part of the nervous system right there's a part of the nervous system that evolved in humans differently than other animals are really involved in mammals right so you have something called your vagus nerve your vagus nerve is one of your 12 cranial nerves it comes out of the medulla part of your brain stem and it goes down and innovates all of your organs. And what we know is that if we were to, for example, cut your vagus nerve that your heart rate would jump up to about 170 beats per minute, because that's your heart's like natural resting state. Rest that's what your heart would do, but it's innovated by this newly evolved part of our nervous system that evolved very specifically to allow us to connect with one another to engage in socio affective communication. Right, so I can't actually talk to you and connect with you and put myself in your shoes, I can't try to actually get you to understand something.  The whole reason that we have this ability to regulate our autonomic nervous systems is so that we can actually connect and collaborate and do teamwork and cooperate so that we can achieve shared goals because we know that in evolutionary terms survival is most assured I guess, when you are in safety and numbers right we want to affiliate. And so this is the part of the nervous system that evolved very specifically in mammals right in humans in particular we have more than prefrontal cortex, right which is the attentional control. So in other words we have like we might be the only animals, right that we actually can consciously take a deep inhale. We can consciously extend that exhale, so that we can bring our arousal levels in a way where I can actually be present. I can actually be here, right to connect with you to whatever it is. Just going to do a little time check here, because I might want to also just briefly. So I'm, I'm an academic I'm a head case. I think that's why I like yoga right because it's experiential. Right, all of this great blah blah blah blah blah blah right there's so much noise in the world we all get so much information every day that it just sort of it just, you know, good information just sort of gets caught up in the whirlwind, what doesn't tend to get caught up in those same things as our own experience. Right, so I'm going to invite you to join me for just, you don't even have to sit up straight or anything but I'll invite you to do that works better. Let's see if we can just take maybe seven minutes tops. Right, and actually I might go a little longer than that we'll see. I'm going to just guide you through just a simple exercise where we're going to first notice the breath, right because the breath awareness is the first thing or we just have to notice where we're breathing. And then we'll start to engage in what we call a three part breath which is full yoga breath. And with the extended exhale, and then I might do a little bit of an attention switching exercise, where we start to notice sensations of the breath in different parts of our bodies. I'll invite you to, if you'd like to find a comfortable seated position, and by comfortable I mean supported in general, the rule of thumb is to have your hips higher than your knees. This is a good rule of thumb just in general if you're sitting you got low back issues, when you're sitting in your chair in general, when your hips are higher than your knees, it allows your back to have the neutral curves that it's supposed to have. Okay, whereas if you're like this, this is how I sit a lot right and I have that curve in my lower back and then it feels all cranky. So I'm going to find a seated position, maybe your feet are flat in the floor. Maybe your spine is relatively straight. I'll invite you to just give yourself permission for the next seven minutes to bring all of your attention here. I had all the other stuff you got in your head and all the other things you got to do they'll still be there in seven minutes I promise. And I think as best you can, in which to bring all of your attention all of your awareness right back to the tips of your nostrils. Your eyes can be open or closed. But for the next several breath cycles, just allow your attention to repeatedly return. Just noticing what does that feel like right there at the tips of your nostrils. If you're trying to feel anything in particular, there's no right or wrong or good or bad. It's just a exercise and curiously noticing whatever it is that you notice, not chasing sensation, not seeking sensation, but just noticing what you notice. At the same time, we're accepting and we're welcoming all the other distractions. We're noticing those distractions, the thoughts and then just bring your attention back to your breath in this moment. Nothing to do, nowhere to go. Continue to breathe and then invite you to take your hands down to where your fingertips are touching your belly button. So your hands are going to be on your lower belly. So that they're not touching the ribs, but maybe the fingertips again are just sort of hovering around the belly button area that Naples sent to. Continue to breathe normally as best you can. So when we pay attention to the breath we can either engage with the breath and we can purposefully breathe and control the breath. Or we can just see and try to relinquish control of the breath. What happens if you pay attention to the breath but don't actually engage in the breathing? Can you just notice and watch your body as it breathes itself? Some days this is easier than others. But what you might notice is that as you watch the breath, maybe you're noticing the sensations at the tips of your nostrils, you also notice that there's a little movement of your hands. The hands move slightly outward and away from the spine with each inhale and slightly inward towards the spine on the exhale. And what I'm going to invite you to do now is to exaggerate that movement. See if you can take a big belly exhale where you press that belly button all the way back to the front of the spine so that you can exhale all the way to empty. And then inhale just to inhale to feel that sense of expansion through the belly low back and sideways. And then again exhaling actively so we're leaving the chest relatively still and seeing if most of the movement can come from the movement of the belly pressing out for the inhale expanding three dimensionally for the inhale. And then seeing if we can extend that exhale by gently yielding the belly button back towards the front of the spine. So this is breathing space number one. Okay, we're going to call this breathing space number one and now I'm going to invite you to leave breathing space number one and take your hands to breathing space number two, which is the bottom half of your rib cage underneath the breastline but on top of the ribs. Again, you could have them in the front ribs you can even have on the side of the back ribs. But see if you can come back to that noticing breath. So don't try to breathe but see if you can just become aware of the breath and notice if there's any movements of the hands. There may be a lot of movement or maybe very little or no movements. And after you take your next full deep exhale, when you inhale first fill breathing space number one, and then wait till you fill breathing space number one until you start to fill breathing space number two. And then exhale all the way to empty. So we're going to exhale all the way to empty we're going to see if we can fill breathing space number one first. And only then that we feel that three dimensional expansion through breathing space number two. And then we can just exhale all the way to empty and try that a couple of times at your own pace. When you're writing the venture again release that we're going to take our hands now to breathing space number three, which is the top half of the rib cage. I like to sometimes stick my thumbs in my armpits and fan my fingers across the collar bones. You can also just take your hands and put them in opposite armpits like you're like that. And then come back to that resting normal just noticing breath and not trying to feel anything in particular but just notice what you notice. Notice any movement of the hands. Maybe noticing a subtle expanding and contracting of what we call breathing space number three and keeping your hands are good and exhale all the way to empty. Inhale and three parts first breathe into breathing space number one. Let the expansion come to breathing space number two, and then to three, and then exhale and you can take your hands back to wherever is the most comfortable for you on your body or not. See if you can now take yourself through a few of these three part press we exhale all the way to empty. As you inhale you feel that three dimensional expansion first through breathing space number one. Breathing space number two. And then through breathing space number three. Then if you want to see if you can't use that gentle constriction in the back of the throat just gently squeezing the back of the throat so that the air can escape a little bit more slowly your exhale can become longer than your inhale. At any point come back to normal resting breath but see if you can do a few rounds of this where we can really take a full three part inhale. What they call a victorious breath exhale. And what you'll notice is your mind has been distracted by lots of different things as we're doing this exercise. Each time you bring your attention back to the exercise you're strengthening that muscle prefrontal cortex. Each time you lengthen that exhale it allows actually creates the conditions to allow you to concentrate a little bit more fully. Now that we've got this nice deep breath flowing keep your hands again wherever it's most comfortable for you. I'm going to invite you to continue breathing but now I'm going to invite you to change your attention and bring all of your attention into your right nostril. As you take the next inhale notice the sensations in your right nostril. Cross over the bridge of your nose with your awareness bring your attention to the left nostril when you do your next exhale. Stay in the left nostril as you inhale. Cross over the bridge of the nose bring your attention to the right nostril exhale. Good inhale right. Crossing over noticing left. Inhale left. Cross over exhale right. Now we're not really breathing one nostril at a time it's just an exercising noticing just the right nostrils as you take a big three part inhale. Cross over the bridge of the nose and take that long exhale just noticing the sensations in your left nostril. Inhale left. Cross over exhale right. Let's do one more round together. Inhale right. Cross over exhale left. Inhale left. Cross over exhale right. Just do a couple more rounds of this at your own pace. When you're done just come back to a normal resting breath noticing all of the sensations that you experience in the moment. Taking all the time you need in the next 20 seconds or so to complete your three part breath. Instead of ending the practice I invite you to continue the practice even as you move through your day. At any point we can bring our attention right back to the sensations of the breath. At any point we can allow the breath to be deep and full and extend that exhale. And what we know is that's going to allow us to have better control of our own minds and bodies. So we know that these tools. We're not going to talk too much about yoga and Nidra, which is another of the five tools that we use at the mindful resilience program, which is really guided meditation of the body. And we're not going to spend too much time talking about gratitude but that's the fifth of the five tools. So when we cultivate an attitude of gratitude, we're not missing something. We're not seeking something else. So that part of the brain that's always active seeking pleasure and avoiding pain is able to be quieted when we take that moment of gratitude for whatever it is that we can find gratitude for in that moment. So in these ways, right, we can understand that these mind body tools create an internal sense of safety predictability control right where our minds are bodies right of thoughts or emotions physiology starts to become a little bit more predictable. Right and it becomes a little bit more controllable. However, let me read it back so in teaching these tools to others. And using these tools I think for leadership. Part of the thing we have to understand is that my student is not going to do this breathing practice. If they are. They're not in the moment. In other words, is anyone here, does anybody here ever have any of you have a regular meditation practice. Have you. The other next line is usually how many of you stretch the definition of the word regular, but I'll withdraw that question instead. How many of you have ever gone into the middle of a busy intersection sat down in the middle of that intersection and tried to meditate, guessing nobody's ever done that right. And for the most part right now for the most part, for many of the people that I work with. They're in the middle of the intersection all the time. For me sometimes I'm in the middle of the intersection right you know if I'm just sitting at home on my couch or my dining room table right sometimes we are in the middle of the intersection. When we are in the middle of the intersection, we can't learn these tools right we can't really land we can actually be present to practice that deep breath or to really be present with it. If I'm not in a safe and predictable and controllable external environment. In other words, my ability to learn the tools that create internal safe predictable control environment depends on my ability to learn those tools which depends on learning those tools in an environment that is safe predictable and controllable. And so, most of the leadership skills that we learn right all these different leadership, you know, approaches that are out there, you can look at them. And a lot of them are in what you're doing is you're providing safety predictability and control for the people that you work for. So as a psychologist right, if I'm doing one on one therapy with someone I'm not going to have my client come into my office and have them sitting across me with their back to the door. Right, because if I'm which is my most offices are right you come in I'm looking at the door and then as you're talking to me your back is to the door the whole time. And on some level, you don't even have to have push my stress on some level part of your consciousness is paying attention what's back there, or listening for the sound of the door opening or right and so now that part of consciousness isn't here with me.  Right and so all of us, right, when we're leading others when we're working with others we have the ability to create a sense of predictability and control. Right when people are coming into a meeting saying hey we're going to be here for 20 minutes and we're going to here's the agenda. Right when you walk into a meeting and know what the agenda is and you know how long the meeting is. I've had this bad a meeting right and maybe it's actually one that we get more work done. Right, and if you think about just basic courtesy it's basic courtesy communications right, and this comes in home life to my wife is home, she comes home late from work. Right, let's say she comes home at six o'clock, and all of a sudden it's 605 and she's not home. What happens. All of a sudden I'm worrying and 610 where is she and all of a sudden here siren know now right and now I'm not really focused on being where I am in the moment right I'm caught up in all this stuff because there wasn't predictability there. Right, but if she calls and says, hey I'm going to be home late tonight because I got to go stop it somewhere. All of a sudden now whatever consciousness I had worrying about that can now be here. Right, and I can be with my daughter or with my family or whatever it is that I'm working on in the moment. And so, if we think about just communicating right communication communication communication, when we communicate both of our plans are with others right when we communicate to others what we're doing. And we give our team right control right here this is what I think what do you think or you know you give them some choices. What you're doing is you're creating the conditions. Now where they're going to be able to execute more effectively. Whatever their, whatever their task is, because again they just have one less thing to worry about. Right so when we look at these programs that are taking care of the, you know, an active duty members family. Right, right. That's that's a distraction for someone right for no matter what kind of job you do right if you have to worry about your family, right if there's active things to be concerned about you're not going to do your job as well. You're not going to be able to exercise that attentional control. So, what I would invite us to do is to think about that when we are whether we're leading ourselves our own families or communities right in your job. If we can provide safety particularly control in the external environment. Right. And if you look at, you know, one of the things that I know I'm running out of time here but one of the interesting things about the military, right is how every how predictable everything is.  Right. And so that there isn't more, you know, and so I would just invite us to think about ways that we can bring that into our own lives. Right, how can I be more predictable for myself. Right, but then also for my family and for, you know, those that I lead at my job. So, and then really, gratitude ultimately creates the ability for us to connect to work with others as well. Right all these tools really are just going to allow us to click connect and collaborate. So that's us that's veterans yoga projects. It's an organization they started 10 years ago, we delivered 26,000 yoga visits in 2019. It's a little bit weirder to count that in 2020 because half of it was online. But what we do is we train veterans and active duty and their families how to use these tools to be more resilient. Right, and although our niche as a clinical psychologist, my niche was really in treating veterans with post traumatic stress and other trauma related disorders. We've really grown now where we're working more with folks who might not be dealing with any mental health issues but are focused on resilience and giving back to others. So, I guess this is not going to work anymore. I think I only had one slide left anyway. But that is all I have. You can reach out to me dan at veterans yoga project.org, go to veterans yoga project.org we have several hours of yoga every day we have 15 minute breathing practices and meditation practices that are live taught by veterans and their family members and some civilians. And we provide yoga teacher training for veterans, and our newest program is a mindful resilience for compassion fatigue program for the caregivers of those who are dealing with issues and working with veteran families as well as the social workers and clinicians that are out there dealing with those who are dealing with significant mental health issues. So with that, I am very grateful thank you guys for being here and for being so attentive and engaged, and I'm happy to take any questions or observation.


Just a reminder that this session is being recorded and will be uploaded to WordPress TV and also to YouTube. This developer hour session is part of a series that we're running. I think we've had six or seven now, I've lost count. And in this session, we're very pleased to welcome Adam, who is going to be talking about WordPress Playground. Adam is one of the developers of WordPress Playground, so we're very honored to have him talk to us about it. As I said a little earlier, as people were still joining, please do turn on your video if you wish. It would be great to see you and make it feel more like it's a conversation, but do please remain muted during the presentation. There'll be an opportunity for questions a bit later on. I'm just gonna put a couple of links up for you. If you're new to WordPress Playground, here is the announcement post, which I think was authored by Adam, wasn't it? Yeah, yes, it was, and hello everyone, pay-to-ate there. And here is the project repo. If you wanna get involved in post issues and PRs, I'm sure it's an open source project, so everyone's welcome to contribute. This, I don't know, maybe we shouldn't just post a lot of links, maybe we should post them as you do your talk. Adam, if you just ask me to post a link and I will, and I'll do it, that might be a little bit more interactive. Let's do that. Yeah, as I said, there'll be a Q&A at the end, so put your questions in the chat or raise your hand. And we'll get around to you and Adam will be pleased to answer your questions. Just gonna run through a few announcements. WordPress 6.2 was released at the end of March and WordPress 6.3 is currently in development. You can get involved as well and contribute to WordPress 6.3, so there's a link if you want to dig into that. WordCamp's are coming back after the pandemic and WordCamp Europe is only a couple of weeks away now, so there's a link to that. I'm not sure if this ticket's still available. I didn't have it checked, but I'm going to be there.  Yes, I'm going to be there. There will be a WordPress Playground Table at Contributor Day and WordPress Playground Session and WP Connect on Saturday. Yeah, I'm doing a workshop on migrating a plugin to Blocks as well at WordCamp. WordCamp US is a bit earlier this year than in previous years. It's gonna be the 24th to the 26th of August, so there's a link for that. And then, as I said, WordCamp's are coming back and if you're looking for a look, if you can't make one of the flagship ones and you're looking for a local one, just hop over to central.wordcamp.org and find a WordCamp near you. Okay, so let me officially introduce Adam. He works for Automatic, he's one of the core developers of WordPress Playground. Do you wanna just tell us a little bit about yourself, Adam, before we get started on the presentation? Yeah, absolutely. So as Michael said, I work at Automatic. I'm a WordPress core committer. I live in Poland, Wroclaw and last year I had this problem with WordPress where I wanted to start teaching people more things about how to get started, how to build blogs, how to interact with Gutenberg and turns out that was very hard to do because every tutorial I could come up with would have to start with a long setup section and then I thought long and hard, well, is there anything to be done so that a new prospective developer could just open a link, start a course and just start learning there without any set of steps at all and turns out the answer was yes and that's what WordPress Playground and I'm about to introduce it to all of you. Okay, amazing, thank you. Let me hand over to you, take it away, Adam. Awesome, so I'm going to show my screen and show you the presentation I prepared. Ta-ta-ta-ta, ta-ta-ta, all right. So WordPress Playground, this is WordPress Playground and it's a complete WordPress instance running exclusively in my browser. There is no server with PHP, there's no server with a database, there's no server at all. There's just my browser and the JavaScript and in the next hour, I'm going to tell you why this is any interesting, how it works internally and how exactly can you use it, can you start using it today? So first things first, why is WordPress Playground interesting? And that is because WordPress is very difficult and I don't even mean creating websites in WordPress, I mean starting your journey with WordPress. So if I'm a new user and someone told me WordPress is cool, you should check it out. Well, I'm going to Google how to install WordPress and I'm going to find out the installation doesn't actually take five minutes because I need to perform all these steps full of three letter acronyms that I'm not familiar with and I'm not going to know what to do with PHP and FTP and all that. So perhaps I'm going to try something else. The only alternative I have for figuring this out is finding a company that already did it, a hosting company and giving it my credit card and maybe I don't want to do that just to get acquainted with WordPress. Or if I'm a prospective developer and I want to learn WordPress, well, then every tutorial starts with something like this. This is actually what I wrote for Gutenberg data. There's a lengthy setup. I need to know how to set up my PHP and Node.js and NPM and all this. It's not very approachable for a new person. So perhaps I'm going to try a framework that has these online interactive things that I can just get started with. Or if I'm a part of a product team and my friend sent me a pull request, well, I don't have a local development environment and I don't have a staging. So what exactly am I supposed to do with it? I'm unable to test it without either of these. Or if I'm a product company and I'm building a plugin for WordPress, well, I would really like to show people how my plugin works. But at the moment, I kind of have to do videos and screenshots because it's not possible for me to easily show a live demo to my customers. And so this actually, I think there's a, just a second, I'm going to exit that. All right, sorry. Now it's just like, so I cannot show a live demo because everyone would have to get their own WordPress instance and people would start changing things in WP Army and I don't want that. And I'm not going to give a separate WordPress to every single person because that would cost a lot of money. So no live demos, very few plugins have that. So in WordPress, it's difficult to install it. It's difficult to get started with learning how to code, how to use it. It's difficult to test changes. My colleagues from the team are sending me and it's difficult to distribute and demo my code. So there are some solutions that improve the situation like there's local and there's WPNF and maybe they are going to make the installation easier on my local machine. Maybe they are going to help with testing but I'm not going to embed local or WPNF on my homepage. I'm not going to be able to use it on my phone, right? I need a desktop device. I need to install something or I need someone else who already did that and can send me a link. So WordPress Playground solves all these problems with a single click. And the way it works is that if I want to install WordPress and I have WordPress Playground somewhere in the internet, I have a link to that. Well, I can just click a button and there's WordPress. And it just works in my browser tab. I only had to visit this page. Furthermore, I can customize it so I can select a theme, a bunch of plugins and I can just click a button and they are already being downloaded and installed for me. And I don't have anything locally and there's no server handling this for me. This is all happening in my browser tab. So installation is very, very simple. I just visit a website. Then if I want to learn how to code with WordPress Playground, I can just visit a course and I can start learning. So this is an interactive code snippet and I published a blog post with some of these about a new API for modifying HTML which was merged in WordPress 6.2. By the way, like it's beautiful, you should check it out. But this is a blog post that I published that teaches you that API. So you'll notice here's a code example and I can run it and it runs in my browser. Furthermore, I can customize it. I can change something here. So I'll make it say, hello, WordCamp. And if I run it again, well, the output changes. So the entire PHP with this API loaded is running in my browser tab and I didn't have to set up anything. I didn't have to download anything. I just visited a link and that's it. So I just want to take a minute to appreciate how great that is because if I only have a mobile device, I'm not a developer yet. I have a different career. I have a break, all right? I have a 30 minutes to spare. I'm not going to take out a laptop from a backpack. Maybe I don't even have a laptop but I probably have a phone or a tablet and I can use this to start learning immediately and I can learn on the train and I can learn in a plane. And I would really like at one point in time for the entire WordPress documentation to actually become interactive, right? So you wouldn't have to even look for external resources. It would be learnable by default. You would maybe even have a tried button and start building button and start contributing and all that. They would all just give you an immediate experience. So all nine code snippets are nice but what if I want to build something more? Like if I actually am ready for a local development environment. Well, with WordPress Playground, I can go to my VS code and there's a plugin. And if I install that plugin and I start WordPress Server, well, I can start writing WordPress plugins and themes immediately, right? It's just a click of a button. Install a plugin, start a server and it works in my browser. I don't need Docker. I don't need PHP. I don't need my SQL. It's just VS code and the extension. That's everything I need. And I'm ready for building WordPress plugins. So this is a huge improvement over what we used to have with downloading a list of dependencies and installing and using terminal, right? Right now it's a button. It's a single click, click and that's it. And if I want to test a change from a colleague, from developer colleague who send it over to me with WordPress Playground, this is as simple as just click, click and that's it. So this is our PR that we've seen before and only this time there is a link to try it. So this pull request just adds a secret message in WP Admin and there's a preview link at the bottom of it. So let's click that link and see what happens. It opens WordPress Playground with my pull request already loaded and there's my secret message. But let's see if this works on PHP 8. So I just select different PHP version and there's an error. Cool. I'm glad it was so easy to test and I'm glad to have tested that because I could have learned in production from disappointed users. So one thing about WordPress Playground is that it allows you to easily switch PHP and WordPress versions, which is excellent for compatibility testing. I could test my plugin on WordPress 6.1 and 6.0 and PHP 7.4 and 8.2 and do it with just a click. So if I'm a product company and I want to do a live demo with WordPress Playground, I can put that demo right on my homepage. So this is a store that I briefly showed before and this time we don't have a video with an actual WooCommerce store right here. I can open a product, I can add a tray card, I can go to checkout, I can do anything I want here. This is an actual store working in my browser. Any other person who comes there will be able to use it like their own instance. And by the way, this is how it's implemented. It only took like 24 lines of code to create a demo and most of it is JSON. So this is very, very, very accessible for using. There is no complex setup even to build these demos. So let's take a look how all of that seemingly magic thing works internally. So there are two parts to WordPress Playground. There is a PHP working in the browser and there is WordPress working without a server. Excuse me for a second. So let's take a look at PHP in the browser. This is possible thanks to a new technology called WebAssembly. And WebAssembly allows you to run regular software that we know from desktops and servers in the browser just in JavaScript. So let's talk about C programs and PHP for a second. So turns out PHP, the programming language, if I want to run PHP code, I have to use PHP interpreter and that interpreter is in itself a program written in a C programming language. So the thing about C programs is that this is a very simple C program that's going to print hello world on my screen. The thing about C programs is that I can run them, I can compile them and I can run them on my computer. So typically the process works like this. I give a program to a compiler, I get an executable file and that could be hello.out or hello.exe on Windows or any number of other extensions. The point is I can execute it and when I do it, I see hello world on my screen. So with web assembly, we can do exactly the same thing but for the web. So I use a different compiler called mscripten and it gives me executable files only this time. It's not exe, it's hello.wazm and hello.js. So I get two files and then I can execute them and I can do it anywhere I have JavaScript. So I can execute them in node or in my browser or in a VS code extension or anywhere else. So PHP interpreter is a C program, which means I can take the source code of the PHP programming language and I can compile it to executable files and then I can execute them in the browser, which means I can run PHP code. Like there's a lot of concepts here, everything's linked like programs, compilers, execution. The point is I can take PHP, the programming language, do a bunch of transformations and now I can run PHP inside JavaScript which actually looks more like this because PHP has more than one version and every version has its own separate set of executable files, which means the demo I showed before. You remember the little version switcher where I was choosing PHP 8. It's actually pretty boring how that works internally. It only tells the browser, hey, download this other PHP file. Don't use PHP underscore seven underscore four. Use PHP underscore eight underscore zero. So this is PHP. Now let's take a look at how WordPress works. So to run WordPress, I normally need to download WordPress, install it and navigate through it. So downloading is a solved problem. We have WordPress.org. There's a download button there. I can download WordPress zip and inside a browser tab in a JavaScript application in WordPress Playground, the exact same thing happens. There's a fetch API in the browser. It's used, WordPress gets downloaded. That's it. But where it gets interesting is when we talk about the installation. So normally to install WordPress, I need to run the installation wizard and it will ask me for my MySQL database credentials. So it will ask what's the host, what's the username and password. And that's all cool, but in the browser we don't have MySQL. So what do we do in WordPress Playground? Well, we still use a database, but we use a database called SQLite. And this one we can run in a browser tab for a technical detail that's just a file. SQLite database is just a file. And then we run something called SQL translator. So there is an official WordPress plugin that you can install in any of your WordPress projects and it will allow you to use WordPress with a SQLite database. Technically the way it works is that WordPress actually thinks it talks to MySQL, it uses MySQL queries that are not always compatible with SQLite and the translation layer takes them, it rewrites them to SQLite, runs them in SQLite, takes the response from SQLite, translates that back to WordPress and passes it through the WordPress code. So WordPress thinks it has the database it needs. We use SQLite, everything works beautifully and this is actually quite, quite, quite reliable. So more than 99% of WordPress core unit tests work on that. And the remaining part is mostly specific to MySQL and not even relevant in this context. And that's installing WordPress. So now we also need to open WordPress in our browser window and start navigating through it. So how can we do that? With classic WordPress, our web browser goes through the internet, through the servers and we're remote and on that server we have PHP, we have WordPress and our browser says, hey, give me a home page. And the server says, sure, I'm going to take your request, tell PHP about it. PHP is going to produce the home page for me and I'll give it back to you. And this is all cool, but in WordPress Playground, well, we don't have a server. So what do we do? Well, we don't have a server remotely, but how WordPress Playground works is that it takes that server and it puts it inside your web browser. So now your web browser is a device that has two functions. One is browsing the internet and the WordPress website but the second function is now, it actually runs the WordPress website. The server works inside your browser. So there's one little detail that doesn't add up here and that is to use websites, we click on links, we submit forms and all of that traffic, it has to go somewhere, right? Like browser has a URL in there, it will send network traffic. So we cannot send that network traffic anywhere which is why we use something called a service worker and service worker is a JavaScript feature that allows you to handle some of that network traffic on your own. So in our case, anytime there's a request going to WordPress somewhere, we just say, oh, no, no, no, no, no, no, no, like we'll take it over from here and service worker passes it back to the browser, to the WordPress instance running in there, takes the response, puts it back in a part that you can see renders WordPress website and that's the entire magic. So we downloaded WordPress, we installed WordPress and now we can navigate through it. So we have a running WordPress. So let's see how exactly you can use that. What is it good for? So there are four ways of using WordPress Playground. First one doesn't require you to write any code at all. Then there are simple APIs, more complex APIs and like the most complex API. So let's take a look at no code. That's super simple, just go to this link right here. And by the way, there's a resource page where all these three links are posted and it will be available in the chat. So to use WordPress Playground with no code, you just go to this link and it opens WordPress. It runs in your browser. So at this point you can even turn off internet. It is still going to work. And what you can do with it is you can build a theme or an entire site, you can save it, you can restore it later. You can try out any plugin you want. You can try out 50 plugins and it's not going to break any website that you have. And if you want to start over, you just refresh that page and it's going to give a brand new Playground instance. All the data that you put in there, it is private. It stays in your browser. It is not sent over to any external service. So you can do anything you want and you can then just crop it, start over or save your progress, restore it, host your site that you download anywhere. All of these things are possible. And then you can test your code on multiple versions of 4% PHP. Then there's a query API and this is the simplest way of integrating WordPress Playground with an actual application. So the way it works is that you embed Playground using an iframe on any web page and you give it a special something in the URL. So this iframe, it shows how it is depicted on the preview at the bottom of this slide. So it embeds Playground.wordpress.net but then it says themes equal pendent and that tells Playground to grab that theme from the WordPress theme directory and install it on that WordPress before allowing you to interact with it. So theme is one thing but you can also tell it to use a specific PHP version or WordPress version or a specific plugin or go to a specific URL and there's a ton more of these. They are all listed in the official documentation and the link will be available in a chat. And let's take a look at what you can build with it. So this is the demo that we've seen earlier. It's leaves on developer.wordpress.org slash Playground and we've selected a theme.  So the way it technically works is that nothing special happens on developer.wordpress.org slash Playground. The only thing it does is it creates this query URL. So it makes it, it writes plugin co-blocks, plugin BBPress, like anything you select. It just appends it to a string and then it takes that string and puts it in iframe source. And all the hard work happens inside WordPress Playground. So this was very, very, very easy to prepare. Now another API you can use in WordPress Playground is called Blueprints and Blueprints are JSON files where you list all the steps necessary to set up a WordPress Playground instance. So you can run any PHP code in there. In this instance, we are inserting a new post and you can log in as an admin and you can write files and install plugins and themes and not only plugins and themes from the WordPress directory, any plugins and themes. You can install your plugin or you can apply a PR in this. Actually, there's a, oh, I'll be talking about that in a minute. So for now, let's stay here. So Blueprints give you a whole lot of control. It's a very approachable API. You don't even need to write any JavaScript. You don't need a code editor. You can just write some JSON and then that JSON, you can paste it in the URL which is explained in the documentation and Playground will just use it. So you don't even have to download any MPM package, right? You just declare what is it that you want exactly, put it in the URL, that's it, right? You can try it right after this presentation even. And what's building with Blueprints is this very cool translations Playground. So translating WordPress used to require installing WordPress, downloading some translation files and maybe installing a plugin and maybe configuring that plugin like a bunch of steps if you wanted to see things in context. Well, in here, you go to a website and there's a link at the bottom and also like in the resources page. And then on that website, there's a Playground instance and there's a Blueprint and that Blueprint downloads translations files for you. It installs Glotpress local. It installs any plugin you want. So in here, we have France plugin and activates this feature where you can translate things in context. And also another cool thing about it is that you can even integrate chat GPT with it if you have open API or open AI API T. So this was built with Blueprints and it took, I think, I checked that yesterday, the most recent version, I think it's 100 lines of JSON to build that. So how cool is that? And finally, you have a JavaScript API and this is the most powerful of all, but also there's the highest barrier of N3. So this is available via an NPM package and you can import it and use all the functions to start Playground, connect to it, like run files, dispatch requests to WordPress, run PHP code, do anything you want in there. There's a ton of helpers. You can also use any Blueprints with that that you want, but you need a code editor for that and you need to use that NPM package. So you probably also need to spend a little bit more time with the documentation. So this one gives you an absolute, full, complete control over Playground, but it also requires a little bit more effort to get started with. So, all right, yeah, I'll show that in a second. So for now, let's summarize the slides and WordPress Playground is WordPress in your browser. It is ready with a single Greek. There are APIs you can use to customize it and it's official WordPress project. It is free and it is open source. So the links live at www.least-wordpress-playgrounds and if you look up WordPress Playground like in GitHub, Google, Twitter, like you'll find a lot more stuff, but I'm going to show you also something else. So with WordPress Playground, there's a whole lot of things that you can do. So let's take a look at specifics. In here, like this is Playground site and in that Playground site, I can build a theme. So we'll get there, but for now, let's take a look at how we can install plugins there. So we want to have a Gutenberg plugin and a create block theme plugin. And we are also going to install this Kate Park theme. And the first way to do it is to, well, just do it from WP Admin, upload them. So I'm going to go to plugins, add new and the first thing I see is there's an error. And the reason for that is, as I told you before, WordPress Playground doesn't send any data at all to any external sites. Well, unfortunately, that includes WordPress plugin directory. So I won't be able to see any plugins in my WP Admin, but I can still upload them and I can still use the query API. So I'm going to upload them in here. Just to go through the process. So I have the Gutenberg plugin and I just do it as regularly uploaded, activated. It's there. And I'm going to do the exact same thing for create block plugin and upload it, install, activate. And you can already see that's a little bit mundane, but let's complete that so we can take a look at better option and actually feel some relief. So I'm going to also do it for the Kate Park theme. So yeah, all right, I have all these things in there. I can activate my theme. And if I go to homepage, I'll see, sure, this is the Kate Park theme. And if I go to WP Admin, I'll see, sure, there is Gutenberg in here and I can go to Gutenberg demo and it all works. So that worked fine, but it also took a little bit, right? It wasn't that pleasant of a process. So let's take a look at automation. So the query API that I showed you earlier, it is the perfect use case for this. So I'll refresh this, get a brand new WordPress and let's install some plugins in an automated way. So in here, I'll just type theme equals Kate Park. And then I'll say, I'm present plugin equals Gutenberg. And then I'll say I'm present plugin again, which is fine. And I'll say create block theme and just presenter. And now playground does all the work for me. So it downloads Gutenberg and create block theme and the Kate Park theme activates all them. So this is the exact same result as I got before, like all these plugins are here. The theme is there, I can go to Gutenberg demo, fine. So that was a little bit of a trick to make the setup more pleasant. So what of it? Now let's take a look at the actual application of this and build a theme in the site WordPress playground. So with all my plugins in place, I can now go to the site editor. And in that site editor, well, let's customize that Kate Park theme a little bit and make it our own. Let's make our own theme based on that. So I'm going to customize the background and maybe make it low.  But I'm updating fonts, line heights, all that. So this is my version of Kate Park theme. So I can now go to options and create block theme since I have the plugin. And if I scroll that sidebar a little bit, there's export button, I press it and downloads my customized theme. So that file I can use to install the theme on any WordPress instance. So let's try it in another playground, shall we? So I open a new tab which gives me a brand new WordPress from scratch and I can add a theme, upload it and use the exact zip file that we just exported. So if I install that and activate my theme and now I go to homepage, well, there it is. All right, so I just build an entire theme without ever installing WordPress doing any setup at all. I just put something in the URL and started working, started doing things. So this saves a whole lot of work on getting everything to work. But let's not end there. My website is pretty empty, let's import some content on it. And WordPress allows you to export your site content and then also import it. So I'm going to go to tools, import and I have a file that I prepared earlier that I'm going to put in that importer. So I'll select it, it's an XML file. I'm going to add things that are for testing things. So I need to choose the outer for all posts. And the first thing I'm going to see after pressing submit is there's a bunch of failures. And that's fine. These media files are remotely so WordPress program cannot download them. Well maybe one day there will be a feature for that but it's cool, cool. All the content is in here even if there are no media files. So I have a lot of new pages, I can browse them, check how quotes look like, headers, all these things. And I could even import my entire site in here. Let's build an entire site and not stop at a theme and some content. So this is WordPress Playground Documentation. Let's try to rebuild this as closely as possible within the confines of our new themes. So we'll use those colors and fonts but we'll use this content. So I'll find a pattern to match what I need as closely as possible. And this is a two-column pattern and I'll paste my content here.  So I put all the content here and then maybe I put a video and then maybe I remove everything I don't need in there like the view menus and all that and update site title. So that's a bunch of work but once I'm finished, this is my site and well, I would hate to lose it when I refer to the page. And by the way, this is a preview in new tab which also works in Playground. So this is very cool but I don't want to lose my work so I can now go to my Playground site where I started and I press this little download button and it downloads the entire site as a zip file to my computer and by entire site, I mean, if I go there to my downloads folder and I unzip it, well, everything that I need to host that site is in there. So all WordPress core files are here and all plugins are here and my theme and there's even an entire database in a SQLite file. So this is my complete site. Nothing is missing from here. I can take this archive and I can host it somewhere. Well, what else I can do? I can send it over to someone and they will be able to import it in Playground. So let's try that. There's this little import button, I pressed it, I use my file, I import and there's my site exactly how I left it. So I can save my work, I can restore my work, I can host it somewhere else and then finally I can test if it continues to work on other PHP and WordPress versions. So let's use WordPress 6.0 here and this is a brand new WordPress 6.0. So I'm going to import the theme that I built earlier. So let's select it, let's upload it. Well, we install, we activate and we check. So it works on WordPress 6.0, which is really cool but I have a bad feeling about this. So let's also make sure all the WordPress 5.9 since we have reasons to support it in this case. So let's go to admin and appearance and themes and once I try to do that same thing in WordPress 5.9, I'm going to learn, well, this theme is not compatible with WordPress 5.9. So I was able to find all of that without doing a ton of setup and dockers and configs. I just did a bunch of clicks and it all worked right there in my browser. So that's the video and this is WordPress Playground documentation that I was snatching it earlier. So it has some videos and cool examples but everything I just showed and demo is here and also for some of these APIs, like the Blueprint API, well, there are, sorry about that, there are also much better, there are also interactive code examples. So here's a Blueprint and I can just click to try it out now and it's going to create a WordPress with this PHP version, with this WordPress version and I'm going to be already logged in as an admin. So when I'm not streaming, it's actually loads much faster but that was still pretty fast. Here's WordPress 5.9 and all these other examples, you can use them, you can try them right here. They are not editable yet but they are going to be. So that's WordPress Playground, that's what I wanted to show you and we can open this up for questions now. Amazing, thank you very much, Adam. It looks so impressive. Yes, let's have your questions, either raise your hand or post your questions in the chat and we'll get around to you. So while people are getting their questions together in the chat, I've got a question. Does when you close the tab, so it stores the data in the SQLite database, does that persist across instances? So if you close the tab with your browser and you reopen it. Yeah, so at the moment, it's like once you close your tab, that entire database is wiped out, it lives in that browser tab. However, what you can do is, while you have that tab open, you can edit a page and you can click preview in new tab and it's going to open a new browser tab with that same WordPress. So you can have as many tabs as you want, referencing your original WordPress site in your first tab is just don't close that tab because once you close it, it all will be gone and there is a feature plan for WordPress Playgrounds to have this mode, like persistent mode, that will store all your site in local storage or like one of the other storage mechanisms and it will allow you to actually refresh the page and see the exact same site. So technically like it will import it and we import like details. Point is right now, you close that tab, you lose it in the future, you'll have the option to retain it. But for now, you need to save it, press the button, export it. You need to save it or export it in the way that you showed just at the end of the demo there. Yeah. But that exports, I saw in the database folder, you had a SQLite database, but WordPress, if you want to transfer that to say a live WordPress site, having developed it in WordPress Playground, WordPress will import a SQLite database. So there are a few ways to go about it. If you just want to host what you build and don't actually transfer it anywhere, like just take the exact thing you build and host it, it will just work. You don't have to do anything transferring it into my SQL, you can use that exact database. If, however, you would like to take parts of it and put it on your live website that uses my SQL, well, there's a bunch of techniques you can use. So one of them would be, well, you can export SQL dump and import it in there, like that's pretty advanced. A lot of things to take care of a lot could go wrong. So what else you could do? Well, depends on which part of it you want to import. Maybe you can use WordPress exporters and just grab your content. Maybe you want to export just the theme and use that. Maybe you don't need the entire site. So depending on the use case, you can export parts of it, you can use the entire thing or you can instead of importing it to an existing site, you can just host this as an existing site. There are many ways to go about it. Okay, thank you. Oh, actually what I showed there in the meantime with importing the XML file, that was an example of moving just the content between WordPress sites. So that file was exported from another site earlier on. And then I grabbed just that content bit and put it in WordPress Playground. So the same thing can be done from WordPress Playground to a live site. Cool, yes, of course, you could just export the content and then, yeah. Okay, we've got any questions from the floor? Please post your questions in the chat. Oh, here's a question. Does it support WordPress CLI, WPCLI? That's a very good question. So WordPress Playground is many different things. So there was the Playground in the browser that I was focusing on today, but there's also the VS Code extension that I briefly mentioned. So turns out, as of yesterday, there is also a CLI tool for Terminal. It is called WP Now. It is built on top of WordPress Playground. And in it, you can use WPCLI. Sorry, what was it called? WP. It is WP Now, WP-Now. So it is the NPM package. I'll put that in the chat, WP-Now. Actually, maybe I can pull a link to an announcement post. There was one released yesterday. So you can use this to run WPCLI on your local computer, but there is also a support for the web version upcoming. So we'll be able to use WPCLI exactly on the website. There's a terminal. There will be a terminal window. And there was a CloudFox hackathon earlier this year. When me and Daniel Bacuber, we were leading a project aimed to create an in-browser WordPress development environment. So that was an MVP we had to gather in two and a half days. And what it did is we had a code editor in the browser. It had a terminal that you could use. And then we opened that on a phone. We turned off the internet. We built a WordPress plugin on that phone. We activated it in WP Admin. Mind you, with internet turned off and started using it and it all worked beautifully. So that is very much possible. There is no official support for WPCLI in the browser. It is locally, but there will be. Awesome. So you'll actually have a terminal in the browser. Yeah. Wow. OK. So any other questions? Anybody have any questions for Adam? Halmar is just commenting with a great opportunity. Thank you. I have the resource for WP now. So I'm going to put it in the chat right now. Thank you. Awesome. Great. So the instance of WordPress that spins up is, is it always in English? Can you set the language? Right now, you can set the language in the Admin. Yeah. So in fact, I'm going to share one more thing. And I briefly mentioned that during the presentation. So let's see. So this is the translations playground. And as you may notice, it says DE in here. So this means it's downloading German translation files, applying them in WordPress. Like, and it also like installs the translations plugin and all that. But the point is, this is in German. So there are no, like, controls you can use by default to, you know, like, just type something in the playground.wordpress.net to get it. But this is an application built using WordPress Playground. And it has German translations. And it's not that difficult to build. There is some effort you have to put in a crafting a blueprint. It's not that much. So it is supported. It is, there is no like UI control for it. There is no a single button, but you can absolutely do it. But the Admin pages would still be in English. Oh, this is Admin, right? Oh, sorry. Yes, you're right. Yeah. Sorry about that. You had a window over the, yeah. How did you identify this need? How did you come up with this idea for creating this cool technology? Thank you. I was writing a tutorial. And I spent a couple of days on writing a setup section and figuring out, like, all the different ways it can go wrong and how to make it simple. And then I thought, wow, like, this is complex. Like, you need to know what a terminal is.  Like, you need to have NPM and nodes and, and Git and be able to use these things. And I felt like, I don't want to do that. Like, I don't want to expect people to spend an entire day worth of work before they can take their first step. So I thought, well, you can teach JavaScript online on sites. There are plenty of live demos. But with WordPress, it gets more difficult because you have REST API and you need to use that. So you would need to work with somewhere in the cloud. But people would start updating things in WP Admin, putting their own content in there. Like, that could go very wrong very quickly and it would be a massive, massive security risk. So I thought, like, what if all that REST API, like the entire WordPress, like, everything, it could run in your browser. So you wouldn't need a cloud instance. Like, no one would have to spin that for you. It will just all be there. Like, it would be very yours. And only you would have access to it. It would be able to modify it. So that happened, right? Like, we just saw it on the presentation. And I demoed a blog post on my blog where you can play with WP HTML tag processor, shifting WordPress 6.2. So the next step for that is actually finding a way to make a ton of code examples, interactive insight, WordPress documentation, like the official one. So maybe that exact tag processor tutorial could be a part of it. And maybe every other place that teaches you how to, oh, how to build a plugin programmatically or how to use this hook or how to display something in WP admin, right? Like instead of videos and screenshots, like things that goes very, goes stale very easily, something changes in the software. Now I need to record a new video. Like that is very hard to maintain. Maybe all these things could be automated. Oh, and I'll share a cool vision part of WordPress Playground with you. So imagine the actual WordPress code base. Like there are comments in there next to functions. So these comments could contain examples. And these examples could then automatically become interactive in WordPress.org dogs. But furthermore, they could be testable. So every time I make a change to WordPress, if I break the documentation, something will flash red. So the documentation could always be up to date and it could always be interactive. And yeah, there's a lot more. Like I could keep talking and talking about that, but that's kind of my dream here. So it was basically your idea originally. So as well as one of the core developers of this, it's your instigation. Yeah, like I spent the last like eight months working on this and it's picking up more traction lately. And I very much welcome all the eager contributors. Like if there's any feature that you're missing, you can help build it. If there's anything that's confusing about it, even filing an issue, like it goes a very long way, all the feedback is super useful. So please, please, please come over, join the Meta Playground Slack channel, WordPress.org Slack, like file any issue in the repo that you see fit. And I'm also very happy to help you just get started with WordPress Playground. So if there's a pull request you would like to make, but you are not sure where to start, ping me somewhere on GitHub on Slack. I would love to help you. So the Slack channel is meta-playground, yes? Yes, yes. I'm just putting that in the chat as well. And I've just posted a link to the project repo. So if anybody wants to contribute in any way, raise issues, you know, if in usage or testing, you find an issue, create an issue there, or if you want to contribute, yeah, create a PR. What kind of contributions are you looking for? What, you know, what, where do you want to take this? So what could people work on to take this further? All kinds of contributions, in particular, if you start building something with WordPress Playground, just unrelated app, like I don't even want to contribute to Playground Core, and you go through the documentation, and at any point you go like, you scratch your head and like, what am I supposed to do here? Like, this is confusing. Please let, please open an issue, or even better, please edit that page and propose like a better writing. It will go a very long way to help others. Or if there's a feature that you're missing, well, if you open an issue and tell everyone about it, that's super helpful. If you want to open a PR to help start building it, that's also awesome. But if you just want to help try existing issues and just figure out like, oh, maybe this can already be built or maybe this is a super high priority and like, this is a very important problem affecting many people because it affects you, that's also fantastic. So everything at all, like WordPress Playground is super open for contributions and, oh, it may seem very scary because, you know, WebAssembly, all this stuff, but just so you know, you don't have to know what, you don't have to know any WebAssembly at all. WebAssembly is a very important part of the project, but it's like 1% maybe of the code base or even less. And most of the time, you don't have to touch it. Like, most of WordPress Playground is JavaScript and some CSS. So the translation Playground that I showed you earlier, that came together in the initial demo. It was built by Alex Kirk, who's also WordPress core contributor. He built that in, I think like about short three hours from first learning that Playground has a public API and you can now use it through a website. So this is quite approachable. It's all I'm saying. Excellent. And the documentation looks really good as well. It looks like you guys have done a really good job on the documentation. Thank you. A long way to go still and I'd love to improve everything that can be improved there. And for that, a lot of feedback will be super useful, but I'm glad to hear it looks good. OK, so it looks like we don't have any questions from the floor. You clearly explain things so well that nobody has any questions. So well done on that. That's a good news. OK, we've posted a whole load of links in the chat. If you want to keep those links or to refer to them later, it's save the chat now. Somewhere there's a little, at the bottom of the chat, there should be a little save button that you can save the chat into a text file and then you can refer to all the links there later on. Let me just remind you before we close up that WordPress is open source. If anyone can contribute, head over to make.wordpress.org to see how you can contribute. Core is one of the ways that you can contribute. And of course, you can contribute to WordPress Playground. Sure, Adam would welcome any contributions there. So I'm just going to share a quick link for getting started with contributing to WordPress Playground as well. Awesome, curious. Fantastic, thanks for that. OK, so we're just a couple of minutes short of the hour. So I think we can wrap it up here. So I'm just going to thank you all for coming. And in particular, I want to thank Adam for his excellent presentation. That was super interesting. Oh, thank you. Thank you for taking the time. And thank you for that. Thank you for having me. Contribution to the WordPress ecosystem. It looks amazing and will be super useful to all kinds of users, developers. Amazing, thank you so much. Thank you so much. Thank you for having me, this was excellent.