WordPress over AWS Cloud with serverless database RDS

WordPress is web publishing software you can use to create a beautiful website or blog. Since it was released in 2003, WordPress has become one of the most popular web publishing platforms. And today it powers more than 35% of the entire web — everything from hobby blogs to some of the most popular websites online.

A Basic WordPress blog required a WebServer and a MySQL server. this article will cover Creating an EC2 Instance, configured as a web server and using the AWS Relational Database Server (RDS) for the database.

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. That is a server in the cloud.

Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud. It is a serverless service, this means AWS will take care of managing the server for us, we just have to create our tables and databases in there.

Provisioning an EC2 Instance and RDS

We will be using Terraform to provision the EC2 instance and RDS on AWS. We will be launching this setup in a VPC with 2 Public Subnets. Terraform is an open-source infrastructure as a code software tool. Terraform is capable of provisioning and managing multi-cloud services.

Note: We are using Red Hat Enterprise Linux 8 as our OS

This will be our Web Server.

Since we are launching the Database in a VPC, we need to create a subnet group.

We will be using the MySQL engine with 10Gib of Allocated Storage. The publicly accessible directive is to be removed when into production. While Launching the Database in a VPC, we must have a minimum of 2 Subnets in the database group.

Complete Code:

Setting Up the Web Server and Installing WordPress

Install HTTPd package and other dependencies for WordPress

Download an Extract WordPress

Change sample configuration file to main configuration file and fill in all the necessary details

Copy the WordPress directory to DocumentRoot

Stat and Enable the httpd Service

Visit the website and Fill in the Details

Login and you are ready to Create your next Website is live!

Get the Complete and Optimized Code at

Final Year Student, understanding the industrial approach and tools