I got a full day plan ahead of me I plan on Doing something that most of you would probably love to do I'm gonna knock out three four-wheelers in one day I've been on vacation for the past two weeks. So I've been MIA and if I haven't answered any of your questions Just be patient. I'll get back to you Actually got a pretty good tan on the deal So got my full day plan ahead of me and I'm gonna show you what I got So I built this one two days ago. I took a 425 motor and turned it into 500 Basically because I don't have any 500 motors left. So I got like four 425s laying around I'm just converting them all and this thing runs really good after I got her done so the only thing I have to do is replace the thumb throttle switch because Whoever did this one put a wood screw out in here And the thing goes back and forth. So last night I Built an engine took me about an hour and I'll show you why So while I was on vacation Have my buddy pick up a Bunch of four-wheelers for me So here's my game plan This one came yesterday the guy thought the tranny was blown I'm banking on the shift linkages of spad and The brake lever is missing or broken one of the two So I'm gonna knock that out in an hour and a half And then I'm gonna pull this one in I'm gonna tear the motor out put the new rebuild in and Hopefully by 10 o'clock tonight. I will be done now I Do have a family life, so I won't be in here all 12 hours. It is 10 a.m. Right now I have to take my wife car shopping because Her timing chain jumped for the second time in a year. Yeah, I don't ever buy it to reverse their junk So yeah, sometime in the afternoon. I'll be doing that and Then I'll get back to it. I'm thinking sometime tonight. I'll finish that third one up But I'm gonna try to videotape all of this And so if you guys got any questions along the way, I feel free to drop a line So this is gonna get real tricky because we're talking about a 12 hour period So stay tuned and watch how crazy T-man works today number one finished and it is 1048 I'll pull this bad boy out. You can see how she runs All right, so the first thing you want to do after you're disconnected the low gear Make sure you're a neutral and there's like two little lines right there in there Right now I'm a neutral and the transmissions shifted almost into high so that's telling me that this is Whoever installed these didn't do it correctly they look newer so I'm guessing somebody replaced them at one time And I'm thinking they never hooked these up, right? So yeah, this will be a win-win for me because It's not the transmission. That's bad. It's the shift link. It's just somebody got installed them incorrectly So I already got the nut off of this one Go ahead and pull that out and then I'm gonna take a players and Shift this into neutral and then readjust everything All right, let me show you what I mean so I took the players And I Move this to neutral. I also jacked the tires off the ground So I can hear it's a neutral and look where that's sitting.  So I'm gonna have to Loosen this bring that out. I Am a neutral And I'm gonna adjust that and that should cure my problem. So now I'm gonna bring in number three Stader us in the motorboat bolts and this bad boy is ready to pull. All right, it's about five o'clock Worked on two and a half machines Got this engine in and out in three hours Just got a hook up the flywheel Put some fuel and oil in it and she'll be ready to fire up You reach out one or you need the extension need the extension on that They're foot Okay, so after I install the engine what I like to do last is Torque the head bolts down with has something to hang on to now You're not turning the engine while you're torquing it down. So the torque sequence is I believe a seven seven step Sequence the first step is I have to torque all four bolts down to 22 foot-pounds in a criss-cross pattern The next step Tighten it to 52 Foot-pounds to loosen each bolt a hundred eighty degrees. It would be a half turn So what I like to do is take a marker and mark the top of the heads draw a straight line on there That way I know where the turn is All right, so I stopped at five o'clock. I restarted again at about 11 o'clock.  Let me show you how it runs Number two done. It's the case. I forgot to say Thanks for watching and now please subscribe to the channel You


