Stop Fearing Serverless: Your Big PHP Site Can Handle It

I was on a call last week with a client running a pretty big WooCommerce store. They’re getting ready for a huge Black Friday sale and are terrified their server is going to crash. Again. When I suggested we move their whole setup to a modern PHP serverless architecture, the client’s own tech lead nearly had a heart attack. “Isn’t that slow? What about cold starts? I read that it’s not for big sites like ours.”

And man, I get it. He wasn’t wrong, he was just outdated. A lot of the chatter online about running PHP on serverless platforms like AWS Lambda is based on how things used to be maybe five, six years ago. It was a total nightmare back then. You had to use these clunky Node.js wrappers to even get PHP code to run, and the performance was just awful. So of course, the idea got a bad rap.

Why People Are Still Scared of PHP Serverless

My first instinct was to just throw a bunch of performance benchmarks at him. Show him the charts, prove how fast it is now. But that’s a junior dev move. It doesn’t actually address the real concern or build any trust. This guy had done his homework, but his sources were ancient. The real problem wasn’t his conclusion; it was his data. The entire game has changed.

The core of the revolution is how we run PHP on Lambda now. We don’t use those hacks anymore. Thanks to AWS Lambda Layers and amazing open-source projects like Bref, we can run PHP natively. It’s just PHP. Fast, efficient, and without a Node.js middleman slowing everything down. We package the PHP version we want into a layer, and Lambda runs it directly. That’s it.

service: my-big-woocommerce-store

provider:
  name: aws
  runtime: provided.al2 # We tell AWS we're bringing our own runtime

functions:
  main:
    handler: public/index.php # Standard WordPress/PHP entry point
    timeout: 28 # API Gateway's max
    layers:
      - ${bref:layer.php-83-fpm} # Here's the kicker: just specify the PHP version you want

# ... a bit more config for events, etc.

Then there’s the “cold start” boogeyman. The idea is that if no one has hit your site in a while, the first person gets a slow load while the serverless function “wakes up.” And yeah, that was a thing. It’s also a solved problem. For a predictable event like a Black Friday sale, we use Provisioned Concurrency. We just tell AWS, “Hey, keep 50 instances of this function hot and ready to go.” No startup lag. Zero. The problem is gone.

It’s not just my opinion; this is the new reality of high-performance PHP hosting. It builds on a concept I saw articulated really well over at carlalexander.ca a while back. The serverless world didn’t stall; it just got quiet while it was getting seriously powerful.

So, What’s the Point?

The point isn’t that your old VPS is garbage. It’s that you have options now. Real ones. You can run massive, monolithic applications like WordPress and WooCommerce on an infrastructure that scales almost infinitely on demand and goes to sleep when you don’t need it. The old arguments against it are dead.

  • Performance: It’s fast. Native PHP execution is no joke.
  • Scaling: It handles traffic spikes automatically without you needing to provision a bigger server.
  • Cost: You often pay only for what you use, which can be a massive saving.

Look, this stuff gets complicated fast. If you’re tired of debugging someone else’s mess and just want your site to work, especially when it matters most, drop my team a line. We’ve probably seen it before.

Still think you’re stuck with that creaky old server that falls over every time you get a bit of traffic?

Leave a Reply

Your email address will not be published. Required fields are marked *