What is serverless and how is it different from hosting WordPress with a server?

When it comes to describing what Ymir is, WordPress serverless DevOps platform is the best way I’ve found to describe it. That said, it does feel like I’m playing buzzword bingo whenever I say it. While DevOps is a better understood term now, this isn’t the case with serverless.

The first thing someone thinks about when they hear serverless is, “Oh, there’s no more server. How does it work then?” This is a completely legitimate question! It’s also why a lot of us just think it’s a terrible marketing term. It feels like someone is trying to sell you snake oil.

But this is the term we got, and it’s not going to go away. So we might as well learn what it really means! Is it all marketing hype or are there some really exciting things about it? And most importantly, how does it change how you host a WordPress site.

Are there servers with serverless?

Ok, so let’s deal with the elephant in the room. Are there servers with serverless or not!? The answer is that, yes, there are still servers somewhere when you use serverless.

Serverless is a marketing term used to describe functions as a service. Functions as a service are a form of “on-demand” computing. You upload code to a cloud provider and it runs it in response to an event. (If you want to learn more about this works with PHP, you can read about it here.)

The reason serverless caught on to describe functions as a service is due to how I described the service:

You upload code to a cloud provider and it runs it on-demand in response to an event.

You’ll notice there’s no mention of anything server related. That’s because functions as a service abstract away almost all server considerations. You don’t have to worry about hardware, bandwidth, scaling, security updates, etc.

This is where the term serverless came from. It’s not that there isn’t a server somewhere. It’s that it’s outside your sphere of concern. There’s no server that you’re responsible for. (Thanks Mike Healy for the great description!)

Isn’t that the promise of WordPress hosting?

One of the main reasons we pay for hosting (especially expensive hosting) is because we don’t want to worry about our server. In fact, most top tier hosts don’t mention anything server related in their pricing tiers. It’s mostly page views, bandwidth usage and disk space.

But that’s not true in practice. There are server considerations that are there, but hidden from you deep in their pricing page. (Or a few clicks away.) Most hosts limit how many php workers a plan can have (especially important with WooCommerce), how much RAM you can use, CPUs, etc.

Behind the scenes, your WordPress site still has a server as a single point of failure. If you get more traffic than your plan can handle, it’ll go down. Unexpected maintenances and outages can still happen. This obviously varies a lot from host to host. But it’s common enough to remind you that there’s still a server there and you have to worry about it.

The serverless difference

This is where hosting WordPress with serverless starts to differ from WordPress hosting with a server. With serverless, all these considerations don’t exist. There’s no single point of failure, there are no server resources or scaling problems to consider (this is why it’s the ideal platform for WooCommerce), there are no outages or maintenances.

Once you uploaded your code, it’ll run essentially forever. If it worked yesterday, it’ll work tomorrow. There’s no server to hack, no server to upgrade or any sort of maintenance necessary.

The only thing you need to do is pay your cloud provider bill.

And that’s the difference hosting a WordPress site with serverless. It’s the peace of mind that you get from knowing there’s truly no server to concern yourself with at all. To some (like me), this peace of mind is priceless.

Servers aren’t going away

Now, this isn’t to say servers are going away. Servers, if you combine them with a server management tool like GridPane or SpinupWP, can be quite inexpensive and easy to maintain. Because of its on-demand nature, serverless is cheaper than premium hosting, but not as cheap as a $5/month DigitalOcean droplet.

There are also technical differences. If you’re used to being able to just FTP to a server or update plugins and themes from the dashboard, you can’t do that with serverless. If you want to make changes, you need to deploy them. (Nothing unfamiliar if you use some hosts like Pantheon.)

So it’s not exactly the same as just saying, “Well, I can do everything I did with a server, but without the worry.” In a lot of cases, you can have your cake and eat it too, but not always.

Sometimes you have to evaluate tradeoffs. Much like you would evaluate any WordPress hosting solution.

Published
Categorized as Opinion

The serverless revolution is alive and well in the PHP world

A few months ago, there was an article that discussed the current state of serverless computing why it fell short on its promise. People like Jack Ellis of Fathom Analytics chimed in about it on Twitter. There have been some incredible serverless breakthroughs in the last two years. And because of those, serverless has really grown in potential as opposed to stalled.

Now, this article will focus on the impact of these serverless breakthroughs for running PHP on AWS Lambda. I can’t speak for other programming languages. That said, some things we’ll go over should apply to them as well.

Published
Categorized as Opinion

How much does hosting a blog with AWS Lambda cost?

