Want to get more articles like this one? Join my newsletter

In DevOps

Why I’m building a WordPress serverless DevOps platform

Back in first year of college, my campus residence had a terrible internet connection. So I used a Windows server back at home to download games and movies on IRC. I’d go home every few weekends, copy everything to my laptop or burn them on CD-ROMs. (The old school USB stick!) I’d bring everything back to school and share with anyone.

It was my first experience using my knowledge of servers to do something positive for others. By then, I’d been toying with servers for a few years. I’d started working with them during my first summer job at sixteen. That first summer job also ended up becoming my first job after I graduated college.

There, I continued to do a good amount of Windows sysadmin work. This was before I became a full-time programmer. But, as you can see, me and servers go quite some ways back!

That said, my experience with servers isn’t that common. For many people, servers are something you dread. You pay people (like me!) or hosting companies so you don’t have to worry about them.

The issue is always cost. Expert help with servers is expensive. Managed WordPress hosting isn’t cheap either. You can always go with a less pricey shared hosting plans, but you often get what you pay for with those.

And, as I’ve written before, servers are the windows by which clients look at your work. It doesn’t matter how good it is, if your server is slow, your client will think you did poor quality work. So where does that leave you?

What if I told you that could run a WordPress site without a server?

No more servers? You must think I’m losing my mind! Well, not quite. But, as I’m often reminded, you need servers to run your code.

So what am I talking about then? Well, I’m talking about serverless. The name serverless is misleading because your code still runs on a server. There are just no more servers to manage.

This means you don’t have to worry about anything server related. There are no more system updates to install. No more web servers or databases to configure. All the things we tend to dread with servers don’t exist with serverless.

That’s because serverless replaces our server with services from a cloud provider like Amazon Web Services). All that you have to do is upload your WordPress code to it. The cloud provider will then take care of running it for you.

How is this different from a regular WordPress host?

You might be thinking, “That sounds a lot like a regular WordPress host.” Well, it’s similar, but there are significant differences which we’re going to go over. You’ll also get a better understanding of where serverless gets its name from.

There are no servers to pay for

First of all, with serverless, you also don’t get a server in the classic sense of the term. You’re not paying monthly for a server like you would with a traditional WordPress host. Instead, you only pay when the cloud provider runs your code.

So, if your site gets almost no traffic, you pay next to nothing. AWS has a very generous free tier so you might pay nothing for a while. But, for example, this case study showed a cost of $1.67 (minus the database) for 5200 visitors.

There’s still a database

I keep mentioning the database because, even if we don’t have a database server anymore, it’s still something we need. Cloud providers have databases as a service (e.g. Amazon RDS), but they’re expensive. The cheapest database on AWS is roughly $12/month. So that would bring the cost to about $14/month.

But you’re never limited to using one database per site. So you can split that $12 as many ways as you can. That means that, if, for example, you ran six WordPress sites from one database, it would only come down to $4/site/month.

Now, that’s much more reasonable! It still depends on how much traffic your site gets. But it’s a lot closer to how much you’d pay for if you did things yourself. (I pay $5/month to host my site on DigitalOcean.)

It’s harder to estimate cost, but it’s cheaper

That said, this whole example highlights the issue with this type of “pay-per-use” pricing. It’s that you’re not paying a fixed amount each month. With a host, you get billed the same amount each month. You don’t get any surprises.

The drawback with most managed WordPress hosting companies is that they charge you about $25-30/month for 25,000 visitors. The same amount of traffic would cost you $8.33 based on the case study estimate. Even with a database, that would still only be $20/month.

So, if you ever had a $25 AWS bill, you’d be able to support a lot more visitors than you would with managed hosting. For the same amount, you’d probably be paying closer to $100/month. So the cost advantages go up a lot more quickly as your traffic grows.

Increased security

Price is, without a doubt, the most important thing people look at with hosting and servers. But most of us want more than just cheap hosting. We also want them to be secure. No one wants to wake one morning to find that their client’s WordPress site got hacked overnight.

Well, that’s one other thing that serverless can help with. That’s because you can’t modify code that runs on a serverless platform. This reduces the attack surface that someone can exploit to infect your site.

You’re still vulnerable to other attack vectors like SQL injection. But gone are the days where you have to comb through files to clean up a WordPress installation. And that’s great news for anyone who’s had to do that before! (Trust me, it’s not fun!)

Your site can’t go down

Much like we never want our WordPress site to get hacked, we also never want it to go down. It doesn’t matter how much we pay for hosting. We expect our WordPress site to stay up at all times.

This is again where the lack of servers in the classical sense helps. With serverless, if your site worked yesterday, it’ll still work in a year. Well, that’s as long as you pay your bills! But you can sleep easy knowing that a background update won’t break your server.

It’s also the same thing with traffic. No one likes having their WordPress site go down because they’re getting a ton of visitors. If anything, that’s when it’s most critical for it to stay up. You wouldn’t want your client to lose sales because their site couldn’t handle a surge in traffic.

Well, that’s another thing that serverless can help with! With it, your WordPress site can scale to support thousands of visitors in seconds. (Just make sure your database can handle it!) And once these visitors leave, it’ll scale everything back down. (It’s pretty magical.)

Servers are just one part of the equation

I’m sure that it’ll come as no surprise that I’m pretty excited about serverless! It’s not going to be for everyone, but it solves some very specific pain points with servers. That said, a lot of us know that there’s more to managing a WordPress site than just the server itself.

If you want to have a fast WordPress site, you need to do a lot more. You want to use a content delivery network, and different forms of caching. You need a database that’s configured properly and so on.

But it doesn’t stop with just performance either. A lot of us want environments like testing, staging and production. (Or, if you’re pushing things even further, a new environment for each pull requests!) On top of that, you want to be able to deploy code to these different environments.

And everything needs to work together: the servers, the performance optimizations, the code deployment. That’s why, at this point, we’re really talking more about DevOps than just systems administration. But this is what I do for clients (on top of coding) and it’s something that I’m good at.

I want to give you my superpower

When Taylor Otwell announced Laravel Vapor, the DevOps nerd in me was like, “Damn, that’s so cool!” It’s also why I spent some time talking about serverless. It’s just got some really amazing potential.

But that’s not what blew my mind about it. What really blew my mind was that it was a platform that gave you the ability to do everything I know how to do. It allows me to share my DevOps and sysadmin abilities with you.

That’s why I started building Ymir

Ymir is a WordPress serverless DevOps platform like Laravel Vapor. With it, you’ll be able to leverage the power of AWS like I would. And, trust me, that’s pretty awesome!

Like Laravel Vapor, Ymir isn’t a WordPress host. You will have full access and control over everything. You’ll also be responsible for your AWS bill. (There’s no mark-up from me.)

That said, you should be able to centralize a whole bunch of plugins and services. No need for a separate caching plugin, content delivery network and deployment service. It’s all built so that everything works great together as well as with WordPress.

If that sounds amazing to you, head over to the Ymir site and check out the demo video.

Why am I talking about it now?

Being able to record that demo was the milestone that I set for myself to announce the project. That said, Ymir isn’t quite ready yet. I’ve been working on it for 8 or so months now, but it’s a massive project with a lot of unknowns.

I don’t have a timeline for it either. The pandemic has given me a lot of time. So I feel pretty confident that it’ll be out sometime this year.

But I don’t want to wait until I launched it to start talking about it. There’s already a lot I want to share with you because it’s such a big project. I’ve been doing cool things with AWS, Laravel, Symfony and WordPress.

So, if you want to keep up on my progress, you can sign up for updates here.

Creative Commons License