Okay, thank you, Ken, for that. So, today, I'm really happy to be able to present to the backfrest community. And I'm going to be talking about how we can supercharge WordPress development using Bedrock. So, just to cover the agenda for today's session, I'll just kick off a brief introduction to myself. And then we'll be looking at what exactly is Bedrock. We'll examine some of the benefits, the drawbacks, asking the question should be Bedrock or not to Bedrock. And then we'll be looking at some of the changes that we can expect from a Bedrock install to a standard WordPress installation. And then we'll just go into a walkthrough of an actual live Bedrock project. So, as Ken introduced, my name is Gary MacPherson. I am a software developer by trade. I've had 20 plus years, mostly in web with a little bit of mobile and back in the dark days, a dash of desktop application and development as well, but we don't talk about those years anymore. I've been working with WordPress, for the last seven years or so. And over the course of my career, I've had a range of different roles, I've worked as a developer, team lead architects, CTO and co-founder at different stages. And currently I work as a consulting developer. I'm an instructor. I live in a couple of electric communities, and I'm into a number of junior developers as well. So that's enough about me. Let's move on to the subject of today. So, what exactly is Bedrock? I'm so sorry for the distraction, I just had a giant inset to come in my room, but I'll try and ignore it for now. So, Bedrock is a modern WordPress boilerplate that aims to improve the structure, management and security of WordPress development projects. So, one thing that's important to state is that it's not theme, it's not a plugin. It's more a framework that rearranges and reorganizes WordPress to follow more kind of best practices than the default application does. So, some of the benefits that we can get from utilizing Bedrock and some of the reasons why we're considering using it. It offers us very robust dependency management. It allows us to enhance the security of WordPress. We have improvements in our delivery workflows, and it offers us a cleaner structure. So, for dependency management, in a standard WordPress instance, you would typically handle your dependencies, what we call like plugins and themes, even WordPress core through the admin interface. You know, which will let you know when there are interface, when there are updates available, and then you would apply updates, or you may have a hosting platform that allows you to use automated updates and so you might do that as well. While these are convenient, they are not very robust, they can be quite brittle in a sense that an update can break compatibility and cause some issues, be it performance or functional in the site, and that's not something that we typically want in a production environment. It enhances the security of WordPress in a number of ways. For one, it strengthens the password algorithm, so the passwords are encrypted more strongly in our databases. It also helps with, I guess, security through obscurity in the sense that through some of the changes that are made, typical attacks that may look for the standard WordPress assets will not find them there. And it also allows us to handle configuration in a much more secure way, so rather than having configuration mixed in with our source code, it provides separation between those, which allows us to have greater security in our development workflows as well. When we say improve delivery workflows, what we're talking about is the ability to build a workflow to deliver the work to your client or to your team. So that means you can better support multiple development environments, you might have a local dev environment, pre-production or stage, and then a production environment. And being able to synchronize those environments and track the flow of work between them is much easier in a better based solution. And then the cleaner structure is something we'll look at later on, but better changes the default structural WordPress in a way that makes it easier for developers to understand and work with. So we'll be looking at some of these in a bit more detail as we go. If anyone has questions, feel free to raise the hand or throw them into chat. You don't have to wait till the end for Q&A. So if there's something that I go over that you're curious about, then please just alert me and I'll try and address it as soon as. And while there are a large number of significant benefits to using Bedrock, there are also some drawbacks or considerations that we have to keep in mind as well. So the first of those is strict hosting requirements. So as we know WordPress can be hosted on a very broad range of hosting platforms from shared up to, you know, dedicated through to kind of cloud based environments. So if you're using Bedrock that does tighten the requirements and so there are a number of hosting platforms that you wouldn't be able to run a bedrock based site on. You can have certain tools that may not be compatible because they're not built in a way that accounts for the variations that Bedrock introduces into the WordPress structure. So some of the tooling you work with may not work 100% with a Bedrock based project. There is a higher maintenance complexity and what that means is, while the default maintenance process that WordPress provides is convenient, but it's also potentially fragile. So Bedrock allows us to have a much more robust process, but it does introduce some complexities. So for example, if you're using premium plugins, it can be more effort to keep them up to date, then you might be accustomed to in a standard style. There are various approaches we can take to try and mitigate some of those complexities, but generally there's going to be a bit more overhead with your maintenance then with a default WordPress installation. And then finally, we do have a steeper learning curve to adjust to. There are a number of components are introduced by Bedrock which all developers may be familiar with. And so you may find yourself having to learn a number of different tools at the same time. You certainly will want to be comfortable or willing to learn how to use the command line is there's a lot more command line interaction, then you would be accustomed to in a standard WordPress install. But it does pay off in the long run in terms of how you can manage the products in the long run. But these are some things that are worth considering if you're considering utilizing Bedrock for any of your future projects. So then that brings us to the question of, you know, to Bedrock or not to Bedrock. And so there's maybe four factors that you can consider. There's maybe another one that should include here, but we'll go through them. So the first is hosting. And if the hosting platform you're using isn't compatible, or you don't have control over the selection of platforms or if you're maybe working for a client that's not willing or able to move from their hosting platform and that isn't compatible, then Bedrock isn't for you. If your requirements for the product that you're doing are mostly design or configuration where you're just sort of configuring a site, managing content, we're doing design work, then the overheads that Bedrock introduces are probably not worth it. So you're going to show its value for development projects and by development, I mean projects where there is a significant amount of custom functionality being built in PHP. So if you're writing code to any kind of extent, and not just, you know, maybe like a couple of functions in your theme functions file, but you're actually building functionality, then you should definitely be considering Bedrock. And in terms of the technical implementation, that's really just talking around the duration perhaps of that implementation. So if it's a fixed duration, if you are maybe building a project to deliver to a customer and then you're handing it over. And after that there won't be any ongoing sort of technical delivery. Then Bedrock again is probably not the best solution to go with. The value again comes from ongoing technical projects where there is functionality being delivered on a constant basis, your managing code and functionality, you know, in the indefinite long term basis. So if it's like a one-off project where you're building something to hand over or you're building it to then just maintain it, then again Bedrock may not be the most appropriate solution to go with. The fourth point then is deployment. So if you or your team are typically deploying WordPress using manual processes, if you're like pushing files via FTP doing maybe like plugging backups and stuff like that. Again, this may not be the ideal solution unless you're willing to move to a more modern automated deployment process. So if you do use automated processes or you're aiming to, then Bedrock is very well suited for that type of work. And then the fifth point that I could have added I think I mentioned before was simply around the, I guess, technical awareness of yourself or the team. If you're familiar with, you know, I would say command line, you know, manipulation, then this is a good sign because you'll be doing a lot more work through the command line than you may be accustomed to as opposed to going through the admin interface that this provides. So if you can effectively answer all of these questions with the answers in the green column, then you should really think about using Bedrock. It's probably going to be a good match for that project and it's worth giving a try to see if you can get the most benefit out of it. So let's move on to some of the changes that you might expect to see. So we have two examples of the structure of a standard WordPress site and a project that's built on Bedrock. So as you can see, there are some fairly significant differences in how they're arranged. So in WordPress, we tend to have a kind of flat structure with all of our core WordPress files kind of listed in our root directory. In Bedrock, it rearranges this to try and make things more logical and to introduce degrees of separation. So the first file that you'll see that you probably wouldn't expect to see in a standard WordPress instance is Composer.json. So this is the file that's used by Composer, which is the dependency manager to determine which dependencies and which versions of those dependencies are included in a project. So let's look at that in the walkthrough. Then we have our config folder and this holds the code that handles all the configuration of the application. So one of the differences that, again, I probably could have listed is that our configuration is actually handled very differently. In a standard WordPress instance, our configuration is managed through the WP config file. And one of the disadvantages of this approach is that if you want to move to using version control, for example, you would then be risking putting sensitive configuration data like database connection strings or API keys in source control, which is something we always want to avoid. So with Bedrock, it gives us the opportunity to separate our configuration. We also get to implement environment specific configuration so we can change configuration for our development staging production environments. And the actual configuration values are taken out the code base entirely. We can use .en files or if your hosting platform supports it, you can define environment values directly in the platform. And it means that your code and configuration don't mix as they do in a standard WordPress site. We then have the vendor folder, which is where all the composite dependencies are held. And then finally we have a web folder, which is the public root of our website. And that is then furlough split in two. So we have the app folder. And this is really where we have all of our custom code. So plugins, themes, the uploads, which is the renamed WP uploads folder. And then we finally have the WP folder, which is where all of the WordPress core files state. And effectively, we don't touch these files. So it's always been best practice not to modify WordPress core files. But in this arrangement, it kind of separates the files that we can work with being in the app folder and files that we shouldn't touch, which are located in the WP folder. So that's overview of the main structural changes. Then one of the next major changes is with how we handle updates. So as I mentioned, we use dependency management in Bedrock. And for that we use a tool called Composer, which is a PHP dependency manager. So in a standard instance, we'd go in the back end and it would alert us when there are updates available for WordPress or the themes or plugins that we're using. When we're working with Bedrock, we handle this process on the command line that can be automated, it can be integrated into your continuous deployment process. But it happens via the command line, so it looks very different to what you would be accustomed to seeing in WordPress by default. The next thing that changes that you would want to be aware of is how our URLs are managed. So by default in WordPress, there are two, I guess root URLs you could think of them as we have the home URL and the site URL. In a default WordPress instance, these point to the same URL, which is typically the root of our website. So if I have got a website at mysite.com, the home URL and the site URL both point to the same place. However, because of the separation that Bedrock introduces, we now have two different values. And this is where sometimes we have these incompatibility of our tools, or even with certain code that hasn't been written, I guess, to WordPress standards. So our home URL is no longer the same as the site URL. The site URL points to where is the site available, and the home URL points to where are the WordPress core files available. So because of the organization changes that we looked at earlier, the home URL now becomes site URL slash WP. So if I had mysite.com, my home URL will now be mysite.com slash WP. So Ken asked, would that be any command line or the WP command line. So when you're working with Bedrock, you'd be working with the general command line. The WP CLI operates within your terminal environment, whatever that is, be it bash, SSH, PowerShell, etc. So when you're working in the back end, you don't need the WP CLI to do like updates. You can run those commands because those are composer commands, and that's kind of separate to the CLI. So you would use the WP CLI if you were wanting to manipulate or, you know, administer the instance via the command line. But for kind of updates and updating the core managing versions, you can just do that through the regular terminal, you don't need the WP CLI for that. So those are the introductory fundamentals of Bedrock, and I didn't really want to spend my whole time just doing slides and presenting. So I'm going to do like an actual walkthrough. I don't know if anyone has any questions now before we jump into that, but if you do feel free to ask, you can just unmute or just put questions in the chat. Otherwise we can start having a look at the actual code base. I don't see any questions, so switch this. Okay, so this is an actual project. In fact, this is a project that I maintain. Built on WordPress and using Bedrock. I will just walk through some of the key elements of the project. So the one thing that I didn't show in the slides was the config and so I'll just give a kind of brief overview of how that works in practice. So typically we would have our WP config file and we'd have, you know, our database connection string, our source, etc. They would all be held in that file. As I say, Bedrock aims to separate those out from my actual code base. So what we have here is a file that will define all of those constants that we would typically see in WP config. And so here is an example of us declaring the defining the WP home constant, which you would be familiar with any kind of PHP or WordPress code base. So what we're doing is we are setting the value of the WP home constant to be whatever the value of our WP home environment variable is. So EMV is just loading a variable from our environment. And so the reason this is so important is that it means that we're not defining this value directly in code. So in this particular environment, where that comes from is this file called the dot EMV file. And you may be able to tell hopefully, you know what I mean. It takes a little bit of, you may be able to tell that the dot EMV file is grayed out in comparison to the ones around it. Because this is a version controlled code base that exists in Git, and we exclude the dot EMV file from source control so it never gets pushed away from my computer up to GitHub. And that's because this is where all of the details of our connections and databases exist. And so that's why we don't have that live. Let me not actually share that one. I'm going to bring across one. Yeah, I do that. It doesn't let me cause that is in a virtual machine so I'll just open it manually. It is in this example file. Okay, so this is what the dot EMV file looks like is this an example one. What we have is we're defining the database name user password. We would provide the path to our actual database. And then we have a number of other variables as well so here you can see that WP home value that we loaded into our configuration. So in this case we're basically pulling a previous environment variable. So here is the main name, and we're just converting that into a URL. And this URL gets converted into the constant in our code base as does our site URL. And so you can see the difference here. So we're taking the home URL and then we're simply append ashes is this is the wrong way around but yeah we are pending the WP point to a great location. So all of our values would be defined in this file and in production will have a separate file will be using the platform to define those environment variables. So this is a much more secure way of defining our configuration. And as I just quickly mentioned we do have the ability to specify specific variables for different environments. So for my development environment, I can override the debugging setting so that enables debugging. We have logging enabled if our environment variable is not set to false and the same for displaying. So we can have different configuration depending on the environment that we are working with. So that's how we handle our configuration. And then you might notice there's a bunch of these various kind of dot files we call them. So these are just configuration files for the various tools that are being used in this project. These are all specific to bedrock, but using bedrock enables you to define a kind of more robust and resilient kind of development workflow, and these are some of the tools that you may use alongside that. For example, this is a configuration file for tool called ESLint. So that does linting for our JavaScript. So any JavaScript content that we have, we can effectively key that JavaScript to match certain coding standards. And we can check when code is being committed that all the code being submitted is matching that standard. We have a version configuration. So this particular project is deployed to its production and staging environments using GitHub. So we can control when a deployment is triggered by effectively defining what versions should go where. So we have branches and I don't know if anyone here is familiar with Git, but it allows us to have multiple branches. And so by pushing to one branch, we automatically deploy to the staging environment. And then by pushing to our production branch, we can automatically deploy to our production environment. And when we deploy to production, we can update the version of the code. So we know if we have any kind of bugs or any support issues that arise, we know exactly the state of the code base for the complaint we issue that is being investigated. These are just a number of backups that have been generated. I'll have to clear up at some point, but using the command line, you can import and export database backups very easily. And so these are just various backups I've made a long way. If I need to, you know, handle migration or I'm migrating a site from one environment to the other, then you can create your own database backups very easily. And one thing that I will show is in our GitHub folder. So we are using GitHub to manage. And so I'll just give you a quick view of what that looks like in GitHub itself. So here's the repository for this particular project. So this code is pushed to this project. And we can see that in our tags, this marks all of the releases that have been deployed to our production environment. And so you can see the versionings. This is all done automatically through GitHub actions. And if I go to the actions, you can see the history of all the actions have been fun. So these are just recent dependency updates where we've had a plug in kind of automatically updated. So while we don't allow automatic updates to go through to production, we do allow specific updates to go to staging. And if there is a security patch that can be automatically merged and deployed to staging. But if there is a major version that wouldn't be automatically merged somebody would have to check it review it and then merge it to go up. So we're able to kind of control how our dependencies are managed to make sure that we're not causing any disruption to the website itself. And also have the ability to deploy a any version of the site. So if in the eventuality that we actually did have a bad deployment that went through to production, we can actually use GitHub actions to allow us to roll back to a specific version of the site. And that means that we can very quickly undo any problematic deployments. So if I was to push and then something's gone wrong, you know, as the bulk of the site has crashed. I come to GitHub and say, right, I'm going to go back to the last one good deployment. And that will roll back to the previous version, really very, very quickly. How are we doing the time I feel like I may have. Oh yeah, we're good with time. If anybody had any questions definitely feel free to share them. But yeah, we're good with time. We have about I think maybe 1015 more minutes or we're good. Okay. I don't know if anyone wants to see or ask about any questions or if one question. And I'm looking at this because you know is really robust and there's a lot of file structuring here. And I know you had mentioned kind of those prerequisites when it comes to what are some of the things that people might want to consider when they talk about possibly building a bedrock development project. Like any examples that you have that would show why someone would want to use bedrock over a standard WordPress build. Yeah, so for me the time and bedrock sort of comes into it so as I say if you are, you know, I don't use bedrock for every project because it doesn't make sense for every project so when it's, you know, maybe like customized as I mentioned customizations or design or work, you know, content, but we're not doing any ongoing or significant technical kind of functionality. Then, you know, there is this overhead of setting this up and you know making sure you have the processes to support it.  So this is the type of process that you really should be thinking about introducing even if you don't use bedrock. So I'll give an example of a project I was introduced to a few years ago, the client had engaged two different developer teams so I think they'd engaged one. They didn't have capacity to do what they needed and then they engaged the second one. So when I came on board, the project was a shambles that you know there was no communication, there was a lot of non technical problems as well as technical problems. On the technical side, both teams were pushing up their work manually by FTP, and they were literally treading on each other's toes they were, you know, one developer would put up their work and it's literally conflicting or breaking with something that the other developers pushed there was no synchronization at all. So when I came on board like the first thing I did was like, you know, this process is completely broken. We're not doing this because this is just wild. And so I shifted the poll project to a structure like this, a bedrock based structure, and effectively mandated that everybody was going to have to be pushing up their work, forget and not using direct uploads as they were before. So that meant they had to issue PRs, code could be reviewed, there were issues for the work that was being done so we knew why work was going up and you could check it. And there was no way that someone could just push work up and break something because no one else was aware of it. So in those kind of situations this type of setup is just invaluable because otherwise you're just giving yourself a world of hurt trying to manage multiple changes from multiple contributors. Whereas having a git based workflow, even if it's not used bedrock allows you to have much more control over how that work is managed. But because if you are using git bait, I mean if you already have a technical team, if you have a git based workflow, then bedrock just fits into that very, very easily. So for example with this particular project, if as I may well be doing in the next couple of months, if I need to migrate it, this process will be a much simpler job than if I was kind of developing this in a traditional way. One of the things that is different and not bedrock specific is that this project uses S3 for all of the assets. So what would normally be in the WP uploads folder, all of that is hosted on S3. And what that means is that because this project is effectively built in the environment, there's very little in the code base compared to a normal installation. You have hundreds of megabytes or even gigabytes of content, you know, photos, videos, whatever. And in a traditional migration, if I want to change hosting provider, I would have to transfer somehow all the files, plugins and assets from one provider to another. With this type of setup, it's very minimal like it's literally I don't even have say if I was to show you in our web folder, you would notice, we don't even have the WP folder. So in my local instance, in the web folder, we have app conf and WP. So this is where the core files are. But again, you can see this is a great out folder because this is a folder that is effectively built by Composer. So everything in this folder is not in source control. It's not in GitHub, which is why it doesn't exist here. So the code base is actually very, very minimal. And in order to set up a new environment or to even transfer to a whole new hosting platform, I don't even need to do any manual transfer. I would update the actions here to point to a new host. So I would point it to my new hosting environment. I would set up the environment variables in the environment, and I would deploy it via Git. And that's it. And then it would literally rebuild the site, reconnect to S3. Everything else would get set up in the new environment. And that's not something you can do without a kind of framework like this. So I guess the answer is this is better suited for, I guess, heavier projects where there's this kind of, you know, level of technical involvement. And that's where the value kind of comes in. If it's a lightweight kind of, you know, we're going to make a few changes here and there, then kind of implementing these kind of structural changes probably don't have the payoff that would justify the effort. And it definitely sounds as if when you're looking at something, I mean, and like you said, it doesn't have to be bedrock, but if there's something along the lines of potentially being a heavily demanding website that requires a whole bunch of complexities and a whole bunch of various, I want to say, technical departments, but different developers who do different things than it probably would be highly recommended to do something like GitHub contributions as well as using something like bedrock that can help to mitigate what goes up before it reaches production. Yeah, so I mean I this is my own kind of I guess side project and so even before I had other people collaborating. I managed my own projects like this because just because of the technical for me that's the primary thing is like, if it's a primarily technical project, then I don't, I don't work with code that's not source control I would never work with code base I don't even work with developers that don't like I can't do that like for me if you're building a technical project you your coach be version control full stop. And so if I'm working on that type of project where there is ongoing technical delivery, then I will use this kind of setup, even if I'm the only developer. It makes even more sense is the value to multiply it when you have a team, but even as a solo developer the benefits of having version control. It's a automated deployment. Once you have gone through the pain of setting everything up. And you know right now I'm working on the next project and each one becomes easier because I'm just reusing elements I've implemented in previous ones, but once you have the setup. After that, you know it's just constant pay off. So you have to go through that kind of climb that wall of getting running the way that you want, but once everything is configured. It's just pure productivity benefits all the way after that indefinitely as long as you're maintaining that project. Anybody else have any questions I don't want to prolong any time and I don't want anybody to fill that out. Is there anything else that you want to share. So, I guess I would just talk about so I don't know where from his but those that may be watching later on so, for example, another of the benefits around team based development. You know, I've always been a bit of a stickler when it comes to like coding standards. I love, you know, well format clean code and so I will make the effort in my own code to do that even though I'm not working with anyone else. And so you have the opportunity to do that as well. So for example, here we have this file called the editor config. So what this file does, it allows anybody who works on this project to have their editor set up in the same way. So, I don't know if you're kind of developing you've worked in a team before you know that over the years you may have had conflicts where, you know, one developer has their editor set up to use tabs, another one has their itself to use spaces and so, you know, one person checks out the work pushes it up and then you've got a whole bunch of changes that are nothing but workspace because they're going to have their editor set up differently. So you can introduce things like this where everybody who checks out this work will have the editor configured in the same way. So there's no more debates or arguments about how should we use tabs should we use spaces that is just takes care of it and you just, you just write your code to write about how it's going to be formatted or whatever else it will take care of for you. So when you're dealing with kind of I guess larger or more involved code bases, making sure that the quality of code is as high as possible, and this setup fits in very well with that source of requirement. So that as well. So anything else. Oh, I did say so with the composer so I didn't mention how we manage dependencies so this is the configuration file composer, which controls how we manage the dependencies that are part of this project. Over most of the stuff. And now these are defining where we're getting all of our code from, but the most interesting part is here. So this is the require section, and this defines all of the dependencies that make up this particular project. And so we have development kind of components in here. We have the. So this is WordPress core. So we're actually loading this. This is why the WP folder doesn't exist in the source because we're actually loading WordPress itself as a dependency of the project. So rather than having WordPress code directly loaded into our source control, we're simply loading in the files as an external dependency. So right now we can see that this particular projects is set to use with a six dot six dot X, and currently it's got with a six one one. And so it allows us to define. So this one needs to get updated soon as well. I think we're behind now we should be on six point two at this point. So this project will need to be defined, updated soon. And so here we have a number of other kind of plugins that have been loaded. So, and we can see the versions that are being installed for these. So here's where we're defining the various plugins that are being used in this particular site. And if at any point we need to change. So for example, if I really wanted to, I could revert this back to version 5.5 by changing that value and then I would run composer update, and it would roll WordPress back to 5.5. So if you don't want to do that could be, you know, I might be debugging an issue. I mean, I don't know why I go back that far but I might need to go back to 6.0 for a previous version, and if you need to do that, you can. So you can control the version or let's say for example, we might have a plugin that's been updated to the latest version. So if the version includes a breaking change, then we can change the version to fix it to a safe version so let's say 4.2.8 kind of broke the site. We're like, we don't want to have that so we need to keep it at 4.2.7. So now I can force it to remain at that version until we know that there's a safe version that's been released and we can update to that. So we manage the dependencies that we're including and the versions of those dependencies.  So this is how we now handle a lot of the technical side of things so we have these scripts that we can manage how the project behaves. We have these details but this is when we are whenever you run an update so whenever we update the dependencies, we can define specific logic that has to take place. So in this case whenever we do an update, I make sure that we've got a custom site specific plugin, and we make sure that that is updated. We also have a script that handles some issues with the hosting platform and so we take care of that as well. So we have a lot of control over the logic of how deployments are actually initialized and managed. It all looks quite alien when you see it was the first time but again this is part of the control that it gives you over the project. That's mostly it. Oh, we do have the ability to generate change logs. So when we are handling our updates, we can actually view the changes over time so these are also generated automatically. So we follow a specific convention for how our changes are committed and those messages are converted whenever we release the production. Those messages are now committed and generated into this change of so we can literally go back to the history. We can see what was done at any one point so this particular release had a new feature and we can actually link to that PR order commit on GitHub. And so we can see the code that was changed for that particular feature. And then we can look at bugs that were fixed so we had a couple of bugs that were fixed here. It also labels any PRs or issues that were closed by that bug being fixed. So it gives us this nice history of all the changes that have been made. This is something that's nice for this project but if you are building, you know, a plugin or theme for public consumption, this is like so useful because it spares you having to manually generate this change log it can be done automatically. And this is an example of where that initial effort and setting up just pays off constantly down the road. So yeah, that's how the change log gets generated. Yeah, I guess I will leave it there. Hey look here I would absolutely tell you hey this is really really impressive stuff man and I tell you I'm gonna have to find a little time to look into bear I can just you know tinker with a little bit and probably share this video and reach out to you personally just to kind of give more insight on how to get this done because this is great. And I definitely want to thank you for sharing this information. Before we close up shop for today. If you don't mind share where people could find you how to access you and how they can learn more about you and how to you better. Yeah, so I guess probably the best. Yeah, I'll probably drop some links in the slack later. But the best place to find me is probably LinkedIn. So, let's go to mine. So you can find me as Gary MacPherson LinkedIn. Not too difficult to find I don't think so finding me on there is probably the easiest thing. I will definitely share links for the different components that we've discussed so bedrock itself. Composer local. I didn't even show my local development tool but yes I'll share those links in the slack as well. And I can probably provide like a PDF off the slides if anyone wants those later as well. Yeah, if you want to connect with me feel free to find me a LinkedIn. If you're a developer type feel free to put me up on GitHub. I'll share that as well. So that is, I'm just Jean. So you can find me on GitHub. I came at first and my username is genius with a YG and why us. So LinkedIn or get up feel free to let me up and happy to connect. And again, thank you so much Gary. Again, Gary MacPherson appreciates you so much for sharing this training on using bedrock or to supercharge your WordPress development. Again, hopefully here in the near future we'll have some more webinars trainings for within the WordPress black press community so definitely be on the lookout for more of those. But at this time I guess I'll go ahead and stop the recording and thank you so much again Gary for sharing your information your knowledge. No problem. Yeah, glad to help. And if anyone wants to follow up feel free in the black press slack so reach out to me on any other channel. Happy to connect. All right, thank you again. All right, thank you for your time.


