Demo CDK app that deploys a HA WordPress architecture on AWS.
Create a new profile in your AWS CLI configuration file:
aws sso login --profile WordPressSandbox
# or
aws configure sso --profile WordPressSandbox
# Get the AWS account ID and the region
aws sts get-caller-identity --profile WordPressSandbox
# Set local environment variables
export AWS_PROFILE=WordPressSandbox
export AWS_ACCOUNT_ID=<AWS_ACCOUNT_ID>
export AWS_REGION=<AWS_REGION>
export CDK_DEFAULT_ACCOUNT=$AWS_ACCOUNT_ID
export CDK_DEFAULT_REGION=$AWS_REGION
Clone this repository on local machine:
git clone https://github.com/Grigore147/aws-wordpress-demo.git
Install the required dependencies:
cd aws-wordpress-demo/infrastructure/aws/cdk
npm ci
npx cdk bootstrap
npx cdk synth
npx cdk deploy
npx cdk destroy
This demo doesn't cover all the best practices for deploying a WordPress architecture on AWS.
Here are some improvements that could be made:
- DNS hosted zone
- Static content serving from S3 and CloudFront
- Caching with ElastiCache
- Enhanced monitoring and logging
- Enhanced security with WAF, Shield and other security services
- CI/CD pipeline
- Automated backups and DR setup