WordPress App backed with the power of RDS to provide high availability MySQL database

In this article, we are going to create a great setup over AWS cloud and with its amazing services.

Our Plan

🔅 Create an AWS EC2 instance

🔅 Configure the instance with Apache Webserver.

🔅 Download php application name “WordPress”.

🔅 As wordpress stores data at the backend in MySQL Database server. Therefore, you need to setup a MySQL server using AWS RDS service using Free Tier.

🔅 Provide the endpoint/connection string to the WordPress application to make it work.

Architecture of our Setup


We will create the setup with step by step procedure.

Step 1: Configure RDS for providing MySQL database service to our WordPress App.

a). Go to AWS RDS service

Click on create database

b). Creating the Database

Choosing MySQL Engine
Choosing Free Tier template
  • we don’t want that any charges implemented on this experiment!!!
Credentials setting
Choosing the DB instance size
  • Since we have opted for free tier, so only db.t2.micro size available.
Storage settings
Choosing Default VPC, also public access is yes
  • We can create our own customized VPC as well. Also the public access is allowed in order for testing, but in real time we need to customize it.
Click on Create Database

After some minutes, it will be in Available state .

Successfully created Database
Its Endpoint URL

c). Try to connect to this database

  • For this, we need to install mysql first in the EC2 instance.
command to install mysql
Successfully installed

check the connection, using command: “mysql -h endpoint_url -u username -p

Successfully connected
Databases available

We can create databases, table etc to customize our database.

Step 2: Configuring WordPress

To configure WordPress, we need to first install

  • httpd
  • php (version 7.4 or more)
  • php-mysqlnd

Lets install them one by one,

Commands to be used are :

httpd:yum install httpd


php-mysqlnd : “dnf install php-mysqlnd”

Successfully installed

a). To setup WordPress, we need to download the zip file first.

command:wget https://wordpress.org/latest.tar.gz

Successfully downloaded the file

Now, we will unzip this file.

command:tar -xzvf latest.tar.gz

Successfully extracted

Transfer these files to the document root.

command:rsync -avP ~/wordpress/ /var/www/html/

Successfully copied
document root

Create a folder for the data that will be uploaded by the users.

created uploads folder

At last update the Apache permissions to the WordPress files

given permissions
  • Now Restart the httpd service, using command: “systemctl restart httpd”

c). Accessing the WordPress, through the WordPress

To access the WordPress, use the public IP of the EC2 instance.

Got the WordPress page

d). Configure WordPress now

Click lets go! button
Hiding my password :)

Ohh …..oh, we need to configure it manually!!!

Manual Setup Display

After creating the file, wp-config.php we get the installation page

Make all the required changes

Yeahhhh!! we have successfully Installed it :)

Success Message
Log In to the site
Dashboard of myBlog site

After some customization, my blog site is — — — — ->

myBlog site, backed with RDS database service

In this, I came to know about many concepts of Databases, their connections and how the back-end services are working.🤩

Further I have some plans to Enhance this website, with more Interesting services of AWS. Stay Tuned…..😌😌

💫 Keep Learning, Keep Sharing💫



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Anshika Sharma

Anshika Sharma


I am a tech enthusiast, researcher and work for integrations. I love to explore and learn about the new technologies and their right concepts from its core.