WordPress on AWS Lightsail with Nginx, Varnish and PHP-FPM
By Muhammad Irfan Aslam, Senior Systems & Cloud Engineer
Client: Agency and business website owners · Platform: Upwork and Fiverr · Rating: 5.0 ★
The problem
WordPress sites slow down quickly under traffic when every request runs PHP and queries the database. The clients needed hosting that stays fast under load without moving to an expensive managed platform.
The standard answer is layered: a reverse proxy in front, a full-page cache so most visitors never touch PHP, and a PHP worker pool sized to the server so dynamic requests do not queue up.
What I did
- Built the stack on AWS Lightsail with Nginx as the reverse proxy and TLS endpoint.
- Added a Varnish cache layer so repeat page views are served from memory instead of PHP.
- Configured and sized the PHP-FPM worker pool for the instance, and tuned MySQL.
- Deployed WordPress on the new stack and set it up to scale.
- For a separate agency client, built a similar Varnish + PHP-FPM + Nginx WordPress host and had the site live the same day, within 4 hours.
Result
Production-ready WordPress hosting with caching in front of PHP, delivered with 5-star reviews on both Upwork and Fiverr.
Step-by-step tutorials on LearnWithIrfan.
Facing a similar problem?
Describe your setup and the outcome you need. I’ll reply with focused questions and a clear next step.
Discuss your project