WordPress on AWS: Lightsail, EC2 or ECS? How to Pick Without Losing a Weekend
If you run WordPress long enough, someone will eventually tell you: "Just move it to AWS."
It sounds like advice. It is actually a restaurant menu with 200+ items, no pictures, and a waiter who answers every question with "it depends."
So let's fix that. This post is for anyone with a WordPress site (a blog, a company website, a client project) who wants to run it on AWS without first earning a cloud architecture degree. By the end you'll know the three realistic ways to host it, what each one costs you in time and sanity, and which one to pick for your situation.
No buzzwords. Well, almost none. I'll apologise when I use one.
First, what does WordPress actually need?
Strip away the plugins and the themes, and WordPress is just four things:
- A web server running PHP, the part that builds your pages
- A database (MySQL or MariaDB), where your posts and settings live
- A folder of files: themes, plugins and, importantly, your uploads
- Something in front of it to make it fast and safe: HTTPS, caching, a bit of protection
Every option below is just a different answer to one question: who looks after these four things, you or AWS?
The more AWS looks after, the less you do. The more you do yourself, the more control you get, and the more interesting your 2 a.m. surprises become.
Option 1: Amazon Lightsail (the "I just want a website" option)
Lightsail is AWS with the training wheels on. You pick a WordPress blueprint, choose a size, and a few minutes later you have a running site, a static IP and a fixed monthly price. No scavenger hunt through forty services.
What you get: one server with WordPress pre-installed, snapshots for backups, an optional managed database, a built-in CDN option, and a dashboard that won't make you cry.
Where it shines: a blog, a brochure site, a small business site, or anything where "steady and boring" is a compliment.
Where it stops: it's one server. When a post goes viral, that one server takes all the traffic by itself, like a single waiter at a wedding. You can resize it, but you're doing that by hand. Growing past it later also means a migration.
Pick it if: you want it live today and you'd like the bill to be predictable.
Option 2: EC2 + RDS (the "I want to be in charge" option)
Here you rent a plain virtual server (EC2), install the web server and PHP yourself, and put the database on RDS, AWS's managed database. Nothing is hidden from you, and nothing is done for you either.
What you get: full control over everything. PHP version, caching, server settings: it's all yours. You can add a load balancer, run more than one server and scale when traffic grows.
What you pay in time: patching, hardening, backups and monitoring are now your job. If the server has a bad day, it's your bad day.
The catch nobody puts on the brochure: the moment you run two servers, they need to share your uploads. Upload an image on server A and server B has never heard of it. The fix is to push media to S3 (more on that below) or to a shared file system like EFS. Plan for this on day one, not at 11 p.m. when half your images are 404s.
Pick it if: you know your way around Linux, you need custom setups, or you expect real growth.
Option 3: Containers on ECS/Fargate (the "I want to deploy like a grown-up" option)
You package WordPress into a container image, and AWS runs it for you on Fargate, with no servers to patch. You deploy by building a new image, not by SSH-ing in and hoping.
What you get: repeatable deployments, easy rollbacks, simple scaling, and the same setup in testing and production.
What you pay: a steeper learning curve, and a mindset shift. A container is disposable. If it gets replaced, anything written inside it vanishes. That means:
- Uploads go to S3, not the local disk
- The database goes on RDS
- Your code (themes and plugins) is baked into the image, not edited live in the dashboard
That last one makes people twitchy: "so I can't install plugins from wp-admin anymore?" Correct. You add them in code and redeploy. It feels strict at first, and then you realise you've stopped getting "I updated a plugin and the site died" emails.
Pick it if: you manage several sites, work in a team, or already deploy other things with containers.
The bits all three options share
Whichever road you take, a good setup has the same supporting cast:
- CloudFront (CDN) in front. It caches your pages and static files at locations close to your visitors, so your server does less work and your site feels faster. One important rule: tell CloudFront not to cache logged-in users and wp-admin. Otherwise your editor logs in and sees someone else's dashboard. (Ask me how I know that this is a bad day. Or don't.)
- HTTPS with AWS Certificate Manager. Free certificates, renewed automatically. If your site sits behind CloudFront or a load balancer, make sure WordPress knows the visitor connected over HTTPS, or you'll meet the famous redirect loop.
- S3 for media. A plugin offloads uploads to S3 and serves them through CloudFront. Your server stays small, and your files stay safe.
- RDS for the database, in a private subnet, not open to the internet. Your database should be like a good secret: only a few people know where it is.
- Backups you've actually tested. A backup you've never restored is a rumour.
- AWS WAF if you want a basic shield against the usual bots and nasties.
Quick decision cheat sheet
| Your situation | Start here |
|---|---|
| Personal blog or small business site | Lightsail |
| One important site, you're comfortable with Linux | EC2 + RDS |
| Many sites, a team, or regular deployments | ECS/Fargate |
| Traffic spikes (campaigns, news, events) | EC2 or ECS behind CloudFront |
| "I have no idea" | Lightsail, and move later if you outgrow it |
A last honest tip on cost: don't trust anyone's numbers, including mine. Put your own traffic and storage into the AWS Pricing Calculator before you decide. The cheapest option on paper is not always the cheapest once you count your time.
The mistakes I'd help you skip
- Starting with the fanciest option. A small site on a big architecture is just an expensive hobby.
- Forgetting the uploads problem the moment you add a second server.
- Caching the admin area. See above. Sorry again.
- Leaving the database public "just for now." "Just for now" has a long life.
- Never testing a restore. Do it once, on a quiet afternoon, before you need it.
Wrapping up
There's no single best way to host WordPress on AWS. There's only the way that matches your site, your team and your patience. Start simple, add pieces only when you feel the pain, and keep your backups boring and tested.
If you found this useful, tell me which option you went with and what bit you. I'm always collecting new ways WordPress can surprise us.