Integrating Amazon RDS with WordPress

Pranita Gughane
4 min readJun 10, 2021

Amazon Relational Database Service (RDS)

Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and resizable capacity while automating time-consuming administration tasks such as hardware provisioning, database setup, patching and backups. It frees you to focus on your applications so you can give them the fast performance, high availability, security and compatibility they need.

WordPress

WordPress is a free and open-source content management system (CMS) written in PHP and paired with a MySQL or MariaDB database.

Task Description 📄

🔅 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

Lets start with the task:

  1. Create an AWS EC2 instance

To create an EC2 instance I’m using Amazon Linux 2 image

SELECT THE AMI: I HAVE CHOSEN AMAZON LINUX
THE INSTANCE HAS BEEN LAUNCHED

2. Configure the instance mysql database and apache webserver.

  1. Install mysql
yum install mysql -y
Install HTTPD

2. Install PHP

amazon-linux-extras install php7.2 -y
Install PHP

3. Install httpd

yum install httpd -y
Install httpd

4. Install WordPress

wget https://wordpress.org/latest.tar.gz
Install WordPress

5. Extract WordPress

tar -xzf latest.tar.gz
Extract file

6. Moving WordPress folder to root directory /var/www/html

mv wordpress /var/www/html

7. Edit httpd configuration file

vim /etc/httpd/conf/httpd.confAllowOverride All

8. Start httpd service

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

DataBase created :

SUCCESSFULLY LAUNCHED DATABASE

Creating mysql database :

Here we can see database mywp1 is empty

use <database_name>;show tables;

Now on browser:

http://<public_ip>/wordpress

You will receive the next page asking for your credentials. Fill up and start using :)

That’s all for this blog, hope you liked it..🙌🏻😁📃

Thanks for Visiting here…!!!

You can also follow me on my LinkedIn profile by clicking on following link.

--

--