One of the major challenges of using Ymir to host a WordPress site on AWS Lambda is estimating cost. AWS uses usage-based pricing for a lot of its services. This makes calculating the cost of hosting a WordPress site on AWS challenging.

I’ve been running my personal site on AWS Lambda for a few months now. This has given me a few months of data on the cost of host a WordPress site using Ymir. While this is just one example, it’s still an excellent opportunity to look at the real world cost of using AWS Lambda to host a WordPress site.

How serverless helps keep your WordPress site secure

Anyone who manages WordPress sites knows how critical it is to keep them secure. Every day thousands of sites get hacked. The consequence of that are often disastrous. They range from lost income to Google blacklisting the WordPress site.

WordPress itself has always been very secure. But we never use WordPress in a vacuum. We install themes and plugins. We need to host the WordPress site somewhere. All these are potential attack vectors that someone can use to hack your WordPress site.

Because of its nature, serverless PHP makes a lot of these attack vectors irrelevant. This is another reason why it can be a great way to host a WordPress site. (Besides the ridiculous scaling potential.) It doesn’t matter whether you’re using Ymir or not.

But how can serverless PHP can help keep your WordPress site secure? Well, the best way to understand is by going over serverless PHP architectural elements and how they affect these attack vectors.

Published
Categorized as Technology

Serverless WordPress architecture on AWS

Serverless PHP is a new exciting technology that has the potential to remove a lot of the burden of hosting PHP applications. One type of application that has the most to gain from serverless PHP is WordPress. Serverless PHP eases the burden of scaling WordPress while offering the same performance benefits that you’d get with a top tier host.

To understand how serverless PHP works with WordPress, we’ll look at the current state of the modern WordPress server architecture. This architecture has evolved a lot over the last decade. (You can read more about it here.) Gone are the days of just hosting a WordPress site with an Apache server! There’s a lot more to hosting a WordPress site now.

The good news is that hosting a serverless WordPress site looks a lot like it does with a modern WordPress server stack. The big change is that you’re going to replace a lot of the architecture components with services from a cloud provider.

Now, the services that you’ll use and how they fit together will vary from one cloud provider to another. With serverless PHP, the most popular cloud provider is AWS. That’s why we’ll focus on serverless WordPress architecture on AWS.

It’s also worth noting that this is the same architecture that you’d get using Ymir. The only difference is that Ymir takes care of managing it all for you. (That’s also why it’s a DevOps platform.) But if you don’t mind putting all the pieces together yourself or with the help of another tool (such as the serverless framework, this article will help you achieve that.

What is serverless PHP and how does it work?

Serverless computing is a new cloud computing model centred on Functions as a Service (FaaS). A serverless PHP application is simply a PHP application that runs on one of those serverless computing platforms. But what’s so special about it, and why is there interest in using it instead of a regular server for PHP?

Well, as web developers, we always have to consider where we host our code. It doesn’t matter whether we’re using JavaScript, PHP, Python or Ruby. (Just to name a few.) They all need a hosting service where that code can run and render the HTML sent to the browser.

There are a lot of different hosting services. You can pay for a server on DigitalOcean or some other some other cloud provider. This is often the cheapest option, but then you have a server to manage.

If you don’t want to do that, you can use a Platform as a Service (PaaS) like Heroku. You tell them how big of a server you want and they take care of the rest. On your end, you just need to deploy your code and that’s it. WordPress hosting works similarly.

While platforms as a service help you worry less about your server, they don’t completely remove all server issues. You still have to wonder if you can handle spikes in traffic. That’s because most of these services won’t scale automatically to handle these scenarios.

Serverless computing offers a solution to this problem. It distills your cloud computing needs to its barest essence. Your cloud provider will run your code on-demand and only charge you for that.

This lets you only pay for what you use. (If your site receives no traffic, you pay nothing.) This architecture also lets you scale infinitely. In fact, serverless computing can scale to handle thousands of visitors almost instantly.

This is a transformative change for all programming languages. But even more so for PHP, since it’s a language uniquely positioned to leverage the benefits of serverless. Let’s explore why that is.

Published
Categorized as Technology

Why serverless is the perfect hosting solution for WooCommerce

Serverless computing isn’t discussed much in the WordPress community. But it has the potential to transform how WordPress sites scale and perform.

No WordPress platform has more to gain from serverless computing than WooCommerce. Hosting a WooCommerce site comes with unique challenges that you don’t have when hosting a regular WordPress site. That’s why a lot of managed WordPress hosting companies started to offer dedicated WooCommerce hosting.

Serverless is the perfect technological solution to tackle those challenges. That’s why you’ll probably start hearing more and more about it.

Published
Categorized as Technology