 Let's there we go. Welcome everyone from all around the world to wordpress through the terminal. Your speaker today will be Milana Kapp from Serbia today. Thank you so so much for agreeing to walk us through this presentation. And yeah, I'm sure you have a lot of great content to go through, so I'm going to be quiet and let you take the stage. Yeah, thank you so much for inviting me. I am in love with WPC Li and terminal in general. Let me just hide a few things. So we get more space here. Okay. Yeah. So let me get my slides up from terminal. So today we are going to talk about WPC Li and how it can help you make things faster, do tasks that you don't really like, automate things a bit. And, you know, today when we talk about CLI tools, like we have so many and do we really need another one? Well, yeah, of course we do. WPC Li is not just the most powerful tool you can use to do stuff to WordPress. It's also fun and it's not scary. People usually tell me it's kind of scary doing things in terminal and you have to memorize commands. Well, there are things to make this easier, things to remember and makes everything easier. And it's all practice. And when you write code, it's also, you know, you cannot make a typo because you will get the undefined function error. So when we talk about using WPC Li, you can do that on different levels. You don't have to start using it right away like completely. You can start with little things. So the first thing you can try and practice is when you install fresh WordPress and there are no plugins, just default thing, everything that you can do there. You can do with WPC Li in terminal. You can try all that. And that first level of using WPC Li, I like to call killflow level. But then you want more. Of course you do. You want to import an export database. You want to list Chrome jobs. Everybody does. And in WordPress dashboard, you need to have additional plugin to do that. You need to install plugin for exporting important database. There is excellent plugin of Chrome jobs. And you can do that with plugins for WPC Li. You don't need plugins to do that. You can just, you know, do it on fresh install. Now, this level of using WPC Li, I like to call the Piper level. And now you see how making it, doing stuff with WPC Li is kind of, you know, easier than doing it in dashboard. But there is more. Of course, there's more. Now, you maybe don't want to export the whole database. Sometimes databases are huge. And all you need is maybe just a custom post type. And not all posts. Maybe you just want specific posts from this to that date. And maybe just from this author. Well, guess what? There is no plugin for that. Not yet. And we don't need it because we have WPC Li. We can do it with just one command. But that's not all. With WPC Li, you can scaffold so many things. And you can make your life as a developer so much easier. And we will see today, scaffold command, we will try to make something. And now when we enter the level of, you know, doing things with WPC Li that you cannot do in dashboard, which is the Neo level. Now you might be thinking, okay, so that's it, you know, with WPC Li, you can do that. No, there is more. With scaffold command and another sub command, you can create your own custom WPC Li commands. Now, why would you do that? There are so many commands, right? Well, some very smart plugin authors and hosting companies have been doing this for years. There is a huge use case for this. You will see a smart plugin author. But let me just tell you about hosting companies. So you get in your project, you log in to your hosting panel, and you take a look at all my Gutenberg. There is SSH and you have access to it. But then you look even further and you find WPC Li is available. You're flirting, what? But then you look even further and you see that this company created their own custom WPC Li commands so you can do stuff on their server faster and, you know, just easy. Well, that new level of awesomeness is the robot level. So now you want to use it. I convinced you completely and we are going to try to use it. So I don't have any computer or server without it. So I'm not going to show you how to install it, but there is a documentation and you can take a look. All you need is three and a half commands. I swear, it's just, it's simple as that. So this one, first command, you download it, you download this part, which is PHP archive and it's working already. So basically it's just one command and then you run this half of command, which is PHP WPC Li part. You felt to check if it's working, it's working. But you don't want to type PHP WPC Li part every time you want to run command, right? So what you do is you run this command to make it executable and then you move this to somewhere in your pad so you can execute it from everywhere. Now the most common naming is see this one, WP, the last one. You can name it whatever you want. The way you will start typing command is determined by this, that you call it, this file, how you call it in your pad. Now just be careful. Once you start using it, you will do a lot of copy pasting from stack overflow and documentation and other sources. So you might want to make it the common sense. And I have to say here that officially WPC Li doesn't support Windows Out-of-Box, Windows as Operative System. There are options to include the whole Ubuntu now in Windows. I'm not sure how to do that, but I'm sure there are a lot of tutorials online. What you might experience is that some commands are not behave as we would expect on Linux and Mac machines. So that is why it's useful to get the whole Ubuntu in your Windows and then run it. I've been giving workshops for WPC Li in local community and a lot of people came with Windows and there were problems with shell command and additional things that come with Linux and Mac and it's just working out of box. So make sure to include that. It's possible to have it, so please don't be discouraged. It's possible to be working with Windows. You just need the Ubuntu and there are probably a lot of tutorials online that you can find. So now that we have it, we can type wp-info and you see the info about your system here. So I'm on Linux. I have PHP 8.2 and I have the latest 2.7.1 version of WPC Li. So let's start using it, but before we start, there are things to help you memorize how to use it. So when you look at terminal, it kind of looks like, what should I type now? When I have graphic user interface, I just click, right? Well, I'm the opposite person. I don't like to memorize where to click and where to go. I just like to do things from one centralized place and you can memorize things in this way. There is a anatomy of WPC line command. So first you type WP or whatever you call that file in your path, then we have none, which is entity you want to work with and there are a lot of entities and it's not 100% consistent. Now there will be commands that first start with verb, but majority is starting with none and after that you have verb. This is what you can do with this entity, what you want to do with this entity and you will find that many entities have the same verbs like add, remove, create, generate. So there will be consistency there as well to help you memorize things. After that, if this is too global for you, if this is not enough refined for you, you can use quads, which are parameters or arguments depending on the command that you can really refine your query or your search or whatever the command is about. At any point you have a number of global parameters available, help being one of the most helpful ones and you can use it at any level. So you can use it with WP, with WP none, WP none verb, you can see everything, complete documentation in there. My favorite global parameter, which we will see today is prompt, that's like the most useful parameter in the whole world. So let me show you how this help works. See, when you type help, you get all the nuns here, most of them are just nuns and you can type any of that and then say help again. You get out of this by typing Q. So WP, for example, poor help. And then you see all the verbs you can use with core. So you will not mistake. One second, please. I'm so sorry. I got a question about folks not being able to see the screen. Can other people see the screen? I see it. I see it fine. Okay, thank you so much for confirming. Yeah, I see it. Thank you. We are sharing the screen. So maybe you need to change your view settings. Sorry about that, Milana. Thank you. Yeah, sure. So even you have, when you scroll down, you have examples how to use this command. So you, there will be, you know, examples for most of things, not for everything, but you will see and you will get the hint how to do it and how to use. And then when you scroll even further down, you get a list of all global parameters. So you don't have to leave terminal at all. You don't have to go to documentation, but if you like how it looks like, you can go there as well. So let's talk about now use cases. Let's talk about administration. So for example, you have been working with a client for in past and you didn't hear from them for a long time. And they just teaming you saying that they cannot access their login URL. They tried, WP admin, they tried login, they tried everything they could think of, but they couldn't. It just kept sending them to four or four pages. So this is because you were smart and you changed the login URL to increase the security of the website. And you even advised your client to change it again so that even you don't know it, let's pretend they did. So now nobody in the world knows this login URL. And you have two options. You can go to database if you have access and search, which is boring, or you can run one WPCLI commit. So naturally, you choose WPCLI, right? So let's start doing that. We can do that as SSH at milana.dev. This is my imaginary client and my port 55656. And we are on remote server where I have WPCLI, right? So this is perfect world. We have SSH access and WPCLI available. It's not the latest version, but it's there. And it's good. There is only one problem with this. I haven't heard from this client for a long time. I don't know that port number. I don't know where's a file where I wrote that port number. And I might even not know if I have that file. So with WPCLI, I don't have to memorize any of that. I can use alias. And alias, let me see if I have this alias WPCLI. So alias is configuration of WPCLI on your computer. It has nothing to do with WordPress websites that you have on computer. So that's why it's WPCLI. And then we have none alias and work list. And here you see I have a few of them. There is all which you get created as soon as you create one custom alias. And here is a client which you can see here SSH I use to log in. So what does this mean? I have connected my computer with this remote server through SSH keys. And that's something you can find tutorials online how to do that. It's like basic administration. So once you do that, basically you need three steps. You create a pair of keys, SSH keys on your computer. One is private, one is public. And then you copy this public key to your remote server. The first time you create connection, it's a shank. And your computer puts that remote server into your list of known hosts. And then you can just log in as I did with SSH command. So once you have that connection, you can create alias with WPCLI just by doing this. This is the path of WordPress on my remote server. And this is SSH command, basically, that you use for logging into that remote server. And now we can use it like this. I say WP and then client. And then I type whatever command I would without alias as well. So let's check the version of core. It's 6.1. It's up to date, which is weird because this is client that didn't log into their website for a long time. So let's fix this. This should be outdated WordPress version. So if we will say WP client, it has to be typed correctly to work core. Now, whenever you want to change the version, you have to, if it's not the latest version that you would download from WordPress.org, you have to use update. Now, because I'm changing, it's not the default version. I'm going to say version. And let's not go too far. Let's say 5.9. And because I'm going backwards, I need to say force. But you can see all of that in documentation. You don't have to memorize this. I just memorized it because I had worked with this client for so many times. So now it's 5.9. And now let's update this WordPress to current version, which you just do with core update. And look at that. Look, ma, no hands. You don't even have to go there. But I suggest you go there and check if everything's fine. So let's find that login URL if you didn't forget that we were talking about. So WP CLI, WP client, and I will use command for executing arbitrary PHP code, which is evil. I use that command so many times. It's even embarrassing to me. So here I can just type any PHP code. I'm going to say echo. And I happen to know WordPress function for getting login URL, which is WP login URL. Now, this is enough, but I want to make it... Okay, let me show you. When we do this, yeah, we will get this login URL, but this will be part of it. So what I'm going to do is I'm just going to add here a nice... Oh, sorry. Evil echo, WP login URL. And now I'm going to add new line here so that it prints nicely. And I can just click on it and open in my browser. So control and click on link. And here is my login URL. You should have asked me a lot. This is my imaginary client. So this task could take a long time. It could take hours that you cannot log. You cannot take money for that, like spending two hours searching for password. So the possible workflow would be you reply to client. Like, do you have posting credentials? And they reply, no, I don't. And then you start searching through your computer and you search and you can't find it. After two hours, meanwhile, client replied, oh, I found it. Here it is. And then you go there and you realize you have to open ticket with support. And it takes a lot of time, frustrating time that you cannot take money for. And with WP CLI, this took just a second. And you can, if you start now, you can create a database of your all websites that you've been working on. And it will be in your WP CLI config file. You don't have to search for files. Everything will be in your WP CLI config. And you will not even need to go there because you will have alias so you can do all that. And in two years, you will love yourself. So that's about administration. Let's talk about security. So I'm going to show you one local website that I have, WP CLI. And this is fresh install from last night for version. Right. So here, let me show you the users we have. WP user list. So again, none and work. This is default. And I went with the stereotype. So I have admin and admin. And the role is administrator. That is default. And if we go to dashboard, the WP admin is another command that you can use for going to a login URL. And we didn't use it with the alias because it behaves unexpectedly with remote servers because all the servers are different. And it doesn't know exactly. It's not always the same path to WordPress. So that's why WP CLI don't know exactly where to go. So this, let me just log in. So admin command doesn't come with WP CLI right away. You have to install it. And by installing it, it's just one command to run in terminal. So it's pretty easy. So let's take a look at the access this admin has. Now, I'm sure a lot of you, if not all of you know exactly what's happening here. And I'm not saying this because I think you don't know it. I'm saying it because there is a point. So bear with me, please. I just want to make it to emphasize the access this default user has. So they have posts and categories and tags. And they can create pages. And they have their themes. They can add new themes. They have access to a site editor. They can install new plugins, manage all the users and tools. They can do everything in port, export. They can edit team and plugin files from dashboard in 2023. Let me repeat that. They can edit PHP files from WordPress dashboard. And they have access to all settings. And when you freshly install WordPress, you get this first post published by default. It's Hello World. And default themes usually show the user because we have only one user. This is author of the post. And this is the same user that has all the access there. So now that we have this user name, all we need is a password, right? And it's not a secret. WordPress websites get hacked a lot. I like to think of it because we are very popular kids. And that's great. But you don't want your website or your client's website to be the tool to measure WordPress popularity, right? So you want to make it more secure. And if we were talking about WordPress in 2009, we could say, yes, WordPress is a security hole on server. But this is not that time anymore. Now WordPress is secure. But it still gets hacked. Now, why is that? It's because of human interference. So there are things like very light passwords, easily breakable. There are things like, oh, I saw this great plugin. It's doing all this great stuff. But it costs like 60 bucks on this market. And I found it for free on this website. So I installed it. Don't you think if something sounds too good to be true, that it is too good to be true, right? So a lot of things happen like adding unchecked code, suspicious code, and making passwords not strong enough. Even though there are efforts and you can see it in WordPress dashboard, like when your password is not strong enough, you have to check that you're free with password not being strong enough. So there are efforts, but things still happen, especially when you just first install WordPress. It's like, okay, never mind. This is let's just put some password there. It's usually including year or date of your birth. And if you have your birthday celebrated on your social networks, everybody knows what is the date or year of your birthday. So they know right away the part of your password. So what we want to do to make this WordPress secure, it's pretty obvious when user is a problem, then remove the user, right? No, we can't remove the user. We are making websites for users. But what we can do is we can go around the user. So what I'm going to do now, I'm going to demote this administrator, not remove it, not delete it, just demote them. But let's first see what verbs can be used with user, the WP user. And here we can add capability, add roll track password. Now here comes what is consistency all about create, delete, generate, get list. You can import users as CSV. You can remove capability, roll, spam, turn on spam. With update, you can change users' password. So if you have friends and you're sharing WordPress and you want to have some fun, you know, I'm not judging anything that rocks your boat. So let's do WP user, remove, roll. Now, the next parameter WPC line needs to know which user, even though we have only one user, it needs to know which user. You can use user ID or username or email. I happen to know ID is one. That's just the easiest. And now what we have here is admin without roll. You see it's empty. Let's see what that means. Now take a look at admin bar here. There are things they can do. And now when we reload the page, it's gone. And when you try to go to dashboard, nothing happens. Because when you don't have a roll, WordPress doesn't know what to do. This admin has less access than subscriber. So now this WordPress is secure, right? But we don't have any user that can do anything inside. And we want to use it as CMS, which it is. So I'm going to create another user. Have you can user create? So now there are parameters that are mandatory. There are parameters that are optional. I don't know which ones. Well, I know I practiced for this, but I don't want to know. I don't want to memorize. And I don't have to. What I can do is use my the most useful global parameter in the world, which is prompt. And it will prompt you with all the parameters there are. So user login, let me just say author. User email doesn't really matter because this is local. But let's make it Now roll, if you see this is in square brackets, it means it's not mandatory anymore. These first two ones are mandatory. The roll is not mandatory, but default roll is subscriber, I believe. And I want author. So I'm going to just say here user password. Now this one should be strong. The same as the one for admin should be strong, especially this one, because this user will have access to dashboard, but I need to log in with this user any minute. So bury me. Let's pretend this is a very strong password. And everything else, I don't care. Right? It's just next, next, next. So we created new user. And now have a user list. You see, we have admin and we have author. Now I forgot to say that even though we will remove a roll from admin and they will have no access, you should keep that password strong because you want your hackers to be amused. You don't want to disappoint them. So let's log in here with author and see what they can do. Not much. So they can create new posts, but they cannot do anything with existing posts. They never heard about taxonomies like categories and tags. They can't create new pages. They haven't seen themes or plugins now editing PHP files in dashboard, nothing. They have really, really limited access. So now we have these two users. One has no access at all. The other one has very limited access. While in WPC live, we can do this. WPC login, install, activate. And I'm going to use simple history. Now, if you remember what we talked about at the beginning, this is the smart plugin author. They created their own custom WPC live command. Why? Because you can see the list of everything that happened. This is what this plugin does. It shows you the list of everything that happened in your WordPress install since the plugin was installed. But this list in dashboard is accessible only to people who have access and we don't have user with that access. So we can do that here. History. So this was a very smart decision to create custom WPC live command and to keep it consistency. The WPC simple history list. And I can see everything here in terminal, what happened in my WordPress install while no one can access that in dashboard. Now, how about that when you talk about security? It's great, right? But if this author was your client, they would want more access and they should have more access. However, the next row after author is editor and they have just too much access for my taste, I don't like it at all. So we can choose something in between, right? But there is no role for that. We can use capabilities. That is what actually defines access and permission in WordPress. Roles are just groups of capabilities, but the capability is what makes things happen. So if you create new role and give it to user, this user would be like our admin, they would have no access at all. But if you add capabilities to it, then they will be able to do stuff. And these capabilities are really small parts of access and permissions. And that's great because you can every dashboard experience. Now, you don't have to go that far. You don't have to make it unique for every user. You can find what is in between, what is it that works for you. And now I'm going to give some capabilities to this author. I'm going to say WP user add capability. By the way, have you noticed that when I type tab, it completes the command? Yes, there are outer completes, tab completions for WPCLI. And you can find that on that same install WPCLI page in documentation. So WP user add capability. Again, we need to say which user. I know this user is having the number two. And now let's see what capabilities we want to give them. First, I want to give them capability to manage categories. What this will do, this will give them access to categories and tags. Then I want to give them capability to switch things and do the same thing for plugins, which is activate plugins. Now, what that means? They will not be able to add new themes or plugins. They know adding, but they can switch between existing themes. Also with plugins, there is no option to add new ones, but they can activate and deactivate existing plugins. Now, why is this important? When something goes wrong with your WordPress, this is the first advice you will get from support, from forums, anywhere you ask. Switch to defaulting and deactivate all plugins and start activating one by one to see where the problem is. So I think everybody should be able to do those two things, to switch themes and activate and deactivate plugins. What we don't want, and we still have achieved that, we don't want any code to be introduced into this WordPress install by plugins or themes that we haven't looked. You have to give your developer all the information that you are putting in, not just my site doesn't work anymore. So leave breaking the website to developers. That's our job. You just have to write blog posts and pages and run your shops. Just be awesome site owner. Now, there is another capability that many themes and plugins and also WordPress core is using to hide some permissions. So that is edit team options. And with this, in core WordPress, you get access to this site editor. And as I said, teams are putting some team options behind that capability and also some plugins, depending on functionality, they allow you to do it only if you have capability to edit team options. And you can do, you can add many other things. These four are like things I memorized and I'm not making this up. So we have rows and capabilities here in WordPress documentation. And if you haven't seen, this is our new website. This is how the documentation is looking since last week or past two weeks. And we have new URL keyword here, documentation. So it can be found at WordPress.org documentation, article, rows and capabilities. And here you have a list of all rows that exist. As I said, this is just a group of capabilities. And here you see the list of all capabilities for each row. Now these roles are the smallest role has the last capabilities. The next role has everything this role has and some additional and it's, you know, gradually increasing, but you can create roles with capabilities that are not really in previous ones. And you can create whatever you want. You can be very creative here. And you can even see if you click here, so edit pages, that's something I should have. You can see what capability is doing, what access it gives you. So now this author with some more capabilities can really have enough access to own the website, but not enough to break it. Please leave that to us developers. And you can, you know, find that fine line between dangerous and safe and, you know, created for every client. I believe that's our responsibility to do that for every client to find where is this line and to give them that access. And now we can start talking about development. So I'm going to stay in this in this same WordPress. And I've been talking about schedule. But before that, I told you that many entities have the same verb. One of them is generate. So we generate sub command, you can generate dummy content, like posts, pages, menus, comments, users, anything you need. And it's interesting, you know, to first type it like WP posts generate. And then there are parameters, you can make it different by default. The number of items to be created is 100. So you can fill up pretty fast. And it's interesting to do it once, but you don't want to do it so many times every time you need to get some dummy content. And it's good that you don't have to be terminal when you start using WP CLI with other tools, you can make things very efficient. So you can create a bash script. And in this bash script, you can just put all commands for generating dummy content. And then when you install WordPress, you just run that command, it's just one word that you define, and your WordPress gets populated. But that's a boring job. Now let's do something interesting. Let's see what can be scaffold. So right now, you still can scaffold block with the WP CLI, but it will be retired because there is a script, WordPress script create block, I believe. And it's doing great job. So this will, it will be pointless to keep working on two sides and, you know, making, making things complicated. So that will not be available in next WP CLI version, I believe. But we can still create child team, we can create package. Now this package is not coming with WP CLI out of box, it's another command, and it's used for generating your own custom WP CLI command. And then we can create plugin and post type and tests for pay for plugins and teams and taxonomy and underscores, which is classical classic team. It's pretty outdated, but if you're still using classic themes, you can try it out. It's like really easy to create a new team. So what we are going to create now, scaffold is plugin. And again, there are parameters that I don't want to memorize. Slug, let's call it learn. Directory name, if I want it different than my slug, I can type it here, but I don't want it. And you can see the only required parameter is slug. Everything else is optional. Plug in name, let's say WP learn. Plug in description, we don't have a time. Plug in outer WordPress community. So you are right, skip test, don't. Continuous integration provider by default, WordPress is using Travis for a project. But if you have something different in mind, you can define it here. Activate, yes, please. Activate network. I don't have network here, so I don't hear. And of course, if I had another plugin with the same folder name or the same slug, I could overwrite it with force, but I don't have that plugin. And we created a plugin. Let's go and see what we have done to learn. So you see here, we have been with some useful scripts there you can use and you can add more. NPM is ready. Also, writing tests is ready. You can just start writing it. There is a grant file. So grant is default task runner for WordPress project up until Gutenberg showed up. Now, since Gutenberg, we are seeing more the backpack being default task runner. But grant file, you know, grant is still used and it's working. And this grant file has a very useful task. It will create, it will scan all your PHP files and your JavaScript files. And it will create a pod file for translations. So it is useful. You can convert it to a backpack if you want. And you can just keep it like that and keep adding your own stuff. What I want to show you is this read me file. So let's do, let's open in win so that we can see how to close it. Read me. And you see, this is not just empty txt file. This is a template. If you want to close this plugin at WordPress.org, you don't have to go to plugin documentation and search for what files you have to have there and how read me text files should look like. It is all here. And you can see it collected all the data that we typed in while scaffolding this plugin. So what you have to do is just put what is unique for your own plugin. You don't have to reinvent things that have been copy pasted for decades. And how do we get out of VIM? So first type escape. So you get out of editing mode. Then you have column. Yes, it's column. Or yeah, it's column. And then Q as a quick. And we are out. So now we know how to exit, how to close the VIM. And let me show you, I'll not show you. Let's create this plugin. This plugin is doing nothing. So I'm going to open it in nano. It's learn page V file. Here we have some syntax highlighting. And you see again, this is what we entered when we were scaffolding. Everything is there. So our code can start here. And let's do a simple function. Learn the title. Always prefix your functions. We are going to pass title. And this will be a very small function. We are going to return. Escape HTML. And always prepare your strings for translation. By the way, these spaces between brackets inside the brackets, it's WordPress coding standard. So what are we going to do here? Say learn WordPress. And our text domain is learn. And we are going to attend this title. Close it. And let's hook it to a filter. This filter is called the title. And our callback is learn the title. I like to have the name of the hook inside of my callback name. So just prefix it. And I know exactly what's happening. Okay. We can save this. And let's hope we didn't break anything. But even if we did, that's not a problem. And here it is. Our plugin learn. And what this plugin does is it adds learn WordPress before every occurrence of the title function. Now, see, it's not very useful. And I'm happy it doesn't do that in menus anymore. That was fixed. So before this filter would add here to manual learn WordPress sample page. But now it's not. And that's great. And this plugin is not useful. But this plugin was created during my workshop in a few minutes in terminal. We didn't open code editor. We did it in terminal. And this plugin could pass code review for WordPress.org. And it could live at WordPress.org. Why? Because it's useful. Because this function is so great now. Because it has everything WordPress.org expect plugin to have. It follows coding standards. It has read me. It has task runner. It has tests and everything. And we didn't do any of that. It was in scaffold command. So please do yourself a favor. Make your development faster and more efficient. You can just run one command and start typing your code. You don't have to worry about anything else. And it will be, you will be better developer for it. Just going through the files and see what's there and you will know what's needed for WordPress.org. By the way, if you want to create a plugin and you will save some things to database, what you also need is uninstall PHP file. Please clean up after your plugin is uninstalled. Thank you. That was unpaid commercial. So now we still haven't break anything, right? It's weird. We are talking about WordPress. So let's, let's break something. Let's go to this. No, let's go to, let's activate plugin and activate. Hello. And let's break it. No, no. Hello. No, we have to get out of learn. Right? Let's do the little nightmare for developer and just remove this semicolon. And let's go here. And you see there has been a critical error on this website. This is helpful. Not what we want to do. Well, if this was production, we do want this to be displayed so that no one can see the errors on our website. But how we can make this faster, you know, the workflow in real life would be only that it doesn't work. So can I reproduce it in my local? No. My local is working. Staging is working. Only production doesn't work. So I have to download all the files. I have to find the error. And then I have to identify how to fix it and then fix it and then put it on staging and test it. And if it's working, then I put it on production and it's been at least 24 hours. And website was that. But with WPC line, I can run just any command as long as plugins are loaded. So if you think of how WordPress is loading, it's first the core and then must use plugins and then there is a parent team and then there's a child team. And no, it's child team and then parent team. So what we want to do is we want to run command, something that will load the full WordPress. So we get that error. We get that in our output. So we can say WP theme, list, whatever. It doesn't matter. And here we have our error. Now, this error is what we see on front end. And it's not useful. But before that, we get the real PHP error that we can use. So there's unexpected variable lyrics in Hello PHP file on line 46. So the actual PHP error that is useful. So we can go here and go to line 46. Sorry, I typed something. Here, you see this lyrics is unexpected because this was missing. And now, if we go back, everything is fixed. Now, in real life, you might not fix it that fast. The problem will be much more than that. But what you will know is which plugin is causing it. And you can then just deactivate from WP CLI that plugin or just switch to defaulting depending on where the error is. And the site is alive, not having all the functionality, perhaps, so we're not looking the same. But it is alive. And you can fix it in your local and you can take your time and test it and then put it back to production. So it will save you a lot of time. And especially if the website is a shop that is living from being high, earning money, then you want it to be alive and not to have error there. And people waiting for it to come back. At least I know by myself when I find the website that on first load, it's an error, I don't care. I just move on. So you don't want that to happen. And now that we broke and fixed things, it's time for magic. Let's go to my magic folder. See, there is nothing in this folder. It's completely empty. And I'm going to say WP install. Melana, I just wanted to know we are at the top of the hour. We do have a few folks dropping out. So I just wanted to be mindful of that. Thank you all for joining for the hour. Melana, I don't know how much longer you have for this session. Maybe there's people. 10 more minutes. Yeah, less than 10 minutes. It's five minutes. Awesome. So folks, if you have five more minutes to spare, please stay and learn just a little bit more from Melana. Okay, so this is magic. So it will be fast. It's database magic, database password. Here's my root and database host. I don't need any of that. Site title, it's magic. And site URL. Of course, magic. And admin. And it's cooking. But soon it will be done. And we want to release the Kraken. We want to release the Kraken. And this is our Kraken. And so what happened here, you see magic.log. It's a new website that is just installed. And this magic is not magic at all. It is a batch script. WP install. My custom batch script for installing WordPress. And here you can see how it looks like. It's pretty simple. We have this shebang here. And that is common to start a script. And after that, we say which shell we want to use. We want to use batch. And after that, you just type in the commands as you would type them in terminal. So you don't have to type them anymore. The way you have a name, this script, it will run. So if you remember, my last command was WP install. This is just the name of the script. And I made it executable and put it in my path. So I can execute it from any place I want. And then with just a little bit of batch scripting, I collect the data so I can run config create. And I don't want to type this ever again. I don't want to memorize. I don't want to think if I need any other parameter, I just add prompt. And the sensitive stuff like passwords are hidden. That is batch scripting. I even give myself a little cheer here. And I use rewrite structure here. For that, you need to have a mode rewrite. To mode enable to be able to use a rewrite structure. So what I have here, when I go to hello world, you see I have clean permalink. While here, this is our old one, I have index.php. That's what happens when you install website with WPCLi. But you can fix that with this rewrite command. And after that, this is just a little bit of Linux run. And I get to open admin. So this is pretty simple. It's just for five WPCLi commands. You can make it as difficult, as complicated as you want, or just simple. You can add to it that script for generating dummy content. And when you run it, you just laugh out loud because you are never going to type that again. And it's completely automated. So I hope this was fun. I hope you learned something. I hope you see the potential in WPCLi for your work. My name is Mila Natsap. I work as engineer at XWP and the loudest member of the commutation team. And you can find me on these places. If you want to chat about WPCLi or commutation or classical music, anything. And thank you very much for your time. Thank you so much, Milana. We had a request for your script. Is there a good way to share that with folks? I don't know if chat is the best way. No, no, no. We will not share it in chat. I will have it in GitHub so you can take it. Oh, awesome. So I'll share the link for the GitHub script. I will send you a link. Amazing. Thank you so, so much. I'm going to stop recording. Thank you. And thank you.