Skip to content

MyanPatel/wordpress-concept

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress on AWS with Terraform

This project is a Terraform-based proof of concept for migrating a simple WordPress blog from on-premises infrastructure to AWS.

The goal is to validate whether AWS can run WordPress with higher availability and lower operational burden, then remove all resources after evaluation.

Project Objectives

  • Deploy a highly available WordPress infrastructure on AWS.
  • Support roughly 1,000 daily visitors.
  • Estimate monthly infrastructure costs.

Target AWS Architecture

The infrastructure maps WordPress requirements (PHP app + MySQL DB + shared file storage) to these AWS services:

  • Application Load Balancer (ALB)

    • Distributes HTTP/HTTPS traffic across EC2 instances.
    • Performs health checks and stops routing to unhealthy targets.
    • Highly available by default.
  • Amazon EC2

    • Runs Linux virtual machines hosting Apache, PHP, and WordPress.
    • Minimum of 2 instances for high availability.
  • Amazon RDS for MySQL

    • Managed MySQL database for WordPress data.
    • Supports backups, patching, and optional Multi-AZ for higher availability.
  • Amazon EFS

    • Shared NFSv4.1 file system for WordPress files and user uploads.
    • Accessible by multiple EC2 instances.
  • Security Groups

    • Restrict traffic between ALB, EC2, RDS, and EFS.
    • Principle of least privilege (only required ports/protocols).

Availability Goal

Target uptime: 99.99%.

High-level strategy:

  • Place at least two EC2 instances behind an ALB.
  • Use health checks for automatic failover at the load balancer layer.
  • Use managed database and shared filesystem services.

Current Terraform Baseline

Current provider configuration:

  • Terraform CLI: >= 1.6.0
  • AWS provider: hashicorp/aws ~> 6.34.0
  • Default region variable: eu-west-2

Cost Estimation

Estimate costs before finalizing:

  1. Run a Terraform plan and list all resources.
  2. Use AWS Pricing Calculator for selected region and sizes.
  3. Record assumptions (instance class, RDS size, storage, data transfer).

About

This project is a Terraform-based proof of concept for migrating a simple WordPress blog from on-premises infrastructure to AWS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages