OverView of this task

Step 1: Create an AWS EC2 instance
Step 2: Configure the instance with Apache Webserver
Step 3: Download the PHP application name WordPress
Note: As WordPress stores data at the backend in MySQL
Database server. Therefore, we need to set up a MySQL server
Step 4: MySQL server using AWS RDS service using Free Tier
Step 5: Provide the endpoint/connection string to the
WordPress application to make it work

Sathya Narayana
5 min readApr 19, 2022

--

Keynote: This task is fully manual work in a broader view, Why am I telling this manual work.

Wait tell end…

Let us get started with the task step by step…

Created an Amazon RDS Database with the following configurations:

Database Creation Method: Standard create

Engine Option: MySQL

MySQL Version: 5.7.31

Templates: Free Tier

Database instance Identifier: WordPress DB

Password also set for the Database

Granting public access and creating a new security group.

region : ap-south-1a

Rest all settings I left in default and then clicked on Create Database.

It took a while to create a database till then I launched an AWS EC2 instance with these properties:

AMI : Red Hat Enterprise Linux 8 (HVM), SSD Volume Type — ami-0a9d27a9f4f5c0efc (64-bit x86)

Instance Type: t2.micro

subnet: ap-south-1a (same as the database)

Name: WordPress-instance

Security Group: All traffic from Anywhere

(Note: Those fields not mentioned are left in default value)

After Launching the Instance I copied the Security Group ID of the Instance and the pasted it in the Inbound rule of the security group of the Database which I created earlier:

After this inbound rule, the database will have access only from the instance(s) which have this security group only

After launching the EC2 instance I did SSH with the private key which I had with me.

I configured the epel and remi repositories :

After the repositories configuration, installed the dnf-utils:

Ran the dnf update command to update the packages:

Installed the httpd package:

Installing other packages: mysql, php-mysqlnd, php:remi-7.4

Now I connected with the Amazon RDS Database with the endpoint URL and passed the credentials which I provided during the creation of the database:

Creating a database with the name imran_db which will be used by WordPress later. and exited with exit; command

Now I downloaded the WordPress in the /var/www/html/ folder via the below command:

Changing the permission of the folder:

Disabling the SELinux:

Now I copied the public IP of the Instance and then pasted it in the browser with /WordPress at the end:

Eg: 192.168.43.43/WordPress

As this showed that means the Frontend part is all good and working

Now we have to set the backend part

Clicked Continue, then let’s go

In the below page, I filled the required fields and then clicked on Submit.

After clicking submit I landed on this page which means the connection to the database was successful!

The next steps:

The task is completed!!!

Thank you very much for giving this a read.

--

--