If you’re a WordPress user and would like to get into developing your own themes and plugins, or if you’re an experienced WordPress developer that wants an expert’s opinion on the state of WordPress Development, then you need to check this out. As Developer Advocate at WP Engine, Jason Cosper gets to work on all sorts of cool stuff involving WordPress. Whether it’s theme or plugin development, WordPress developer tools, local environment development, PHP, or any other topics related to the development of WordPress applications, Jason is the authority. At WordCamp in Orange County, CA, I got the chance to sit and chat with him about WordPress development in 2017.
Web Hosting Cat: Tell us about your role at WP Engine as Developer Advocate.
Jason Cosper: What I get to do on a day in day out basis is, I get to talk to plugin and theme developers about how their code could work better on our platform and how our platform could work better with their code. But, basically I get paid all day to talk about WordPress. That is my function. And I don’t know how I’ve managed to luck into such a role, but to be able to nerd out about WordPress for my day to day thing, I’m incredibly fortunate.
WHC: What’s the best way to get started as a WordPress Developer?
JC: Honestly, to get started in development there are a few courses online that are really fantastic. Treehouse has a good WordPress Development course. I think they stopped updating it, but it’s still recent enough that it’s worth checking out if you have a Treehouse account. Know the Code—they have another beginner’s development tutorial. But really just kind of diving in and learning, initially just general PHP, and then kind of diving in and learning plugins or themes—whichever interests you more. And [then] sort of hanging out on the forums, getting some questions answered.
WHC: Is it easier to start off developing themes or plugins?
JC: I have a plugin that I wrote that is probably 25 lines of code, 30 lines of code. A theme is a little bit more involved. You have to start dealing with multiple files, things like that. If you look at the Hello Dolly plugin which comes with every install of WordPress, the whole reason that’s there is so you can get started with WordPress development. So if you want to edit Hello Dolly and turn it into Big Lebowski Quotes or if you want something else, change that around, you can start experimenting with that and it’s a lot easier to work through that.
WHC: What are some of the considerations to keep in mind for responsive design?
WHC: What are your thoughts on HHVM vs PHP7? Which do you recommend?
JC: I appreciate what HHVM and the team at Facebook has done to make PHP faster. It’s just basically turned into a space race. At this point, I think that PHP is the better choice, only because just recently they are not running tests on HHVM for new versions of WordPress. So when a new version of WordPress is released, they test on PHP versions back to 5.2. So 5.2, 5.3, 5.4, 5.5, 5.6, and now 7, they were also testing to HHVM. The HHVM test always had a couple little bugs, quirks, failures, and they were like, “You know, PHP 7 is good enough. We’re not going to bother testing for HHVM anymore.” So, if it’s good enough for the WordPress core project, it’s good enough for me.
WHC: Being able to develop in a local environment is obviously important. Can you talk about the Valet project and some of the advantages of using it for local WordPress development?
JC: I really think Valet is exciting. I use a number of different development environments. I use a Vagrant for my local development. I use Docker. It’s about using the tool that’s right for what you need to do. When Valet is installed on your system, it is always running in the background. When it’s running just idle, it takes up only 7MB of RAM. Compare that to [when] you load up a Vagrant in the background; half your RAM is gone. And you’re working on it and it’s going great, but then all of a sudden you need to hop on a Skype call or you need to get on a Google hangout or something to talk with your team. And, between Google hangouts and your Vagrant, all of a sudden your RAM is just gone. Valet is kind of a scratch pad. That’s how I see it. If you need to do something quick and dirty and get it done, Valet is my preferred method for doing that.
WHC: What are some of the features that WP Engine offers that WordPress developers can really take advantage of?
JC: We have just actually added a way to label your installs and categorize them. So effectively, if you’re running a single account with 10 or 20 or however many installs you have, say you manage to mix business and personal, and you have a couple personal sites on your plan where you’re reselling or you’re hosting for folks. You can actually tag and say “these are my personal sites”. Also, on top of that the tagging also allows you to label a particular site as a development site [or] a staging site. Sometimes people want to stage their site in a closer to live environment. The workflows that we’ve managed to put out now will let you have an actual staging style production environment you can put something into before you roll it out.
WHC: What does the future look like for WordPress Development?
It’s really exciting to see the applications that people are going to manage to build for this. I know that Human Made makes an app for digital nomads that roam around. They can check in and chat and all this other stuff—and WordPress is the backend for that. That’s amazing. The fact that here’s an iOS app and you install it on your phone, as far as anyone knows, it’s just an iOS app. But it’s WordPress underneath! If you’d told me five, ten years ago that WordPress is going to be on iOS, I would have been like, “For what? Updating posts on iOS?” But now, the possibilities are almost limitless.