 So yeah, good afternoon. Thank you for having me So short introduction. I'm indeed. I'm Danny hobo. I'm a backend developer working for Xoff in case you didn't see that yet I'm from the Netherlands and I'm working for the Tallinn office So if you have never seen me before here in Helsinki, that might be the reason why I'm today talking here about speeding up development with the WP CLI or VP Clyde for about easier pronunciation So let's get started First of all, what is VP Clyde? Well, it stands for the WordPress command line interface and The goal why it was created is so that you can manage WordPress installations from the command line Basically, the idea is that you can do everything that you can do from the admin interface and more so How do you get it? Well, as you can see from the steps It's just three simple steps download the file and put it into your part As you can see you don't need to install WordPress first There is a reason for that because you can actually Install WordPress with VP Clyde and that will make things faster as we will see later So let's say that you have installed VP Clyde and you have a WordPress installation running like let's see yet Some examples like what can you do? One good example could be plugins. I mean we're all using plugins. We're all installing them updating them We all know how to do it from the admin, but here's one example how you can do it using VP Clyde So it is just one command as you can see in my screenshot down below. I was installing the poli lung plug-in Just one command it automatically Downloads installs and activate the latest version of poli lung all with one command If you want updates like a single plug-in just type in the VP plug-in update in this case VP plug-in update poli lung and it just if there is an update available It just takes that and it immediately like installs it and make sure that that one is working How about if you want to update all the plugins well, of course, that's possible as well just Use this command VP plug-in update all and you can see that VP Clyde even puts your side in maintenance mode updates all the plugins that has an update available and then Takes it out of maintenance mode I think there is like a small buck in VP Clyde because it says updated three out of zero updates So three out of zero plugins, which of course is a little typo, but as you can see it has worked So what other kind of things can you do with VP Clyde related to plugins? Well, you can for example list all the plugins with status so that you can see which ones are active which ones are Enabled which ones are disabled You can install a specific version So if you want to have an older version of a certain plug-in then that's not a problem If the latest version of any plug-in doesn't work with your site or doesn't work with your team You can't take an older version If you have a plug-in that is not available in the WordPress plug-in directory So some premium plug-in or maybe you developing something yourself that isn't public yet You can also just install them from zip or from git just the way as you used to from doing it in the admin And of course you can also you search the wordpress.org plug-in directory so that you can If you're not completely sure anymore about the name You can just type it in there and it comes up with all the Matches for that name and you can just install that one directly from the command line Well Besides plug-ins. We also all use teams or at least many of us do and basically that works the exact same way So instead of VP plug-in you type VP team and then install the team that you want You can even add the flag to activators right away and as you can see from what I did I did 2017 team. It just installs and activated straight away. So you can all do it with just one command Well besides that it has all the same things that you can do with the plug-in so you can update them Activate your team deactivate install and install like everything before So okay, that's like the usual stuff that we all do from the admin But where can you like really like save a lot of time like what is really the fun stuff? Well, for example, WordPress the core install can be done in just a few seconds And that's if you type really fast, but it can be done like very quickly and You need two steps to do that first You need to create a VP config file because of course WordPress does need to know your database credentials before it does the install so you just with one command can do that as well VP core config and then use your database credentials and it creates the VP config file After doing that, it's just one more command with a few more like parameters such as the name of your website and The admin credentials and by just by doing that WordPress will be installed if you Do those two steps and you go in your browser to the VC Helsinki.f You will see that the website is up and running We all know that the WordPress is already fast by default. It is just a five minute install But this makes it even faster Maybe not you don't see the value of that if you just do one side But if you develop 10 20 30 websites all on the same server or maybe few different servers You can win so much time by just by doing this The same goes for media like pretty much all the websites we develop has a lot of media in it And you can of course you can drag and drop them in the admin and that goes fast But why do that if you can just do it from the terminal if you have all the files already in one folder just run one command and all the Everything will be imported as attachments to your WordPress site Well, as we all know as you develop and you might notice later on that you need to have a few more Temp nail size or like image sizes that are not done yet. You need to regenerate all the thumbnails I've actually always been doing it like this So I'm not even sure of this comes out of the box at WordPress I know for sure there are plugins that can do that for you But it's not needed anymore because you can just do it with commands from VP client in this case I do like three thumbnails because well, it would take a lot of time to do it all But if you want to regenerate everything then you can just do the regenerate all Comments is of course also something we are all testing our websites We want to try and see how does this product look like if it has Thousand comments like does my lazy loading work does my paginating work whatever you're using and if you manually have to create Tons of comments. It's taking a lot of time Yeah, there is one comment in which you can just do it all say which post ID you need comment for how many you want By default it's 100 comments, but in this case I did 3,000 If I just open this specific Post a product like in my website. I can see that there are actually 3,000 comments generated So for front-end developers, this is really useful because it takes Saves you so much time in just like manually inserting comments Well Now we're talking about comments We are all know that a lot of comments on your production website. They will be spam if you don't have anything like Google recapture or People can look comment without looking there will be spam comments and What a lot of spam plugins do I mean, I hope for all using one they mark comments as spam and But don't delete them yet. So they are clogging up your database now here is one comment where you can like one Task where you can see all the comments that are marked as spam Now that in itself is of course not really useful because well, why would you want to see which IDs are marked as spam? What can you do with that? Well, you can actually change the commands in VP client. So in this case, you can see there is one command where you can delete comments Combine that with command from the previous slide and suddenly you have one command that's automatically Deletes all your spam comments from your website Might not be useful if you have like maybe hundred or five hundred spam comments but if you're running a big website with Thousands ten thousands maybe hundred of thousand spam comments per day and you need to delete them You can do it from the admin But it just takes more time and here you can do it with one command everything from the terminal And you're done Database well as already earlier seen today by I think it was at moon to was talking about it You can use VP client for database export and import and he got a really good example especially with the aliases which I'm not touching today, but that really works so I will not say too much about that but yeah, here are the commands how to do it and And yeah, the search and replace which we all know like the benefit of that I have just one extra comment in my very last Command you can actually see that you can add the export Parameter to this command so you can skip one step from what admin showed you can actually straight away Generating sequel file that already have done the search and replace for you So well, I hope that showed a little bit of like the basic commands that come with VP client So of course now you want to know can I create my own custom commands and Answer is simply yes, you can I mean just use the VP client at command in your own plug-in in your own code I'm sorry, and you can start creating your own VP client commands in your own plugins So that you can use them for that as well VP client comes with a few global parameters to speed things up a bit more So loading of skip loading of the teams of the plugins or if you want to have the php debug output So you can see a bit more like what exactly has been going on or what went wrong You can prompt the user for the comment arguments if you don't know them exactly by heart like what can I do? What can I not do? There is a quiet mode so that there is absolutely no output at all and well There are more which you of course can all see in the documentation So well to go back to the main topic like speeding up your development Well start with like using the built-in commands from VP client I mean you can really say some time with that Create your own commands chain them But the two biggest time savers and unfortunately we don't have time to discuss that in a lightning talk like this Is actually the first one is create a script that combines it all So if you want to create a script that Creates a word per site automatically updates all the plugins. You can just Create one script and do it all with just one command or create a script that Loops through all the 20 websites that you are managing and for all 20 websites just run update on one certain plugin that you always want to do and Another like another time saver is using cron jobs. For example, if you have a script that automatically takes Export from your database from a production website You can just create like a script that takes it from there Saves it on the server somewhere else as a backup and have a cron job running it for you Of course, there are multiple ways to achieve this VP client. It's just one way to do it, but Keep that in mind if you like interested in this stuff So yeah, the next steps is like basically if you are interested in all of this Just go to the website go to the VP client or it's very well documented and constantly like progress going on And of course well you can always like talk to me here or talk to me on Twitter Like I'm also not the most active tweeter, but I do Read all your tweets and I will comment if you have anything. So yeah, that's it. Thank you very much