Hi, in this lesson, we're going to talk about Enum in TypeScript. An Enum is a way of giving more friendly names to your values. Let's declare an Enum. First, what we need to do is to type keyword Enum and after it, we need to type name for our Enum. We want to give a friendly name to our Enum because that Enum will keep inside it some values and picking a good name to represent these values are very important. For now, I'll choose name color and that name will represent my values, which we're going to declare inside curly brackets. I'll put a few values in a list. Let's say, for example, yellow color, orange, green, blue, and so on. You need to separate these values by commas and of course, if you check compiled code from TypeScript to JavaScript, you can see that we will get very interesting results in JavaScript when we want to convert our Enum to JavaScript code. For Enum, we could also say that Enum makes kind of like a new type of data so you can define a variable which we will have as a type of our Enum. For example, we could define an variable, let's call it color, which now can have, we can say a new kind of type and that type is going to be color. Now for our variable color, we want to give an value, so we're going to say that color equals to, then we're going to call our Enum and pick a value from it. For example, let's pick blue color. So Enums are things in TypeScript which can give to us more friendly names to describe and keep our values, then we could treat this Enum as kind of new type in TypeScript like we have a new type of variables, that new type here is color, so we can define variables to have that type and we can give to our variables values from our Enum by picking one of these options inside it. That's all for now, see you in the next lesson. Bye bye.


