Joe Casabona: This episode is brought to you by our great sponsors. BoldGrid works as a suite of plugins designed to help you create WordPress sites faster and easier than ever. BoldGrid will improve your workflow by providing direct access to free themes, page templates, photography, design elements, forms, galleries, and much more right from your dashboard. And the BoldGrid page builder allows you to easily drag and drop and edit the content as you see fit all with that having to use shortcodes. To learn more, head over to builtpodcast.net/boldgrid. Thatâs builtpodcast.net/boldgrid.
Starting a new project? Looking for a better hosting platform? Pantheon is an integrated set of tools to build, launch and run websites. Get high-performance hosting for WordPress sites plus a comprehensive toolkit to supercharge your team and help you launch faster. On Pantheon, you get expert support from real developers, best-in-class security, and the most innovative technology to host and manage your websites. Spin up a new site in minutes with a free account. You only pay when you go live. To learn more, go to built podcast.net/pantheon. Thatâs builtpodcast.net/pantheon.
And now, on with the show.
Hey, everybody. Welcome to another episode of How I Built It, the podcast that asks âHow did you build that?â Today, my guest is Jonathan Kay of WP Stagecoach. Jonathan, how are you doing today?
Jonathan Kay: Iâm doing really well. How are you doing?
Joe Casabona: Iâm fantastic. I always, this has been a trend for the last few episodes. I always forget how to pronounce names or never ask how to pronounce names. so Iâm glad that you had an easy one. I hope I pronounced it correctly.
Jonathan Kay: You did just perfectly.
Joe Casabona: All right. Great. Does anybody ever say, like, call you JK? Like just kidding, or anything like that?
Jonathan Kay: No. I used to go by JPK back when I ran a computer lab, but in general, just Jonathan. Or, Hey, you.
Joe Casabona: Gotcha. Thatâs fine, right. Like, call me anything you want, as long as you donât call me late for dinner. I think thatâs [crosstalk 02:29.18]
Jonathan Kay: Yeah, but people donât get that as much these days.
Joe Casabona: I know, I know thatâs âcause like, I donât know, text me for dinner. I donât know. I donât know what itâd be like.
Jonathan Kay: You donât have the kind of sit-down dinners anymore.
Joe Casabona: Yeah, I know which is like, thatâs my wife and I have agreed that when we have kids, like, weâre definitely going to do that. No phones at the dinner table, like very traditional.
Jonathan Kay: So good luck with that.
Joe Casabona: Thanks. Yeah, we say that. We donât have any kids yet, so weâll see what happens. But today weâre talking about WP stagecoach, right? So, why donât you tell us a little bit about you and your product, and how you came up with the idea?
Jonathan Kay: Well, my background is in systems administration. Iâve been doing that since the mid-nineties with Linux and Unix servers. A little over 10 years ago, I started doing this freelancing and itâs been fantastic for exposing me to lots of new environments and new problems that need solving. And itâs really been fun to have new challenges come up and I can write something that fixes this problem and I can read something that fixes this problem. And itâs really generally very rewarding to be able to do that in a very, not always timely manner because problems are complicated, but you know, itâs a very small environment and itâs fun to be able to solve a problem like that.
Several years ago, my partner started doing WordPress theme development and because I run a whole bunch of servers, I set up hosting for her and a development environment for her. And to put a long story short, I wrote a product called WP Stagecoach. And what it does is the plugin that you install on your WordPress site. And once you install it, you sign in, you click a button and it goes through and it makes a copy of your website and transfers it to our servers and sets up all the DNS, all of the tarring, all of the database, it does all of that for you. So you just get to click a link at the end and bam, thereâs a copy of your website for you. You can go play with it, you can go break it, you can go have fun with it. You donât have to worry about it messing with your life sites. Itâs a great, great thing to have. And once youâre done editing it, and playing with it, breaking it and youâre happy with how it looks, you can go back to the plugin on your live site, click another button. It says âimportantâ, and it brings all the changes back for you.
Joe Casabona: Thatâs, I mean, thatâs fantastic. So basically itâs a plugin that spins up a staging site for like a staging site in a box, right?
Jonathan Kay: Yes.
Joe Casabona: Which is, itâs something that a lot of people, a lot of freelancers I will say, and Iâm generalizing because I, when I was a freelancer, I didnât do this very often and it wasnât easy. When I was a freelancer either, a lot of freelancers may skip the staging part, right? Or may not do it proper like I used to have this one local install that was just whatever site I was working on at the time. That was the, it was the staging site for that.
Jonathan Kay: Yeah, Iâve seen that before. No, itâs a hard thing to do quickly, especially. And given that my partner was a freelancer and we hung out with a lot of freelancers, other freelancers, or developers, thatâs what the initial target audience was for. So the basis for the idea came from 2013, where WordCamp here in Seattle, I was talking with, you know, just people as you do throughout WordCamp, then I had more than half a dozen people ask, âWhat do you do for staging?â And I said, âWell, you know, myâŠâ I explained, my partner has these, you know, does this development and I have these servers for her. And rather than, you know, spin up a new WordPress installation, every time she had a new client, I wrote a script, you know, so that it wasnât your installed WP, the name of the WordPress site you wanted and started a whole bunch of scripts that did a whole bunch of things for her, you know, creating sites, deleting sites.
When we moved into production, I wrote a script to handle that. If we needed to move it to a different server, you know, for a different environment, I wrote a script to do that. So I had all of these scripts that I had written to run on our personal little infrastructure. And so I explained this to other people and everyone who I talked to said, âI need that.â And you could see their eyes get big. And they started drooling and I said, âHuh! This might be something I could do.â You know, take these and change them and release them publicly.
Joe Casabona: Yeah, thatâs awesome. So this actually segues perfectly into the second question I usually ask, just which is what kind of research did you do? It sounds like going to WordCamps was the kind of market research you did, right?
Jonathan Kay: That was kind of the final straw that made me say, âOkay, I really should do this.â Like I mentioned, weâve hung out with a lot of freelance developers as well before this. And just you kind of, at that time, the WordPress world staging was a really big deal, you know, WPEngine had it, but I think they were about the only one that did. So, you know, everyone needed it and no one had it. So it seemed like a great opportunity to take these things that I had written for a very small confined environment and open them up to the world at large. And that presented a lot of problems but, I can get into that later.
Joe Casabona: Gotcha. I mean that thatâs great. And I think itâs something that a lot of, you know, itâs certainly something that I donât know anything about, right? like server administration, I really just need to push a button and have a new thing thatâs exactly like the current thing.
Jonathan Kay: Yeah.
Joe Casabona: So thatâs great. And you mentioned that it spins up a new instance on your servers, Is that right?
Jonathan Kay: Thatâs correct.
Joe Casabona: Gotcha. Maybe we can touch on some of the challenges you would have had spinning it up on whatever hosting environment your user had, right?
Jonathan Kay: Yeah. Basically, you have, as a developer whoâs written a plugin to run on someone elseâs server or website, you have almost no control over anything there. Youâre at the whim of the web host. You know, if a web host has really, really slow IO, itâs going to take forever in a week to spin up the site because you have to both write and read, and write the contents of the Website. You donât have any control of how over, what goes in and out of the database server. You donât have any control if you break something badly enough, you can destroy the live site, which is a big thing I wanted to completely get away from. Itâll take some work, but you could do it. And so I decided pretty early on that running them on my servers would give me all of the control I needed to be able to serve, you know, good quality, you know, speedy, reliable staging sites and track all of the changes that I needed to make imports possible. And that would be something thatâs again, quite hard to do in a timely manner or a reliable fashion in someoneâs life. You know, $3 a month shared hosting.
Joe Casabona: Yeah. And thatâs a really great point, right? You could be dealing with, I mean, 25% of the web, you could be dealing with, youâre probably actually dealing mostly with those smaller accounts, right? Because like, as a, I have like a go geek SiteGround account and they have staging servers, right? But DreamHost like a single dream host account might not.
Jonathan Kay: Right. And we actually have a fair number of customers from other hosting companies that have their own staging solution, but the flexibility of ours is generally higher than theirs. And so we have quite a few customers from those people who prefer our staging solution to the built-in hosting one.
Joe Casabona: Man, thatâs great. And weâre going to get into the details of why in a few minutes, but what I want to ask you next about, kind of, youâve talked to freelancers, you went to WordCamps and talked to some hopeful customers that are saying they need this. Do you talk to any other business folks? Are you part of a mastermind group? You know, how do you make the, who do you talk to, to help you make the business decisions?
Jonathan Kay: I didnât actually talk to that many people about it. Like I mentioned, Iâve been running my own freelance business since 2006. And so Iâve talked to a lot of mostly small and medium-sized business owners in the course of my work with them about what their expectations are, what they need and want. And as far as translating what the, you know, small business owners need from a product, I thought it was pretty straightforward to say, âOkay, I have some reasonable assumptions I can make about what is the correct thing to do for a given situation.â You might know data integrity is very high, I know security is very high, and these were things that I built into the very basic basis of WP Stagecoach. Mostly I just thought everything out very thoroughly. I know it was very meticulous about how I am going to create this and I didnât get a whole lot of feedback from, you know, kind of, as you say, other business people. Mostly it was, you know, what do I need out of it? And what do customers need out of it?
Joe Casabona: Gotcha. And I mean, so thatâs like the stuff you already knew, which has maybe the best kind of research, right? The things that youâve, the experience that youâve gained over the years of freelancing is the thing that drove you that was kind of the main driver and thatâs absolutelyâŠ
Jonathan Kay: Thatâs a fantastic way to succinctly wrap that up.Thank you.
Joe Casabona: Okay. Well, thank you. I mean, I appreciate that. So cool, very cool. Letâs talk about the fun bit, right? How did you build WP Stagecoach? And this could be like tools, coding methods, design decisions. Whatever you want to talk about here is fine by me.
Jonathan Kay: Well, design decisions are not my forte, so Iâm really glad that I had my partner in a fantastic design agency to handle all of that. But as far as the technical stuff, thatâs my forte. Thatâs always been my, you know, I love the nuts and bolts of how things work, not just with computers, but with the world at large. Itâs just a fascinating thing to look at something and think you ponder through how exactly does that complex mechanical contraption works? And I can usually come up with a pretty good idea. Itâs not always right, but a good idea of whatâs what makes it work.
Joe Casabona: Nice. Have you ever been to Disneyland or Disney World?
Jonathan Kay: Yes, but I was pretty young. I donât remember it.
Joe Casabona: You should go back as an adult because my favorite thing to do while Iâm there is figure out how they make some of their rides work.
Jonathan Kay: Interesting, okay.
Joe Casabona: Yeah. So, sorry to interrupt you though.
Jonathan Kay: No, no. It would be interesting. Certainly, yeah.
So as I mentioned, we had an infrastructure with these shell scripts that I had written to make my partner and our subcontractorsâ lifeâs easier. And after this WordCamp, I literally came home and made a copy of all of them and put them on a new server and kind of rewrote them so that they didnât need command line input. I wrote them, read with them so that I could attach them to a web server and the webserver would take commands and run the scripts. And then I wrote just a really tiny shell of a plugin for WordPress that went and talked to the webserver setup. And that was the basis of it. That was just, you know, a really rewarding, satisfying, quick, and easy thing to do that said, âOkay, this may be complicated but itâs not impossible. This is something I can do.â So I threw all that away and started over from scratch. And, you know, again, like I thought through, Okay, what are some of the common pitfalls Iâve seen over the years of, you know, problems with security, with reliability, with extensibility. And I really put those three things, at, you know, the top of everything. Iâm making every decision I made while building Stagecoach. So I, pretty much all of the aspects of how it controlled everything is written into or controlled by a single API server or you know, a group of servers if I need. Those are really locked down, you know, they donât talk to as many people and the infrastructure that they talk to will talk to no one except the API servers. So that way, that kind of takes a big load off of worrying about, you know, script kitties and port scanning and all this sort of stuff.
Joe Casabona: And just a quick sidebar, right. Script kitty is essentially somebody whoâs writing like a malicious kind of, sort of script, right?
Jonathan Kay: Typically script kitties are not even the people that write the scripts. Theyâre the kids who go on, whereas sites and, you know, find, you know, leaks or hacking script number 512 and they download it and they run it. And when nothing happens, theyâre like, well that wasnât any fun or they crash a whole bunch of websites and go âweeee!â.
Joe Casabona: Gotcha. Cool, very cool.
Jonathan Kay: So throughout the, both the conductor, which is what I call the API server because it orchestrates everything in a stagecoach environment, it does a lot of air checking with both the data thatâs given and the data it gives back out so that, you know, you always know, or it always knows that itâs working with reliable and good data.
And again, when it talks to the staging servers, Which is where all the staging sites are hosted. Those again, the staging servers themselves, will, you know, make sure that all the data theyâre receiving is good and all of the data theyâre giving back is good and reliable. And if something goes wrong, it throws up a flag and says, âhereâs a problem. Hereâs how I ran into it. Hereâs what I was working on.â So that makes looking into problems a lot easier and it makes a lot of time I can. If it does happen, an error does come up, I can write an exception for that and say, âOkay, well that didnât work. So letâs try this.â And I canât write a case for every single possibility, but there tends to be again, after running this for a while, I found that there tend to be, you know, a handful of problems that we run into and I can pretty much write a script or a solution to each problem that comes up from that.
And as far as extensibility goes, I had no idea what sort of traffic we were going to get when we launched. And again, given my clients, I in the past with my freelancing, Iâve had, you know, sites that get, you know, tens of thousands of hits every hour. And so I wanted to be prepared for whatever might come. So extensibility was a really big thing on my mind. So each part of the infrastructure is ready to be, you know, extended. Itâs very modular, you know, you can take out a piece, replace it with a new piece or you know, a dozen new pieces if need be. So, you know, thatâs sort of non-intervention with my goal as much as possible. You know, I want my servers to do my work for me, and thatâs always my goal as a freelancer and I really want that to be my goal here.
And kind of ongoing work that I have to do for all these, you know, for all the infrastructure. Like I think I mentioned we do have a bunch of staging servers and so those do require maintenance. One of the things that we do with all the different staging servers is one balance load. But two, we try to provide the best closest matching environment to the live site. So, you know, if youâre running on a patchy 2.0, with my SQL 5.6, you know, we have a staging server that has that and PHP 5.3 or whatever. So we try to make sure that thereâs a staging server that matches your live site as closely as possible. And thatâs one of the things that while itâs creating or while the live site is going through the process of creating the files that are then transferred to the staging server, it talks to the conductor and says, âHereâs what Iâm runningâ and the conductor says, âOkay, Iâm going to go check.â You know, this version PHP is my SQL, this Apache, and then picks a staging server based on that and routes it all through there.
Joe Casabona: Man, that is fantastic. Like that was, I was wondering about that, right? Cause I mean, if someoneâs running PHP seven, obviously putting them on a, letâs say 5.4 servers is not going to work, right? So, or maybe vice versa.
Jonathan Kay: Both ways.
Joe Casabona: Definitely vice versa. Yeah. So thatâs really cool. So you have like a set of staging servers, essentially that youâre at. And, so forgive my line of questioning here if itâs like not the right terminology or whatever, but I assume these arenât physical boxes, right? Are these the virtual machines that you have running?
Jonathan Kay: They are virtual machines, yes. But again, given my background in freelancing and working with most local companies here in the Seattle area, I do have a physical rack at a fantastic data center. A bit north of town and thatâs where the vast majority of this infrastructure lives.
Joe Casabona: Cool, very cool. So that man, that was a lot of really great information, especially for people who, you know, just want to click a button and it magically has a box spun up, right? That was, or at least I found it very interesting. And I kind of like the whole, the full-stack as people say. So, we talked a little bit about this but maybe you could talk about maybe the major milestones, as far as the transformation has gone, right? Like, what is the big things that have changed between your first version of WP stagecoach and now?
Jonathan Kay: Well, it depends on what you consider the first version. You know, the alpha version was the first version I released to the public. And that was the second major rewrite or rewrite from scratch. And that was where I had a lot of the infrastructure concepts in place. You know, I had the conductor, I had the separate staging servers and, you know, I had kind of worked out how I wanted things to happen. You know, the staging server uploads directly to, or the live site directly upload the files directly to the staging server so that, you know, for example, if web hosts want to run, you know, a staging server in their own data center, it doesnât have to transfer the files to the conductor and then back to the, their own server. So I had gotten most of that. Most of that is written out in the alpha plugin.
And the beta plugin was again, a rewrite where it was just trial and error. You know, I saw a lot of problems that stemmed from choices I made in Alpha. They tended to be around the reliability of web hosts, the alpha version. One of the things that PHP can do is a command called âexecâ and basically, it says âPHP, go run this command directly on the Linux system.â So for things like Tar and your, my SQL dumping the database, thatâs incredibly, incredibly fast and made for, or a much better experience rather than you relying on PHP is Tar and going through and dumping the database by hand with PHP.
Joe Casabona: Right. You might also avoid like a timeout issue as well, is that right?
Jonathan Kay: Yeah. And thatâs actually a really good one. I believe I did implement a step-based system in beta where you know, in the first step, it goes and talks to the conductor and figures it out. You know, where itâs going to go then it dumps the database. Then it finds all the files that need to back up or transfer. Then it tars them up and then it transfers them and then talks to the conductor again and says, âEverythingâs there. Go make this happen.â And then kind as things have progressed, Iâve had to break up certain parts of that into multiple smaller steps.
Again, we have seen, probably some of the worst of the web hosting on the web running this service. Itâs really interesting seeing, you know, Apache one, three servers still out there in the wild and it just isnât for everyone. And Apache three went out of maintenance like hasnât been supported in 10 or 12 or 14 years is a long time.
Joe Casabona: Yeah. Wow.
Jonathan Kay: So most of the changes have been based on issues that come up around slow or unreliable live production servers, web hosts. And thereâs nothing I can do to control those. I just have to be responsive or reactive and work around the new challenges they present.
Joe Casabona: Gotcha. Cool. So, and thatâs very, very interesting to me. Itâs something Iâm definitely not, Iâm definitely glad Iâm not doing it because I donât have the mind for that. But maybe with the last or banging up against time and maybe what the last couple of minutes we can talk about, you know, big plans for the future. And then I always end with the same, the same question too, so.
Jonathan Kay: So, for the future, Iâm working on a couple of new workarounds for web hosts and thatâs definitely going to be a continuous process. But thereâs a big one that Iâve been working on for a while.
Joe Casabona: Gotcha.
Jonathan Kay: And also, at some point, I would like to start adding features to kind of differentiate the different customers weâre going after. We, you know, developers versus freelance developers and freelancers versus non-devs versus, you know, things like web hosts, if they all have their own unique set of packages or set of features that they, you know, help them out.
Joe Casabona: Gotcha. Gotcha.
Jonathan Kay: Now, at the risk of upsetting, maybe a couple of my sponsors, whatâs the toughest web host to work with? I think for all of them, it comes down to a server-by-server basis. You know, every single web post has that one overloaded server and whether they realize it or not, you know, everyone, the web hosting industry is very, has very small margins they have to push their service to the limit. But you know, from what Iâve seen, a lot of them do tend to neglect IO, you know, disk input-output as one of the things they tend to skimp on.
Joe Casabona: Gotcha.
Jonathan Kay: And I would love to see that turnaround. I was hoping with SSDs becoming so commonplace. Weâd see less of that, but I know a lot of them are still running on network sands, storage tech, storage area networks.
Joe Casabona: The hard drives with physical moving parts, as opposed to not so much.
Jonathan Kay: As opposed to SSDs, which are just flash memory, yeah. So Iâd like to see what it says to use in production.
Joe Casabona: Gotcha. Cool. Well, that was a very diplomatic answer and I appreciate that. So the last question I like to ask is, do you have any trade secrets for us?
Jonathan Kay: Not really trade secrets per se, but just the overwhelming need for all developers everywhere to follow best practices and standards. Weâve seen so many problems, themes, and plugins that are a problem because they donât follow the best practices. You know, storing all of your data as transience just is not a good idea. And you know, those best practices and standards are there for a reason. You know, they make your plugin or theme transferable. They make it work in a wide variety of environments and they make transferring around a lot easier. So follow those standards, follow those best practices.
Joe Casabona: Awesome. Well, Jonathan, thank you very much for joining me today. I really appreciate you taking the time.
Jonathan Kay: Itâs been an absolute pleasure.
Joe Casabona: Hey everybody. I want to tell you about a new book I wrote with my good friend, Matt Medeiros of Matt Report, called the Podcast Starter Kit. Itâs a QA-style book that tells you exactly what you need to get up and running with your own podcast.
Iâve had lots of fun over the last several months with How I Built It and I want to share what Iâve learned with anybody looking to start their own podcast.
In the book, Matt and I try our hand at answering 23 questions that you need to ask yourself before you get up and running. We also include several resources, our favorite equipment, and a checklist at the end. Head over to the podcastbook.com to check it out. Itâs only $24 and itâll save you hours of time researching the right tools, where to upload your podcast, how to run a good interview, and a lot more. Thatâs the podcastbook.com.
Thanks so much for listening, and thanks to our great guests and fantastic sponsors. If you liked the show, please rate it and subscribe on iTunes in Google Play or whatever your podcast app choices. If you have any questions, be sure to reach out at howibuilt.it.
And finally, until next week, get out there and build something.