 Once again, welcome to WordCamp Jacksonville. I'm Gene and I will be talking about WordPress automation. Basically, it's a talk on WordPress workflow. This is supposed to be a 30-minute talk. I gave this talk at WordCamp Miami as a lightning talk. I gave this talk at another WordCamp in a meetup. It never gets 30 minutes. So you'll have plenty of time to ask me questions at the end and we can take it from there. Why should you automate your WordPress, your job when you do WordPress? Whatever you're doing WordPress. This talk is supposed to be more developer, so I will lean towards that in this version of it. The truth be told, I have some things that will integrate with a user. If you're using WordPress, the main reason you're using it is because you have user interactions. For you not to think about when you're automating WordPress, you have to think about the user's aspects of things as well. I work at a university and I deal with a lot of faculty and staff and admins that are not tech savvy at all and they prefer to use their spreadsheets for things. Even though I might give them a form like, hey, just build this form and you can just hit submit and then it does everything for you. They're like, no, just put my spreadsheet. I'll go over all that, how I use that and how that workflow goes and automate the process. That's not really developer talk per se, but there's aspects of that to it. Why you should use it, it makes life a lot easier in general. Show of hands, how many of you guys are lazy developers? I might be the laziest of them all. I have assistants. I'm a senior developer so I have a junior developers and assistants below them as well and truth be told, this talk was put together by them. Mainly because I nagged on them about, hey, we need to do this faster and we need to find a better system. They took my nagging them up this, put up some documentation of how we automate system. I took that and made PowerPoint slides out of it. One of our documentation is I'm lazy and it's true. I'm lazy. I prefer to do a lot of other things than have to worry about a lot of processes of building a web application, a website or a theme or plugin or anything in that relation. One of the other things is there's, well, I kind of explained this, I don't want to do most of the stuff that goes on. There's a lot when you're building a website in per se. When you're building a website, you have to think about themes and plugins, themes, you're thinking about CSS processors, minifying JavaScript, a lot of stuff. I don't want to think about, I don't care how they really work or why they improve my, well, I like to do performance, but I don't want to think about this stuff. I make sure the automations are working perfectly fine. I don't have to worry about this. Keeping things consistent. I had a bad going at this when I started my web development career. I will build one thing and then turn around and have a new client and build something else and it'll be completely different and I have to use separate tools because I didn't keep things in an consistent way. I remember I use, say for instance, I use starter themes, there's underscore ass, there's a few of them out there. I had two or three clients using different starter themes and one was based on foundation, one was based on bootstrap, one was based on some other CSS I didn't remember the name of and it just threw me, this made me crazy pretty much. So one of the key things is keeping things consistent so that way when you enter a project, regardless of what the project is, you have a framework and at hand. Before I really move on, this is based on mostly my experiences as well. So I'm hoping that you guys just don't really want to copy and paste anything I'm kind of talking about. It's more of a process that you have to go through yourself and see the final what best fits you. I say that. Time is money. Because if you're a contractor, you can pay by hour or your salary or you have a fixed rate time is money. You save your clients money when you're able to do a job a lot faster. You're able to save your time and be able to get paid at a higher rate because you're able to do the job a lot faster. So with automation, speed is one of the key things and because of speed, you are able to make more money. And time for other things. I generally have a family. I love playing video games. Like I really love playing video games. So I tend to, you know, want to spend time playing that instead of hanging out with my family. So outside of that, I still have to spend time with my wife who wants to hang out and binge watch a few shows and whatever. I have kids. I have to take recitals and things like that. So because of that, I have to make sure I have time for them because as you all know, you can spend six hours and less than a week and they will go by and you don't see anybody or stay in your home office or cave. And that's not a good life to live. When pretty much at this point, it's time to stop cowboy coding. I'm saying this and have the preferences because I still do. But I kind of do it in a different way. I'll explain that a little later. But when you are creating a theme, you pretty much want to make sure you start your automation process as soon as possible. And it doesn't have to be actual code. You put together anything. It's using like a starter theme. Like underscore s saves you 10,000 hours. If you want to create your theme from scratch, you know, you waste it. You're spending 10,000 hours to pretty much get to what underscore s is. And if you've ever seen underscore s before, it's pretty much nothing. So it's a very basic theme from automatic. And it's to me, it's one of the best starter themes because it has no real true formatting and you can pretty much do anything you want and pull and rip out anything else. Also, I would always recommend is either using a starter theme or pulling from underscore theme and converting it into your own little starter theme yourself, which makes it a lot easier when you're working on projects. Same thing goes for plugins. There's tons of plugins, scaffolds out there. I would say pick one or two or play around with a few of them and just take a look and it'll help you create those plugins a lot faster. There's tons of people who've done this before and are already in the process of automating why not use what they have to make it a lot easier for you. Like I said, time is money. So they did the time for you. Go ahead and make the money off of them. WordPress installs. Generally any project you're working on, you're gonna install WordPress unless it's already exists. But even though they already exist, you're installing one locally. Hopefully you are doing local development or you're doing a remote dev development somewhere. And WordPress installs, even though it says five minutes, you can do it a lot faster than that. So that's one of the key things. Not just a lot faster than that, but have it installed with all the plugins and tools already there for you. That's the biggest thing because yes, you can do the five minutes, but then you have a little dolly in there. I'm not gonna use a little dolly play. So, you know, have it installed the way you need it with all the plugins and things already there for you. Where? I'm sorry, I'm going a little too fast. I'm trying to slow it down, but the coffee is kicking in fine. Local development. So this is the biggest key. I actually know this machine anymore. I do a lot of local development on my other machines, my Mac, and both of my Macs I've worked at at home. And pretty much I create themes, WordPress sites, full-on applications locally on my machine. So I run through all my automation tasks on my machine so that way I'm not worried about any errors or people seeing like, oh, what are you doing freaking out? Things like that. It's a good place to start your automations and get it go run through because it's less errors and less risk of getting security holes pretty much. So when you're doing some of these automations, they tend to have databases already set up with password, password type of deal, and you don't want that being out there. So you want to do a lot of stuff locally on your machine and eventually you'll change those passwords. And when you push them up to your remote development, which is pretty much like dev.mywebsite.com. And on there or your sandbox development on there, you know, you'll set up the database a little, a little better. But then again, this has a little less automation as your local environment will because you're pretty much doing pushes from your local environment to your dev. And by the time you get to your production site, the live site, the only automation is really from your git that you're pushing from your development to your production. But the automation process might be a little different, mainly when it comes to maybe selling postal content and social media, something gets posted on social media automatically, or it's more minor automations than everything you did since the beginning. So hopefully I wasted a good 15 minutes of your time. And because the rest of the time is what you're really looking for. It's the how. Truth be told, this is a big deal. Now Docker and Vega, well, if you asked me in December, I would say vagrant first, because I've been using vagrant for a long time. Gregory is a tool that lets me create local, not just local, but an environment setting and whatever server or local environment I'm working with. So if I wanted to, if my client has a server that's running PHP engine X, and at the time, especially when I'm using the vagrant, everyone's on a lamp stack. Hopefully you guys know what a lamp stack is. But everyone's we're moving over to more of a limp stack engine X stack type of stack, or something different. So these will help you create these environments and kind of have that mock up over the environment. Makes things a lot easier to do that. And they let you create that automation process with them because they have the customization ability. I'll actually go over a demo and you will actually see date. I'm sorry, you'll see Docker in process. And that's actually kind of nice because I switch over to Docker makes things a lot easier. Get hopefully all you guys know what get is. Most of your machines, if you haven't installed has the basic get. If you use GitHub, that's one thing. Just pretty much out in the cloud. The places I work at, a lot of them use GitLab. I'm not sure if you guys heard that. GitLab is quite nice. I enjoy personally more and more as I use it. It just helps with more of the automation process as well. You'll see that in process in a little bit. WP CLI. This has been the biggest lifesaver for me in automation. The things that they improve on and they keep doing with this is it's pretty nice. This will save you a lot of times when it comes to installing and putting, say for instance, the whole plug-in scaffolding, they have it in there. I actually learned if you was in the Gutenberg talk that there's a Gutenberg block scaffolding in there. So you can actually call it through your command line and set it up through there, which saves you a lot more time when it comes down to it. So WCO, I have the I'm not going to go into detail about this because I use it, but there's still some more of it that I want to learn more about it. And I just use it for the functions I need to use it for. But this is a tool saver and it's worth looking into. There's tons of task runners out there and most of them do the dirty work. That's why I pretty much call them. So the CSS processors, they deal with them, the minifying and everything else that you don't want to deal with them. I'll use either Gunpla grunt web packs. They're available, you can set those up as well. These are tools that's been used for a few years now and it's up to you to choose whatever tool set you prefer. They all pretty much do the same. They have people who have different reasons. I know people who use multiple tools all together, not sure why they do it, but they figured it out. I know some people actually, I think legacy code. That's another reason why they stick to one or keep doing one job. All right, so I'm going to go over this demo with you real quick. It takes a little longer than five minutes on this demo, mainly because I ran across some issues, but generally it takes me a little less than five minutes because I can't play a video game or get on Twitter long enough to have any fun with this. Basically what I did in the beginning, I cloned a GitHub repository. This is actually not my GitHub repository, but I went ahead and when I cloned it, I put it in the directory. I see these in the directory at this point now. I did this demo pretty much last night. That's probably why it was a lot longer than I needed to. In Docker, the only file you need to care for is that Docker Compose file. The other stuff are there based on that Docker Compose file or the GitHub repository. At this point, I'm doing a Docker pull, which is a Docker Compose pull, which is pulling a WordPress repository or the latest WordPress repository and a few other things to create that MySQL database, which is MariaDB, and set up Nginx for me and the whole PHP setup for me. At this time, you've noticed it's actually doing all the demo now. Generally, when waiting for this, I am going to drink some coffee and we can sit back and wait. It doesn't take that long, but like I said, I did this last night and it shouldn't be so bad. Most of the items going on in here doesn't take too much space in your local environment. That's the reason I like Docker. The resources it takes is very minimal compared to when I was using Vagrant. With Docker, I can have two or three of these downloading based on the machine I'm using. I have one super awesome iMac at work that I run three or four of these at one time. It works smoothly, no issues. It doesn't crash or anything. If I try to do more than one of these on this computer, it will look like it crashed, but this computer is a lot older and the resources are not as available. At this point, it download everything, it set up the image for me and MariaDB is ready to go. If we can go, I have a WordPress site. Now, to be told that video is like seven minutes long, give or take, the whole setup took maybe a little less than five minutes to get done. At this point, you have a full functional WordPress site. You can do whatever you want. The way we do it, at least for the university I work at, we have download WordPress as a key and it does a GitHub pull for us. It does the Docker pulls for us and everything. Within eight minutes, it pulls up the site with all the plugins and themes and everything you have in there and pretty much has a login. I have a base login that I use for all my starting development sites. I'll log in in there and I'm up and going. I don't even have to go through the whole setup process. It's actually kind of nice, but then again, it will set up for that. We use batch scripts and things like that. That's a little further, but that's eight minutes that I don't have to do anything, even though it probably took us about an hour and a half to really set up, but after that, we rolled out tons of sites on a week. Maybe we were on eight, nine sites a week. This is doing this. It doesn't take much time for us to do it. More resources, automatic updates, WP config is a great file to set that up. I will recommend at least doing the minor ones. If you're feeling brave, you can do the major ones too. For my clients in the university I work at, I never do the major ones. I'm still afraid of Gutenberg and don't know what's going to do my content yet. I have the test plugin in my development. Everything seems fine until it rolls out and then you notice things are gone. I'm not going to yell that by the wrong people. Jetpack has a few features with social media and images. It helps with a few of the automations. We do run a plugin that helps actually run our own little script that helps minify our images so it keeps them nice and light on the web pages. Jetpack has an extra little feature in there that helps store it in the cloud and deliver it a lot faster. We do use it and it's worthwhile. Another thing you can always Google it, keyword workflow automation, WordPress workflow that's pretty much you can Google and find a list of places and people, how they do it. This is the way I kind of do things, but Google it is probably the best way of finding any answers you're looking for. Also, there's these task managers. I do use the, Zapier is a good one, but I don't use it as much, but I do use it if, whatever. I use it mainly because earlier I was telling you most of the faculty at the university I work at, they are setting their ways. That's the nice way of saying that, I believe. They have spreadsheets and they don't deter from them. I've actually convinced them to use Google Docs, the spreadsheets, Google Sheets. They moved to that just took them a while, but they did. At this point, I have a setup so that way it checks the spreadsheet, Google spreadsheet every three or four times a day. I think it's three times a day. It takes it in the morning, midday, and at night. It will create posts. We have a lot of custom post sites. It will create a certain custom post site based on what's on the spreadsheet. If they remove something on the spreadsheet, it will set that to pending. Instead of just deleting it outright, people will make mistakes. I learned this after the first couple of people started deleting it. It was like, hey, don't take it off the website. Delete it off the spreadsheet. It will revert it back and forth based on the spreadsheet. That's one good way of doing things, especially when the job requires it because I pretty much build websites, but I'm not the person really using it. There's also a few other features that both of these sites do. I have the URLs in here, and I think you guys will have the link to this PowerPoint. I gave it to the people in charge. I also have a list of lazy links here so that way if you don't want to Google it, you can actually click on them links. These are just basically articles of the workflows. You can easily take a look at them and see how things go. You should be just fine going through setting up your own way of getting things done. These links are I think the most important ones of them all. The darker one, I wanted to show you this in the demo because this one was a lot nicer, but last night I had problems with it. I wasn't sure because of the hotel Wi-Fi or yeah, I'm gonna blame on the hotel Wi-Fi. I had problems with it. It wouldn't let me do it, and I should have gave up on it earlier so I went with the better earlier, but I went back to the old one. This one is a lot better. It lets you do some of the setup in the command line so you can tell the site name and give it the login and the password all through it. It's by 10-up. They also have a bigger version if you're still using a vagrant. You probably should move away from that by now, but regardless I think they're both awesome and 10-up is a great company. They work in WordPress and do a lot of things. Docker is the tool I'm using, of course, look up WP CLI. I'm Jean Felice-May. You can find me on Twitter. Basically, it's the only one I probably keep track of. My website's there. It's nothing there. It's there to take up space. Hey guys, hopefully you enjoyed my can to talk. Have any questions? I'm willing to answer anything. If not, we can call today and I can take a nap. Since you've done the session before, how many people are developers you find use a Docker? I use it. I'm just curious. I don't know if anyone else for development. More and more now. So I moved over to Docker February. So I was really behind, but there was like plenty of developers. Yeah, there was a lot. Well, I just was curious in general. And do developers use Docker? I used to use server press. If you don't use Docker, take a look at it. It's not complicated. Hang on. Anybody, you guys use command line. Command line. All right. Get on command line before getting on Docker. Because to be told, when I learned command line, it makes things a lot easier and a lot faster. And it makes it easier to get into the Docker and get into some of these more advanced tools like the WPCI. Pretty much you can do everything you do with WordPress through the command line. That's the majority of the tool. The way I have it set it up is, I used dupianton. I create a transferable install. So I have already an install created with all the things that I want and I need. So I just copied. You just copied. It's basically the same procedure, but the only added value that I see over there is that it's actually online. I had bad experiences with local development or in the moment that it doesn't need to fail, it fails. And I'd rather blame somebody else for that. That's the way I see it. It works for you. That's why I believe in automation. You don't have to do it that way, but if you find a workflow that works, why not? The one nice thing about Docker, I think if you're doing plug-in when there are trouble shooting, I can stand up a site running 7.1 PHP or 5 or 6. It doesn't matter. I can simply tweak that file and just stand it up and troubleshoot there. If you're doing that, if you just have a live site and a staging site, then that's probably simple. Yeah, that's the biggest thing because I will notice, over for FIU, University of Florida International University, we run multiple instances of PHP. So we have like a 5.6, we have a 7 and a 7.2 and all these others. And the 5.6 will run fine, but then when we have to recreate that site between like 7.2, things are broken. So it's one of those things that like, okay, we can troubleshoot, we know why it's broken, we have to rewrite some PHP code or something like that. But if you're using WNGIN and you're keeping our clients on WNGIN anyways, that's the thing. It makes it easier. But I still would recommend learning command line. Yeah, it's well worth it. It was something I kind of fought over too, but when I got the grasp of it, it went by. It's a lot easier than people make it seem. Most people are like, oh, that's a lot easier. Any more questions? Make it easier, my gosh. What's your opinion of managing multiple WordPress websites with a plug and like WordPress multi or any of those? Do you find that cumbersome? It's a safe time? Are you worried about security? Like, give me an example. The other speaker this morning was talking about he manages multiple WordPress websites with plugins. I guess WordPress multi or something like that. There's main WP, there's manage WP, there's a lot of those tools. Okay, yeah, yeah. I don't know. I don't have any using plugins myself, but as they said, would you feel comfortable? I'm a hardcore developer, so I'm not a fan of using the like any of those tools. I do know of them, but not really by name because I just don't get into their environment. But I know people use it and College Engineering uses it, uses a tool like that. And they clone, they do clones of their sites. And for him, it makes it easier for him. That's his workflow. He doesn't do any of this. He just like clones it using that tool. But to me, it's like you're paying a company a lot of money for something you can do. Right. And, you know, it's, it's the cost value. It's the cost value worth it to you then go with it. If it's not, it wasn't worth it to me. I learned how to manage websites without it, things like that. On that topic, I use infinite, infinite WordPress. Oh, the WP, right? Yeah. And I manage quite a few sites with that. And it's free. Yeah. Works really good. I think you're managing a lot. It seems like a big time saver. That's the key. It's not, yeah, it's not, it's just a couple. But if you're, yeah, it's like, yeah, I manage it then I need it. Right. Because you can update everything in one shot. You can do back up everything with one shot. You can also pick and choose which one. You can install plugins on all. There was a plugin recently removed from the WordPress repository. And, you know, it's like, I got it like on 30 different websites, right? You can't go to each website. Well, you can, but that takes a while, right? And so, using this, I was able to remove it from all of the websites in one go. Is it secure? You know, trying your server? From everything I've read. Would it, if it was the one you have to have a server install of it too? I install, you got to install it somewhere. Right. And then you have it online. It can be online, but I, I install it locally. So I installed it on my development server. And then I can manage everything from there. I feel that's, you know, probably more secure. You can do user management through it. So if you have all those different sites with all the different clients and you have this developer that you've used for all these different sites and then you no longer work with the developer, you go into this one thing and you can get them out of all the sites at once. Okay, cool. So it's, it's, it's helpful for you. You still got to make sure you check everything when you do all the updates. You got to go in there and make sure everything's still working. So we still have to go to each site to make sure, like after we do updates or we remove our user and what we have to do and I know, we're talking to he left and he was like on 30 sites. So we had to remove them. For us, it was like in command line, we can just remove the user, but throughout 30 sites, but then we had to go to each site to make sure he was removed. Sometimes you just don't know. So you wrote a script to remove them from every site? Yeah, we have a script that connects with that WP CLI and WC CLI actually removes them. It goes through each site. Bash for that? Like a bash? Yeah, a bash script. Yeah, a bash script. Yeah, we use a lot of bash script. It makes the things a lot easier for us. But a WE infinite is actually one that I do kind of remember and I remember if you have to install it. I'm not sure how, I think at one point they had an issue, but I think they might have solved it, but once again, it's that value. And I think it's free? Free is the thing. They do have a premium version, but the premium version just allows like cloning, I think. Almost everything else is available. Like they'll do the premium, I think does automated backups and cloning and stuff like that, but I prefer to do that myself. What were some of the other ones that Chal mentioned? I mean, manage WP. Manage WP, main WP. Main WP, yes. High control WP needs a good one, too, for a software as a service product. Say that again, sorry. High control WP, it's also good if you don't want to do that. There's a lot of them. There's a lot of them. And it tells you how much of those tools are needed, so. The reason I do the infinite is because I like it on my computer. Yeah. Main is also so great. That's really easy to do. Oh, main cell phones. Yeah, I have no my server. I prefer that instead. What is it? Main WP. The main WP, yeah. Is that a paid one? I like paying for what I get, because I know I think there is free, but I went ahead and upgraded because it was a one-time. I don't have to repay for it every year. Ah, okay. There's a one-time thing. I like the... I'm not like, hey, if it's going to keep you around... See, I'm not always thinking that. At this point, the WordPress environment, it's most, everything's moving to subscription models, so it's like you're paying a monthly or yearly type of deal for something. But it's a one-time deal. Kind of have to worry about the main... I don't trust that for too long. Yeah. As long as they're still... Yeah. If they're still updating it... And it might not be a one-time thing anymore that's been on it for over a year. Yeah. I don't know. So, yeah, they more likely switched over. That's the problem with that model is that it switches to... Yeah. You know, yearly. No, they're stuck using it. I'm all about them keeping their jobs and updating the plug. Yeah, I'm all about that. I'm all about that, but I'd rather pay for a plug and then get what I get for you sometimes, just because I know that it's going to be taken care of. Yeah, it's going to be taken care of. Yeah, if it's a staple plug-in of mine, and not just a one-off thing, then, yeah. Exactly. I think even the universe that I work at, they want to see more paid plugins and slow us down from creating so many of them. It's like, yeah, we let you go. Who's going to maintain this plug-in? I don't know. You've got to figure that out. Don't let it go. Yeah, don't let it go. By documentation, it can only go so far. So, any more questions? I think that's my time. Guys, enjoy the rest of the workout.