Integrating Amazon RDS with WordPress 💫

Himanshi Kabra
4 min readJun 7, 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.

Let’s Begin…

🔅 Create an AWS EC2 instance

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

🔅 Configure the instance mysql database and apache webserver.

  1. Install mysql
yum install mysql -y

2. Install PHP

amazon-linux-extras install php7.2 -y

3. Install httpd

yum install httpd -y

4. Install WordPress

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

5. Extract WordPress

tar -xzf latest.tar.gz

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

🔅 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.

👉🏻 DataBase created :

Creating mysql database :

CREATE DATABASE <database_name>;

👉🏻 Here we can see database mywp1 is empty

use <database_name>;show tables;

👉🏻 Now on browser:

http://<public_ip>/wordpress

👉🏻 And now you can see wordpress stores information in mywp1 database :

use <database_name>;show tables;

Finally our Task is completed successfully !!!!😄✌🏻

Thanks for Reading !! 🙌🏻😁📃

🔰 Keep Learning !! Keep Sharing !! 🔰

--

--