You want to talk about money with me? Let me tell you something. Let me tell you something about passive income Let me tell you something about generating wealth.  I'm the money. Yeah, you want to talk about passive income? I'm gonna pass up.  We got over the hump I'm out the slums bad back in episode one I had 40 bands to my name that turned into 80 bands that turned into 160 bands then 320 bands all of a sudden I'm the money man.  I can't speak broke I don't know what you're saying.  What is well be a manga? Put on some hentai cuz I don't know what the hell's going on And we're about halfway through the football season, yeah So hopefully you've got a pretty good idea of how teams are gonna stack up So why not add a little bit of fun into the mix today's video sponsor draft king sportsbook and official sports betting partner of the NFL It's dishing out an amazing offer to all new customers All you need to do is sign up using promo code MMG bet $5 on any football team to win and receive an Additional $200 in free bets if your team wins. That's it Literally any new customer who bets at least $5 on any team to win will get an additional $200 in free bets if your bet hits and if you don't have sports betting There's always draft kings daily fantasy another awesome way to win some cash this football season and if football isn't your thing Basketballs right around the corner draft kings has tons of ways for you to get in on the action over there So don't forget download the draft king sportsbook app now new customers use the promo code MMG and receive $200 in free bets if your bet hits when placing a $5 pregame football wager That's promo code MMG only at draft king sportsbook and enjoy the rest of video We're officially at the point where this coin count is gonna compound so fast that every single episode just blows your cock out of your socks Next episode will be 1.3 million technically it should be 1.28 But I know most of you guys are so dumb stupid idiots. You could never understand that kind of math that complex multiplication 648 times 2 oh those are perfect numbers 40,000 coins to build the best possible squad so that's exactly what we're gonna do baby if we take our 640k We divide that by roughly 20 players we need for the squad It's about 32,000 coins a player which by the way could get us a great player at so many different positions And for today's episode I'm actually gonna go in reverse order of what we've been doing in these other episodes I was spending big on these positions I really cared about and then kind of just hoping I could scrape by I'm gonna try something different here We call this living below your means okay for all you poor people out there Kyle Dugger the 82 overall 13,000 coin our budget could give us a way better player than this But I remember something about Kyle Dugger at 85 speed 85 excel. He was an incredible user So I'm taking Kyle Dugger right out the gates as my user strong safety I want you to take a look at another really good option strong safety as a user and that's Grant delpit So Grant delpit 87 overall. He's 85,000 coins So for 85,000 coins you get two inches of height to speed three excel. Is that worth 85,000 coins? My thought is no I think instead I can build a monster everything else and just dominate my opponent even with the budget Beast so I'm gonna continue to pick up some of the best budget beasts in this game And then we'll go from there next up is Caleb Farley literally the best 22,000 coin card You're ever gonna find you've seen previous episodes of double or nothing You'll know this card, but if you don't this is an 87 speed 86 excel 6 2 corner beast I'm so sorry you got to see the same players a few times over and over but Eric Stokes 86 85 6 1 and guess what? Nobody has come into a game against me and just lost me. It's I've never gotten done with the game and thought shit I need a better corners now that being said there is one Expensive corner who is one of my favorite cards in the game.  He's only 511, but I don't know what it is about this card He just plays so monstrous Just like real life.  I think against the Rams this year He's got a really good card 84 87 excel 87 hip power and he's six foot He's only 27 K Which is still under our budget per player an awesome cheeky tackle is 83 overall mean Joe green 14700 easy did I literally know nothing about Carlos Bush on I don't know anything about this guy But let me tell you about this car bro 84 speed 80 block shit the 80 block shit is so surprising to me That's really high for a speed rusher said the biggest left end But I think he's gonna be an amazing contain man If we play somebody who just sits in the pocket doesn't move at all this might not be the best buy But if we face a Michael Vick a large accent Kyler Murray, he's gonna be awesome and at right end I want 84 Kaleas Campbell. He's just huge dude. I think because he's so big six eight through fifteen I think he plays better. I don't know if that's true, but I've used this card before and he's he just out performs 84 Overall so well, I think an outside linebacker everyone should use if you can afford it Which I mean come on stopping broke divine Diablo 49,000 coins He comes with outside stuff or inside stuff. I actually don't remember which one that is He's got 86 speed 85 exactly six with three so good This card came out like when the game dropped a super nice card. Thanks to the legends promo. It's not the 81 Thomas Davis He is good, but this one the 85 overall Thomas Davis 84 speed 83 excel 6 1 Super well-rounded linebacker and honestly, this is an amazing point to save coins this Kyren Johnson is actually such a nasty linebacker Tackle is okay as blockchains and not much so if you'd send him off the edge He's probably not a monster, but and you could use a rim. He'll still make tackles. He's got good speeds I'm gonna get out ran. I'm still using this card middle linebacker. I'm getting Isaiah Simmons He is such a beast literally no matter what price you're looking at 11,200 sure and for my other middle linebacker.  So we've taken a totally different route with this episode I've filled out the defense and I still have 380 K to use. I'm just the offense.  Let's take a look at what the lineup looks like right now though We're all gonna have to sell out Ted Hendricks because it's gonna do this every single time We're already a 75 overall. This defense is sick. Do got to make some adjustments though Denzel Ward, Eric Stokes, Caleb Farley feel great about that then my d-line mean Joe Green, Calais Campbell, Carlos Bichon Probably should get a backup detackle I'll consider that. Then Divine Diablo, Isaiah Simmons, Folio Santa Luca, and you should be Kyren Johnson And of course if you need coins make sure to go to instantmaddencoins.com They sell coins on every single platform You can also directly buy players or training points buying limited and then quick-selling them is probably the safest route So I recommend that. This is a significantly better deal than what EA is gonna offer you and you can get 10% off when using the code MMG that's instantmaddencoins.com just use the link in the description 400k to spend on offense and maybe a backup detack. Let's get cooking first thing I want is a quarterback and I know exactly 87 overall Ryan Fitz magic. Now.  He's got 80 speed. Okay, so he's crazy fast. His accuracies are excellent This is gonna be a superstar quarterback on hopefully get some good abilities to I know he gets quick draw But it's not really what I want now There's a lot of half backs that are good at this price like a lot But I want this DeMarco Murray because this DeMarco Murray is the only half back at this price That's gonna get this ability you see right there. That is goal line back It gives you greatly improved run blocking in the red zone. I'm really excited to use it And this DeMarco Murray by the way, he's an elusive back except he's 6-1 to 20. He's huge His truck is 83 his break tackles 86. This should be a monster card You can bet your ass I'm bringing a coye back to this team He is going to be the best fullback at this price until we have like until next episode when I have 1.3 million I get a better a coye now I know there's still a lot to worry about but I am not going cheap on O-line.  We're going 84 is minimal Gary Zimmerman Alan finica Thanks to the campus heroes promo for keeping stuff cheap David Andrews Chris Lindstrom 33,000 I'll take it and finally Lane Johnson that gives us a full 84 plus overall offensive line We have 80,000 coins left. I've not touched tight end wide receiver or backup detackle I really do not care about backup detackle the Kwan Jones beautiful baby my man beating wide receiver He's gonna be none other than oh my god. He doesn't have on the auction house. Damn it There's an 84 overall Scotty Miller who has 86 speed. Why does that happen so much? Is there a Valda scantling? He does exist. All right, so Valda scantling does basically the exact same thing 86 speed 6 foot 4 really fast big-ass wide receiver So he's gonna be being coverage for us and I tight end up taking this OJ Howard 6 foot 6 to 50 85 speed beast That leaves me just a little bit of coins. I'm gonna pick up two more wide receivers. Honestly Chase Claypool's big body He's got a gold that should be cheap 3700 awesome that works for me. Do we have enough for Anthony Schwartz, baby?  Oh my god. I'm the money man. I got 600 left over. I'm so ready to let's go Hey, this Cadarius Tony. I think I use this maybe in the first episode really good though 84 speed 84 excel 83 agility. That's a really really solid budget wide receiver. All right boys Let's throw in our best lineup see what overall we got 82 overall squad Interestingly, we did not go up that much from the 320k episode, but I can confidently say the team is so much better It's really because I spent all my big money on our star players Maybe we spent 80k on DeMarco Murray 80k on Fitz magic big coins on our offensive line, too I think with this team we can realistically do everything. I can run the ball. I can pass the ball I can play excellent defense. My d-line is great. We can stuff the run. We can stop the pass I love this team.  I love this team Dude, this team is actually kind of stacked. We're filing it in the boy. My team's kind of stacked. All right One thing I can't forget this time around is to actually give some x-factor system players So let's see what Fitz magic can get so he's got quick draw over here nice He could get identifier actually would like and there's no point in wanting one of those so I won't but I will go running gun He's got 80 speed He actually could be a really good running gun quarterback if I can activate it DeMarco Murray So baked into the car disability I was telling you about goal line back stronger run blocking within five yards of the end zone I think I said red zone, but it's within five yards of the end zone either way. It's very good ability That shit's awesome. I can also give him jukebox I feel like that's gonna be pretty good and I'm actually gonna give him Homer and hope so we get the home stadium and then Freight train if you can activate freight train you can do anything you're gonna win the ballgame other abilities I'll go O.J. Howard. I'm actually just gonna give him vanguard just as an x-factor in case we can activate it One thing about Lindstrom is he can get post up dominant when engaged in double team blocks It's an amazing ability and I believe being an 85 overall is the cutoff for that I don't think finica even gets the option. He does it.  That's all we need for him. All right gentlemen with an 83 offense an 82 defense and an 82 overall We're ready for the ballgame. It's magic the Marco Murray divine Diablo. What do you got baby? What do you got? What do you got? What do you got sauce gardener key Sean Johnson Randy Moss? I was gonna be a jet steam team. I was like no way. It's just those don't exist now honestly I believe we could do anything effectively here. Let's just go see what we want to do Let's check down first play just get a reception under our belt beautiful. You know what I'm gonna do I'm not my most perfect game. I'm just gonna I'm gonna make no mistakes. I'm gonna make perfect reads That's what today is gonna be perfect read. Let's go Kaderis Tony over the middle. Oh, I can see his user That's so nice. This guy Ogletrees getting so many reps. I gotta start buying backup tight ends, bro This dude Ogletrees always in all right hat back to Marco Murray nice catch. It's fourth and three I'm handing this ball off.  It's the perfect game.  It's still a perfect game still a perfect game nobody saw that he started with ball Oh You know he's passing we're in three four. We got divine Diablo. We got Isaiah Simmons. We got so many studs It's still the perfect game, baby.  No, you did not just do that to me on my perfect game Dude, I was in perfect position That's why you have to use safeties ladies and gentlemen because linebackers are incompetent. All right, Kyle Dugger Come on, baby. Nice tackle. Kyle Dugger is a menace to society Come on That's why we put Dugger in for my perfect game. Oh Kyle Dugger Kyle Dugger.  I oversold that like crazy Let's go, baby. Nice ball. Perfect game. They love to stop the perfect game. Unfortunately They can't stop the perfect game. Cadarius.  That's p.i. sir Oh, I own that.   It's fourth and goal. I'm running it. I'm running it. We got goal line back I'm running this football fourth and goal. Let's go to Marco Too easy. That's why you need goal line back right there. Wow, what a play I don't know if goal line back activates on a two-point conversion. I assume it does So I'm gonna try again. Nice play.    You're scared Keep hitting them boys. He's got a fumble.   Yes, sir I can't believe I just got away with running man coverage.  I think I had it with Kyle Dugger Shouldn't have done that. All right. Looking for tomorrow.  Oh, that's a bad pass Bad pass Howard get up You know, actually I'm going to punt. This is actually a very good scenario to punt So I'm gonna do it. I never punt got it.  You're literally uh, wait. No way Self fumble touchdown self fumble touchdown. Uh, oh my god.  I said I'm gonna spend nothing on my strong safety user because he's that good Look unless you got 10 bill in the bank get Kyle Dugger at your user.  I think Howard is wide open I'm not gonna predetermine because I think Claypool is gonna take the user Claypool. He doesn't go on Claypool. Damn We could have a massive leader. Oh my god. He just activated vanguard. Wait.  He activated vanguard.  Tough. All right. Keep this simple. Let's run man Let's run underneath.  Wait, we can stop him. We can stop him under your swerve. Shit's working on me Nice ball. He's going with the handoff Damn is the Marco Maria of his own. You know what really good play good scheme and he's going for two himself Oh, I love this.    Good block house it.  Take your one No, it's a 10 point game. You don't got nobody.  Where'd you come from? Shit, I lost this ability too. Did I lose it after halftime? I must have lost it after halftime That's a bummer, but Howard is in I got to get up to zoned in great play. Come on. Let's go to Marco Oh my god, look at how close we are to that. Look at that momentum bar. We're tickling it over commit. Oh j Got him dude his user over commits every time. Let's go wait. So I think I'm reactivated now. We're reactivated Good ball He was just about to unload to a wide open tight end But I sent a corner blitz and that's who got there. It was denzel ward dude denzel ward I'm telling you bro. He's a monster. Shit. Shit went to the wrong one.   Come on. Come on. Come on goal line sand russ got foreign receptions looking like a true stat line Oh, this is a run. Shit. It's not Oh run that bad, dude Oh, look at how close I was wait a minute if he gets this it's an eight point game It's got to be a pass right no way he runs a football no way he runs a football. Absolutely nothing completely boxed like a fish Denzel ward with another one. Let's go keep it a 10 point game Okay, good blocks It was so gasped. Why was he so tired bro?   Well, we got vanguard over here great blocks great blocks All right, that could have been better that could have been better. I should be able to run the ball like so effectively He's not bottling that though. He is bottling that though. Shit my perfect game Second and 12 throwing a heater at this man. He's got nothing to throw even if you got that off You're probably picked. Come on buddy. Come on buddy.  Oh, I have jukebox. I have jukebox. I always forget that I have jukebox, bro I was wondering why that juke animation was so nasty. Hmm. All right. All right, third and five Damn, I really can't get it going on the ground at least not effectively to tony to tap tony Damn is rainy moss as his x-factor nice play. You wouldn't make that play otherwise Shit, come on. I know what you want.  I own you. I own you.  I just got dunked on literally good lord Don't let this be a close game 22 to 19. Oh, you're gonna leave inside zone I love that. I haven't left this all game Let's go first on Can't touch the half bag, baby. You can't touch him. Love that demarco Murray. I got you with this last time What if I got you with it again? Come on, right at me. Let's go demarco Not a good average, but he has come up big every time we need him Where's that spicy man coverage? That's not even man. Nice work second and three We're putting another touchdown in beautiful route Howard. We love that I could end the game here. You know, I could just kneel it out, but I'm on a I'm on a mission I'm on a mission. I'm on a mission I'm on a mission Howard, why did you not I just did a rat catch any fellow. Why did you do that?  Don't hit a fortnight dance, bro You just had a touchdown. You sold it said Cut it up. They make it too easy with going line back. Look at those blocks, man Hopefully our opponent plays this out so we can see the stats at the end of this one Wow, that was game was a little too spooky for comfort But a dub may be a dub no matter what right 28 to 19 we kind of squeak that one out. We played uh played a little sketchy, but I had a great time That's all that matters. The money man's here. All right player stats fits magic 14 for 23 and two interceptions somehow Russ with five interceptions has a 102.2 qbr Like I know he threw for more yards, but demarco got it done But he was so dog water in fact really my opponent's defense was just really good against the run It was my defense that won us the game no question I really didn't do that much on offense. Howard was solid. Okay. I was solid demarco. Murray was okay.  I played defense today. That's what I did though But if we take a look at defensive justin reed five tackles talanoa who fangha six tackles Divine diablo with an interception four interceptions for kyle dugger. I love this team, dude I'm sad. I'm sad that after this episode. I gotta get I gotta lose this team I'm kind of sad about that if anything, you know what I should have done after like, you know Hindsight 2020 but when I think about that game, I should have spent even bigger on defense, dude Like I played such good defense. I could have just gone balls of wall on defense I mean my offense just dog water and said whatever who cares but all right boys. Hey, I love you Thanks for watching as always you guys are studs. I'll give you a switch on the lips next time I see you That's it. Hey take care y'all. Peace