What is WordPress ?

WordPress is a free, open-source website creation platform which requires access to database to store information. Therefore we need database to make WordPress accessible.

What is Amazon RDS ?

Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud.

  • Here we will use Amazon RDS as database for WordPress application.

Getting Started

Step 1: Create an AWS EC2 instance.

No alt text provided for this image

Step 2: Configure the instance with Apache Webserver. Download PHP application name “”WordPress””. As WordPress stores data at the backend in MySQL Database server. Therefore, we need to setup a my SQL server using AWS RDS service using Free Tier.

  • Terraform file which creates EC2 instance with WordPress installed in it. Contains commands which install WordPress application.
  • Terraform file which creates RDS database instance. RDS database instance is of db.t2.micro type and contains username and password as admin and redhat123 respectively stored in the respective variables.
  • You can change it by updating username and password parameter under aws_db_instance resource.
No alt text provided for this image

Step 3: Provide the endpoint/connection string to the WordPress application to make it work.

The outputs will be known after the whole plan finishes successfully.

No alt text provided for this image

Step 4: Terraform init, plan and apply

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

RESULTS

No alt text provided for this image
  • Give Database Name – wordpress (Created in RDS instance)
  • Give Username – admin (If you have not changed)
  • Give Password – redhat123 (If you have not changed)
  • Give Database Host – Endpoint of RDS instance
No alt text provided for this image
  • Click on Submit button.
  • Then click Run the installation button.
  • Fill the required details and click on Install WordPress button.
No alt text provided for this image
  • Login using credentials just created.
No alt text provided for this image
  • Hurray – your WordPress application is working.
No alt text provided for this image
  • Now your WordPress application is using Amazon RDS as a backend